-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Automatically upgrade workflow dependencies (#48)
Configures Dependabot to automatically upgrade outdated workflow dependencies, and adds automation for pull request labelling based on commit message prefixes.
- Loading branch information
Showing
3 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: github-actions | ||
commit-message: | ||
prefix: chore | ||
prefix-development: chore | ||
directory: "/" | ||
labels: | ||
- chore 🧹 | ||
- workflows 👷♀️ | ||
pull-request-branch-name: | ||
separator: / | ||
reviewers: | ||
- unfunco | ||
schedule: | ||
day: sunday | ||
interval: weekly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
"workflows 👷♀️": | ||
- changed-files: | ||
- any-glob-to-any-file: .github/**/*.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: PR / Label | ||
|
||
on: | ||
pull_request_target: { } | ||
|
||
jobs: | ||
triage: | ||
name: Triage | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Apply context labels | ||
uses: actions/labeler@v5 | ||
with: | ||
configuration-path: .github/labeler.yaml | ||
sync-labels: true | ||
- name: Apply commit message labels | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const labels = [] | ||
if (context.payload.pull_request.title.startsWith('fix:')) { | ||
labels.push('bug 🐛') | ||
} | ||
if (context.payload.pull_request.title.startsWith('chore:')) { | ||
labels.push('chore 🧹') | ||
} | ||
if (context.payload.pull_request.title.startsWith('feat:')) { | ||
labels.push('feature 💡') | ||
} | ||
if (labels.length > 0) { | ||
github.rest.issues.addLabels({ | ||
issue_number: context.issue.number, | ||
labels, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
}) | ||
} |