mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-10 07:57:59 -05:00
generate_prs_flip_draft_to_ready — (#12321)
* Flip draft PRs to ready from the Generate PRs workflow if there is an existing PR in draft and the workflow was not started with PR in Draft Mode selected. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust Linter Handoff workflow git update logic. Signed-off-by: Satadru Pramanik <satadru@gmail.com> --------- Signed-off-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
committed by
GitHub
parent
34c8f78241
commit
13640f5ed3
4
.github/workflows/Generate-PR.yml
vendored
4
.github/workflows/Generate-PR.yml
vendored
@@ -404,13 +404,13 @@ jobs:
|
||||
if [[ -z ${PR_NUMBER} ]]; then
|
||||
PR_NUMBER=$(gh pr create ${PR_DRAFT_FLAG} --reviewer chromebrew/active --title "$(echo "${{ inputs.pr_title || inputs.branch || github.ref_name }}" | sed -e "s/^'//" -e "s/'$//") — ${CHANGED_PACKAGES}" -F /tmp/pr.txt | rev | cut -d"/" -f1 | rev)
|
||||
else
|
||||
gh pr edit --title "$(echo "${{ inputs.pr_title || inputs.branch || github.ref_name }}" | sed -e "s/^'//" -e "s/'$//") — ${CHANGED_PACKAGES}" -F /tmp/pr.txt
|
||||
gh pr edit --add-reviewer chromebrew/active
|
||||
gh pr edit --add-reviewer chromebrew/active --title "$(echo "${{ inputs.pr_title || inputs.branch || github.ref_name }}" | sed -e "s/^'//" -e "s/'$//") — ${CHANGED_PACKAGES}" -F /tmp/pr.txt
|
||||
fi
|
||||
# Draft PRs can not be set to automerge.
|
||||
if [[ $DRAFT_PR == 'true' ]]; then
|
||||
gh pr ready --undo || true
|
||||
else
|
||||
gh pr ready || true
|
||||
gh pr merge --auto || true
|
||||
fi
|
||||
echo "PR_NUMBER is ${PR_NUMBER}"
|
||||
|
||||
2
.github/workflows/Linter-Handoff.yml
vendored
2
.github/workflows/Linter-Handoff.yml
vendored
@@ -37,7 +37,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Update branch
|
||||
if: ${{ github.event.action != 'synchronize' || !contains(github.ref_name, '/merge') }}
|
||||
if: ${{ !contains(github.ref_name, '/merge') }}
|
||||
run: |
|
||||
git fetch origin
|
||||
git checkout "${{ github.ref_name }}"
|
||||
|
||||
Reference in New Issue
Block a user