Skip to content

Commit 9c7b383

Browse files
authored
Merge pull request #154 from nodenv/automerge
Use github cli directly to create PRs
2 parents eb1eeb5 + 41afba1 commit 9c7b383

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

.github/workflows/definitions.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ permissions: {}
77
jobs:
88
scrape:
99
runs-on: ubuntu-latest
10-
permissions: { contents: read }
10+
permissions: { contents: write }
1111
steps:
1212
- uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
1313
with: { egress-policy: audit }
1414
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1515
- run: npm ci
1616

17+
- run: git checkout -b "scrape/definitions"
1718
- run: npm run scrape-definitions
1819
- run: npm run commit-definitions
1920
env:
@@ -22,10 +23,10 @@ jobs:
2223
GIT_COMMITTER_NAME: ${{ vars.GHA_BOT_NAME }}
2324
GIT_COMMITTER_EMAIL: ${{ vars.GHA_BOT_EMAIL }}
2425

25-
- run: git log --format='- %s' --reverse ${{github.sha}}.. >> ${{ runner.temp }}/pr-body
26-
- uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
27-
with:
28-
token: ${{ secrets.BOT_TOKEN }}
29-
branch: latest-scraped-definitions
30-
title: "Scraped latest definitions"
31-
body-path: ${{ runner.temp }}/pr-body
26+
- name: gh pr create
27+
run: |
28+
git push -fu origin HEAD
29+
gh pr create --fill -t "Scraped definitions"
30+
gh pr merge --auto
31+
env:
32+
GH_TOKEN: ${{ secrets.BOT_TOKEN }}

0 commit comments

Comments
 (0)