-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #147 from bgilbert/monitoring
workflows: automatically recheck for updates when issue is closed
- Loading branch information
Showing
4 changed files
with
87 additions
and
58 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,46 @@ | ||
# Privileged workflow to process issue events | ||
|
||
name: Issue event | ||
|
||
on: | ||
issues: | ||
types: [opened, closed] | ||
|
||
permissions: | ||
issues: write | ||
|
||
env: | ||
GH_LABEL: update | ||
|
||
jobs: | ||
issue-event: | ||
name: Process | ||
runs-on: ubuntu-latest | ||
outputs: | ||
bot-user: ${{ steps.bot-user.outputs.username }} | ||
steps: | ||
- name: Get bot username | ||
id: bot-user | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.OPENSLIDE_BOT_TOKEN }} | ||
run: echo "username=$(gh api user -q .login)" >> $GITHUB_OUTPUT | ||
- name: Label dependency issue | ||
if: >- | ||
github.event.action == 'opened' && | ||
github.actor == steps.bot-user.outputs.username && | ||
contains(github.event.issue.body, 'topic=dependencies') | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh issue edit -R "${{ github.repository }}" \ | ||
"${{ github.event.issue.number }}" \ | ||
--add-label $GH_LABEL | ||
update-from-issue: | ||
name: Check for updates | ||
needs: issue-event | ||
if: >- | ||
github.event.action == 'closed' && | ||
github.event.issue.user.login == needs.issue-event.outputs.bot-user && | ||
contains(github.event.issue.body, 'topic=dependencies') | ||
uses: ./.github/workflows/update-check.yml | ||
secrets: inherit |
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,35 @@ | ||
# Privileged workflow to process PR events | ||
|
||
name: PR event | ||
|
||
on: | ||
pull_request_target: | ||
branches: [main] | ||
types: [opened] | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
env: | ||
GH_LABEL: update | ||
|
||
jobs: | ||
pr-event: | ||
name: Process | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get bot username | ||
id: bot-user | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.OPENSLIDE_BOT_TOKEN }} | ||
run: echo "username=$(gh api user -q .login)" >> $GITHUB_OUTPUT | ||
- name: Label dependency PR | ||
if: >- | ||
github.actor == steps.bot-user.outputs.username && | ||
contains(github.event.pull_request.body, 'topic=dependencies') | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh pr edit -R "${{ github.repository }}" \ | ||
"${{ github.event.number }}" \ | ||
--add-label $GH_LABEL |
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
This file was deleted.
Oops, something went wrong.