forked from aws-amplify/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.mergify.yml
42 lines (39 loc) · 1.61 KB
/
.mergify.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
pull_request_rules:
- name: Ask PR author what redirects are needed
conditions:
- label="redirects-needed"
actions:
comment:
message: |
@{{author}}, since a file was deleted from the `src/pages` and/or `src/fragments` directories, redirects might need to be set up so these previous pages do not 404. If redirects are needed, please answer these questions for each redirect that is needed:
- What is the source address of the redirect? (Where are you trying to redirect from?)
- What is the target address of the redirect? (Where are you trying to redirect to?)
- Type of redirect? 301 - permanent redirect or 302 - temporary redirect? (More info on Amplify Hosting redirects here: https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html)
label:
remove:
- 'redirects-added'
- name: Add redirects-needed label if status checks fail
conditions:
- or:
- check-failure="Check if redirects are needed on PR opened"
- check-failure="Check if redirects are needed on PR sync"
actions:
label:
add:
- 'redirects-needed'
- name: Remove verified-assets label if deleted-assets label is added
conditions:
- label="deleted-assets"
actions:
label:
remove:
- 'verified-assets'
- name: Add deleted-assets label if status checks fail
conditions:
- or:
- check-failure="Check if assets were deleted on PR opened"
- check-failure="Check if assets were deleted on PR sync"
actions:
label:
add:
- 'deleted-assets'