Skip to content

Enhancement: Synchronize with ergebnis/php-library-template #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/[email protected]"
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