1
0
mirror of synced 2026-01-06 06:02:35 -05:00

Enable auto-merge for translation-batches (#23464)

* Enable auto-merge for translation-batches

* Attempt to approve and set auto-merge

* Temporarily disable check for tests

* Test commit. Revert later.

* Not self approving anymore

* Improve failure message

* Fix auto-merge

* Remove test code

* Add ownership to @github-actions
This commit is contained in:
Marcelo Jacobus
2021-12-09 14:06:45 -03:00
committed by GitHub
parent b4a49fe37d
commit 0c02f91dd0
2 changed files with 13 additions and 1 deletions

View File

@@ -172,6 +172,18 @@ jobs:
--body-file /tmp/pr-body.txt || git push origin :${{ steps.set-branch.outputs.BRANCH_NAME }} \
--label "translation-batch"
- name: Approve PR
if: github.ref_name == 'main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr review --approve || echo "Nothing to approve"
- name: Set auto-merge
if: github.ref_name == 'main'
env:
GITHUB_TOKEN: ${{ secrets.DOCUBOT_REPO_PAT }}
run: gh pr merge ${{ steps.set-branch.outputs.BRANCH_NAME }} --auto --squash || echo "Nothing to merge"
# When the maximum execution time is reached for this job, Actions cancels the workflow run.
# This emits a notification for the first responder to triage.
- name: Send Slack notification if workflow is cancelled