From 5e137e805880e0693af5555f2913a94be67c94cb Mon Sep 17 00:00:00 2001 From: Siarhei Dudko Date: Sat, 9 May 2026 19:19:12 +0400 Subject: [PATCH] feat: remove draft PR, add auto-merge on success --- .github/workflows/autoupdate.yml | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/autoupdate.yml b/.github/workflows/autoupdate.yml index 399ae40..96ecd25 100644 --- a/.github/workflows/autoupdate.yml +++ b/.github/workflows/autoupdate.yml @@ -51,13 +51,13 @@ jobs: ref: ${{ github.repository }} branch: ${{ env.AUTOUPDATE_BRANCH }} builds-and-checks: | - npm run lint - npm run build - npm run test:ts + npm run lint + npm run build + npm run test:ts debug: "true" ignore-packages: | - @types/node - nyc + @types/node + nyc - name: Persist autoupdater work on failure if: steps.autoupdate.outcome == 'failure' run: | @@ -127,7 +127,15 @@ jobs: --assignee siarheidudko \ --reviewer siarheidudko) echo "pr_url=$PR_URL" >> "$GITHUB_OUTPUT" - - name: Open draft PR (autoupdater failed) + - name: Enable auto-merge on success PR + if: steps.pr_success.outputs.pr_url != '' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_URL: ${{ steps.pr_success.outputs.pr_url }} + run: | + gh api repos/${{ github.repository }} --method PATCH -f allow_auto_merge=true || true + gh pr merge "$PR_URL" --auto --squash || true + - name: Open PR (autoupdater failed) id: pr_failure if: steps.autoupdate.outcome == 'failure' && steps.diff.outputs.has_diff == 'true' env: @@ -142,9 +150,9 @@ jobs: A Claude session has been dispatched to push fixes onto this branch so the following commands all exit 0: - npm run lint - npm run build - npm run test:ts + npm run lint + npm run build + npm run test:ts Claude will leave a status comment on this PR when it finishes. PR-checks will re-run on each new commit. @@ -155,7 +163,6 @@ jobs: --head "$AUTOUPDATE_BRANCH" \ --title "chore(deps): autoupdate (needs claude fix)" \ --body "$BODY" \ - --draft \ --assignee siarheidudko \ --reviewer siarheidudko) echo "pr_url=$PR_URL" >> "$GITHUB_OUTPUT"