Skip to content

Commit 2c03eca

Browse files
authored
Merge pull request #9 from localheinz/feature/synchronize
Enhancement: Synchronize with ergebnis/php-library-template
2 parents b2af13a + 80a95e8 commit 2c03eca

File tree

4 files changed

+58
-4
lines changed

4 files changed

+58
-4
lines changed

.github/workflows/integrate.yaml

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,64 @@ jobs:
9797
)
9898
9999
steps:
100+
- name: "Request review from @ergebnis-bot"
101+
uses: "actions/github-script@v2"
102+
with:
103+
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
104+
script: |
105+
const pullRequest = context.payload.pull_request
106+
const repository = context.repo
107+
108+
const reviewers = [
109+
"ergebnis-bot",
110+
]
111+
112+
await github.pulls.createReviewRequest({
113+
owner: repository.owner,
114+
pull_number: pullRequest.number,
115+
repo: repository.repo,
116+
reviewers: reviewers,
117+
})
118+
119+
- name: "Assign @ergebnis-bot"
120+
uses: "actions/github-script@v2"
121+
with:
122+
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
123+
script: |
124+
const pullRequest = context.payload.pull_request
125+
const repository = context.repo
126+
127+
const reviewers = [
128+
"ergebnis-bot",
129+
]
130+
131+
await github.issues.addAssignees({
132+
assignees: reviewers,
133+
issue_number: pullRequest.number,
134+
owner: repository.owner,
135+
repo: repository.repo,
136+
})
137+
138+
- name: "Approve pull request"
139+
uses: "actions/github-script@v2"
140+
if: "github.actor != 'ergebnis-bot'"
141+
with:
142+
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
143+
script: |
144+
const pullRequest = context.payload.pull_request
145+
const repository = context.repo
146+
147+
await github.pulls.createReview({
148+
event: "APPROVE",
149+
owner: repository.owner,
150+
pull_number: pullRequest.number,
151+
repo: repository.repo,
152+
})
153+
100154
- name: "Merge pull request"
101155
uses: "actions/github-script@v2"
102156
with:
103-
github-token: "${{ secrets.GITHUB_TOKEN }}"
157+
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
104158
script: |
105159
const pullRequest = context.payload.pull_request
106160
const repository = context.repo

.github/workflows/prune.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
with:
1919
days-before-close: 5
2020
days-before-stale: 60
21-
repo-token: "${{ secrets.GITHUB_TOKEN }}"
21+
repo-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
2222
stale-issue-label: "stale"
2323
stale-issue-message: |
2424
Since this issue has not had any activity within the last sixty days, I have marked it as stale.

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: "Create release"
2222
uses: "actions/create-release@v1.1.1"
2323
env:
24-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
24+
ERGEBNIS_BOT_TOKEN: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
2525
with:
2626
draft: false
2727
prerelease: false

.github/workflows/triage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: "Add labels based on branch name"
1818
uses: "actions/github-script@v2"
1919
with:
20-
github-token: "${{ secrets.GITHUB_TOKEN }}"
20+
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
2121
script: |
2222
const branchPrefixLabels = {
2323
feature: "enhancement",

0 commit comments

Comments
 (0)