Skip to content

Commit

Permalink
Merge pull request #9 from localheinz/feature/synchronize
Browse files Browse the repository at this point in the history
Enhancement: Synchronize with ergebnis/php-library-template
  • Loading branch information
ergebnis-bot committed Jul 5, 2020
2 parents b2af13a + 80a95e8 commit 2c03eca
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 4 deletions.
56 changes: 55 additions & 1 deletion .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,64 @@ jobs:
)
steps:
- name: "Request review from @ergebnis-bot"
uses: "actions/github-script@v2"
with:
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
script: |
const pullRequest = context.payload.pull_request
const repository = context.repo
const reviewers = [
"ergebnis-bot",
]
await github.pulls.createReviewRequest({
owner: repository.owner,
pull_number: pullRequest.number,
repo: repository.repo,
reviewers: reviewers,
})
- name: "Assign @ergebnis-bot"
uses: "actions/github-script@v2"
with:
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
script: |
const pullRequest = context.payload.pull_request
const repository = context.repo
const reviewers = [
"ergebnis-bot",
]
await github.issues.addAssignees({
assignees: reviewers,
issue_number: pullRequest.number,
owner: repository.owner,
repo: repository.repo,
})
- name: "Approve pull request"
uses: "actions/github-script@v2"
if: "github.actor != 'ergebnis-bot'"
with:
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
script: |
const pullRequest = context.payload.pull_request
const repository = context.repo
await github.pulls.createReview({
event: "APPROVE",
owner: repository.owner,
pull_number: pullRequest.number,
repo: repository.repo,
})
- name: "Merge pull request"
uses: "actions/github-script@v2"
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
script: |
const pullRequest = context.payload.pull_request
const repository = context.repo
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prune.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
days-before-close: 5
days-before-stale: 60
repo-token: "${{ secrets.GITHUB_TOKEN }}"
repo-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
stale-issue-label: "stale"
stale-issue-message: |
Since this issue has not had any activity within the last sixty days, I have marked it as stale.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: "Create release"
uses: "actions/create-release@v1.1.1"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
ERGEBNIS_BOT_TOKEN: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
with:
draft: false
prerelease: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/triage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: "Add labels based on branch name"
uses: "actions/github-script@v2"
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
script: |
const branchPrefixLabels = {
feature: "enhancement",
Expand Down

0 comments on commit 2c03eca

Please sign in to comment.