Bug 2063147 - workflows: automatically retarget PRs to autoland DOT_GITHUB_OVERRIDE DONTBUILD r=zeid
This is the most common use-case, so we make this the default. Note: due to the way the link to lando is then created based on the current target ref, the repo must be configured with a LANDO_REPO Actions variable. Differential Revision: https://phabricator.services.mozilla.com/D318376
This commit is contained in:
committed by
omehani@mozilla.com
parent
b5c49ed230
commit
4ec167cb6a
@@ -86,10 +86,13 @@ jobs:
|
||||
gh pr lock "${PR}"
|
||||
|
||||
- name: Check PR target
|
||||
if: (steps.team.outputs.is_member == 'true' && steps.paths.outputs.only_allowed == 'true') && github.event.action == 'opened' && github.base_ref == 'main'
|
||||
if: (steps.team.outputs.is_member == 'true' && steps.paths.outputs.only_allowed == 'true') && github.event.action == 'opened' && github.base_ref != 'autoland'
|
||||
run: |
|
||||
gh pr edit "${PR}" --base "autoland"
|
||||
gh pr comment "${PR}" --body "> [!WARNING]
|
||||
The base branch is currently set to \`main\`. Please [Edit this PR](https://docs.github.com/en/pull-requests/how-tos/create-pull-requests/changing-the-base-branch-of-a-pull-request) and set the base to \`autoland\`."
|
||||
The target branch has been automatically set to \`autoland\`.
|
||||
|
||||
Please [Edit this PR](https://docs.github.com/en/pull-requests/how-tos/create-pull-requests/changing-the-base-branch-of-a-pull-request) if this wasn't your intention."
|
||||
|
||||
- name: Add Lando link
|
||||
if: (steps.team.outputs.is_member == 'true' && steps.paths.outputs.only_allowed == 'true') && github.event.action == 'opened'
|
||||
|
||||
Reference in New Issue
Block a user