|
1 | 1 | pull_request_rules: |
2 | | -- name: comment-pre-commit-failure |
3 | | - description: Comment on PR when pre-commit check fails |
4 | | - conditions: |
5 | | - - status-failure = precommit-checks |
6 | | - - -closed |
7 | | - - -draft |
8 | | - actions: |
9 | | - comment: |
10 | | - message: | |
11 | | - Hi @{{author}}, the pre-commit checks have failed. Please run: |
| 2 | + - name: comment-pre-commit-failure |
| 3 | + description: Comment on PR when pre-commit check fails |
| 4 | + conditions: |
| 5 | + - status-failure = precommit-checks |
| 6 | + - -closed |
| 7 | + - -draft |
| 8 | + actions: |
| 9 | + comment: |
| 10 | + message: | |
| 11 | + Hi @{{author}}, the pre-commit checks have failed. Please run: |
12 | 12 |
|
13 | | - ```bash |
14 | | - uv pip install pre-commit |
15 | | - pre-commit install |
16 | | - pre-commit run --all-files |
17 | | - ``` |
| 13 | + ```bash |
| 14 | + uv pip install pre-commit |
| 15 | + pre-commit install |
| 16 | + pre-commit run --all-files |
| 17 | + ``` |
18 | 18 |
|
19 | | - Then, commit the changes and push to your branch. |
| 19 | + Then, commit the changes and push to your branch. |
20 | 20 |
|
21 | | - For future commits, `pre-commit` will run automatically on changed files before each commit. |
| 21 | + For future commits, `pre-commit` will run automatically on changed files before each commit. |
22 | 22 |
|
23 | | -- name: comment-dco-failure |
24 | | - description: Comment on PR when DCO check fails |
25 | | - conditions: |
26 | | - - status-failure = dco |
27 | | - - -closed |
28 | | - - -draft |
29 | | - actions: |
30 | | - comment: |
31 | | - message: | |
32 | | - Hi @{{author}}, the DCO check has failed. Please click on DCO in the Checks section for instructions on how to resolve this. |
| 23 | + - name: comment-dco-failure |
| 24 | + description: Comment on PR when DCO check fails |
| 25 | + conditions: |
| 26 | + - status-failure = dco |
| 27 | + - -closed |
| 28 | + - -draft |
| 29 | + actions: |
| 30 | + comment: |
| 31 | + message: | |
| 32 | + Hi @{{author}}, the DCO check has failed. Please click on DCO in the Checks section for instructions on how to resolve this. |
33 | 33 |
|
34 | | -- name: ping author on conflicts and add 'needs-rebase' label |
35 | | - conditions: |
36 | | - - conflict |
37 | | - - -closed |
38 | | - actions: |
39 | | - label: |
40 | | - add: |
41 | | - - needs-rebase |
42 | | - comment: |
43 | | - message: | |
44 | | - This pull request has merge conflicts that must be resolved before it can be |
45 | | - merged. Please rebase the PR, @{{author}}. |
| 34 | + - name: ping author on conflicts and add 'needs-rebase' label |
| 35 | + conditions: |
| 36 | + - conflict |
| 37 | + - -closed |
| 38 | + actions: |
| 39 | + label: |
| 40 | + add: |
| 41 | + - needs-rebase |
| 42 | + comment: |
| 43 | + message: | |
| 44 | + This pull request has merge conflicts that must be resolved before it can be |
| 45 | + merged. Please rebase the PR, @{{author}}. |
46 | 46 |
|
47 | | - https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork |
| 47 | + https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork |
48 | 48 |
|
49 | | -- name: block PRs containing merge commits |
50 | | - conditions: |
51 | | - - -linear-history |
52 | | - - -closed |
53 | | - actions: |
54 | | - label: |
55 | | - add: |
56 | | - - needs-rebase |
57 | | - comment: |
58 | | - message: | |
59 | | - @{{author}}, this project requires a linear history on feature branches. |
60 | | - Your PR contains merge commits. Please rebase your branch against `main` |
61 | | - and remove them. |
| 49 | + - name: block PRs containing merge commits |
| 50 | + conditions: |
| 51 | + - -linear-history |
| 52 | + - -closed |
| 53 | + actions: |
| 54 | + label: |
| 55 | + add: |
| 56 | + - needs-rebase |
| 57 | + comment: |
| 58 | + message: | |
| 59 | + @{{author}}, this project requires a linear history on feature branches. |
| 60 | + Your PR contains merge commits. Please rebase your branch against `main` |
| 61 | + and remove them. |
62 | 62 |
|
63 | | - You can do this by running: |
64 | | - `git pull --rebase upstream main` |
| 63 | + You can do this by running: |
| 64 | + `git pull --rebase upstream main` |
65 | 65 |
|
66 | | -- name: remove 'needs-rebase' label when blockers are resolved |
67 | | - conditions: |
68 | | - - linear-history |
69 | | - - -conflict |
70 | | - - -closed |
71 | | - actions: |
72 | | - label: |
73 | | - remove: |
74 | | - - needs-rebase |
| 66 | + - name: remove 'needs-rebase' label when blockers are resolved |
| 67 | + conditions: |
| 68 | + - linear-history |
| 69 | + - -conflict |
| 70 | + - -closed |
| 71 | + actions: |
| 72 | + label: |
| 73 | + remove: |
| 74 | + - needs-rebase |
| 75 | +merge_protections_settings: |
| 76 | + reporting_method: check-runs |
0 commit comments