Skip to content

Commit

Permalink
Merge pull request #410 from ergebnis/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 authored Apr 26, 2020
2 parents 0bc1dc2 + 7496f88 commit 92590f2
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 15 deletions.
1 change: 1 addition & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ For details, take a look at the following workflow configuration files:
- [`workflows/release.yaml`](workflows/release.yaml)
- [`workflows/renew.yaml`](workflows/renew.yaml)
- [`workflows/update.yaml`](workflows/update.yaml)
- [`workflows/triage.yaml`](workflows/triage.yaml)

## Coding Standards

Expand Down
21 changes: 11 additions & 10 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,24 @@ branches:
required_approving_review_count: 1
required_status_checks:
contexts:
- "Code Coverage (7.4, locked)"
- "Coding Standards (7.1, locked)"
- "Compile Phar (7.4, locked)"
- "Dependency Analysis (7.4, locked)"
- "Label"
- "Static Code Analysis (7.4, locked)"
- "Tests (7.1, lowest)"
- "Tests (7.1, locked)"
- "Tests (7.1, highest)"
- "Tests (7.2, lowest)"
- "Tests (7.2, locked)"
- "Tests (7.1, locked)"
- "Tests (7.1, lowest)"
- "Tests (7.2, highest)"
- "Tests (7.3, lowest)"
- "Tests (7.3, locked)"
- "Tests (7.2, locked)"
- "Tests (7.2, lowest)"
- "Tests (7.3, highest)"
- "Tests (7.4, lowest)"
- "Tests (7.4, locked)"
- "Tests (7.3, locked)"
- "Tests (7.3, lowest)"
- "Tests (7.4, highest)"
- "Code Coverage (7.4, locked)"
- "Compile Phar (7.4, locked)"
- "Tests (7.4, locked)"
- "Tests (7.4, lowest)"
strict: false
restrictions:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prune.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: "Prune issues and pull requests"
uses: "actions/stale@v1"
uses: "actions/stale@v2"
with:
days-before-close: 5
days-before-stale: 60
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/triage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Triage"

on: # yamllint disable-line rule:truthy
pull_request: null

jobs:
label:
name: "Label"

runs-on: "ubuntu-latest"

steps:
- name: "Add labels based on branch name"
if: "github.event.action == 'opened'"
uses: "actions/[email protected]"
with:
github-token: "${{ secrets.ERGEBNIS_BOT_TOKEN }}"
script: |
const branchPrefixLabels = {
feature: "enhancement",
fix: "bug",
}
const pullRequest = context.payload.pull_request
const repository = context.repo
const branchName = pullRequest.head.ref
const matches = branchName.match(new RegExp('^([^/]+)\/'));
if (matches instanceof Array && branchPrefixLabels.hasOwnProperty(matches[1])) {
const label = branchPrefixLabels[matches[1]]
github.issues.addLabels({
issue_number: pullRequest.number,
labels: [
label
],
owner: repository.owner,
repo: repository.repo,
});
}
4 changes: 0 additions & 4 deletions phive.xml

This file was deleted.

Binary file removed tools/composer-require-checker
Binary file not shown.

0 comments on commit 92590f2

Please sign in to comment.