Skip to content

Commit 035880e

Browse files
authored
Using jaylybot to create PRs instead of github actions bot (JaylyDev#190)
* using @joyloy-bot instead of github actions bot * base * ref * ok * Update cl.yml * Update dependency-update.yml * Update dependency-update.yml * github token * jayly-bot
1 parent a3af93b commit 035880e

File tree

2 files changed

+29
-6
lines changed

2 files changed

+29
-6
lines changed

.github/workflows/cl.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ on:
44
push:
55
pull_request:
66
schedule:
7-
## run action every sunday at 20:00 UTC
8-
- cron: "00 20 * * 0"
7+
- cron: "00 20 * * *"
98

109
jobs:
1110
checks:
@@ -32,12 +31,24 @@ jobs:
3231

3332
- name: Create Pull Request
3433
if: ${{ github.event_name == 'schedule' }}
34+
id: cpr
3535
uses: peter-evans/create-pull-request@v4
3636
with:
37+
token: ${{ secrets.JAYLYBOT_TOKEN }}
38+
push-to-fork: jayly-bot/ScriptAPI
3739
commit-message: Upload generated files
3840
title: Upload generated files for scripts
3941
body: Transpiled TypeScript files and created README files, please review.
40-
labels: scripts
4142
branch: scripts/update
4243
base: main
43-
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
44+
author: jayly-bot <[email protected]>
45+
46+
- name: Check outputs
47+
if: ${{ steps.cpr.outputs.pull-request-number }}
48+
run: |
49+
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
50+
echo "Pull Request URL - $ISSUE"
51+
gh pr edit $ISSUE --add-label "scripts"
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
PULL_REQUEST: ${{ steps.cpr.outputs.pull-request-url }}

.github/workflows/dependency-update.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,24 @@ jobs:
2727
run: node ./tools/dependency/index.js
2828

2929
- name: Create Pull Request
30+
id: cpr
3031
uses: peter-evans/create-pull-request@v4
3132
with:
33+
token: ${{ secrets.JAYLYBOT_TOKEN }}
34+
push-to-fork: jayly-bot/ScriptAPI
3235
commit-message: Update package.json and package-lock.json
3336
title: Update npm packages
3437
body: Updated NPM packages in package.json, please review.
35-
labels: dependencies
3638
branch: dependency/update
3739
base: main
38-
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
40+
author: jayly-bot <[email protected]>
41+
42+
- name: Check outputs
43+
if: ${{ steps.cpr.outputs.pull-request-number }}
44+
run: |
45+
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
46+
echo "Pull Request URL - $ISSUE"
47+
gh pr edit $ISSUE --add-label "dependencies"
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
PULL_REQUEST: ${{ steps.cpr.outputs.pull-request-url }}

0 commit comments

Comments
 (0)