Skip to content

Commit bc5040d

Browse files
authored
chore: Add new pasteurbot automation from upstream (#43)
Use PasteurBot account instead of GH Actions default.
1 parent ddbbf12 commit bc5040d

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

.github/workflows/bump_lockfile.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ jobs:
4646
if: steps.git-diff.outputs.update_done == 'true'
4747
uses: peter-evans/create-pull-request@v7
4848
with:
49-
token: ${{ secrets.GITHUB_TOKEN }}
49+
token: ${{ secrets.PL_PASTEURBOT_PAT_PUBLIC }}
50+
committer: PasteurBot <${{ vars.PL_PASTEURBOT_EMAIL }}>
51+
author: PasteurBot <${{ vars.PL_PASTEURBOT_EMAIL }}>
5052
commit-message: Update dependencies
5153
title: "chore: 📦 Update dependencies"
5254
branch: _bot/update-deps
@@ -55,5 +57,3 @@ jobs:
5557
body: |
5658
This PR updates the lockfile to the latest versions of the dependencies.
5759
Please review the changes and merge when ready.
58-
59-
To trigger CI checks, please close and reopen this PR.

.github/workflows/pre-commit-cron-updater.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,34 @@ jobs:
5858

5959
- name: Create Pull Request (all good)
6060
if: steps.pre-commit.outputs.pre-commit-outcome == 'success'
61+
id: create-pr-ok
6162
uses: peter-evans/create-pull-request@v7
6263
with:
63-
token: ${{ secrets.GITHUB_TOKEN }}
64+
token: ${{ secrets.PL_PASTEURBOT_PAT_PUBLIC }}
65+
committer: PasteurBot <${{ vars.PL_PASTEURBOT_EMAIL }}>
66+
author: PasteurBot <${{ vars.PL_PASTEURBOT_EMAIL }}>
6467
commit-message: Update pre-commit hooks
6568
title: "chore: ✅ Update pre-commit hooks"
6669
branch: _bot/update-precommit
6770
draft: false
6871
body: |
6972
Pre-commit hooks have been updated successfully without conflicts.
7073
74+
- name: Enable auto-merge
75+
if: steps.create-pr-ok.outputs.pull-request-operation == 'created'
76+
uses: peter-evans/enable-pull-request-automerge@v3
77+
with:
78+
token: ${{ secrets.PL_PASTEURBOT_PAT_PUBLIC }}
79+
pull-request-number: ${{ steps.create-pr-ok.outputs.pull-request-number }}
80+
merge-method: squash
81+
7182
- name: Create Pull Request (conflicts)
7283
if: steps.pre-commit.outputs.pre-commit-outcome == 'failure'
7384
uses: peter-evans/create-pull-request@v7
7485
with:
75-
token: ${{ secrets.GITHUB_TOKEN }}
86+
token: ${{ secrets.PL_PASTEURBOT_PAT_PUBLIC }}
87+
committer: PasteurBot <${{ vars.PL_PASTEURBOT_EMAIL }}>
88+
author: PasteurBot <${{ vars.PL_PASTEURBOT_EMAIL }}>
7689
commit-message: Update pre-commit hooks
7790
title: "chore: ⚠️ Update pre-commit hooks [review required]"
7891
branch: _bot/update-precommit

0 commit comments

Comments
 (0)