Skip to content

Commit

Permalink
Added ability to run status check
Browse files Browse the repository at this point in the history
This can be done with using the command '/status check',
assigning a user and unassigning a user.
  • Loading branch information
AdmiringWorm committed Jun 25, 2020
1 parent f813cdc commit 003fa84
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/handle-comments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,21 @@ jobs:
} else {
Test-NewIssue -issueNumber ${{ github.event.issue.number }} -repository "${{ github.event.repository.full_name }}"
}
status_recheck:
if: ${{ (needs.comments.outputs.success == 'True' || startsWith(github.event.comment.body, '/status check') && github.event.issue.state == 'open' }}
runs-on: ubuntu-latest
needs: comments
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/[email protected]
- name: Pull latest commits
run: git pull
- name: Run status check on Issue
run: |
Import-Module "${{ github.workspace }}\scripts\validation.psm1"
if ("${{ github.event.comment.body }}" -match "^/status check") {
Update-Issue -issueNumber ${{ github.event.issue.number }} -repository "${{ github.event.repository.full_name }}" -commentUser "${{ github.event.sender.login }}"
} else {
Update-Issue -issueNumber ${{ github.event.issue.number }} -repository "${{ github.event.repository.full_name }}"
}
2 changes: 1 addition & 1 deletion .github/workflows/labels-changed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- uses: actions/[email protected]
- name: Status Initialization
- name: Status Updating
run: |
Import-Module "${{ github.workspace }}/scripts/validation.psm1"
$arguments = @{
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/user-assigned.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Status Checks

on:
issues:
types: [assigned, unassigned]

jobs:
update:
if: ${{ contains(github.event.issue.labels.*.name, format('{0}:{1}', 'Status', ' Available For Maintainer(s)')) }}
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/[email protected]
- name: Status Initialization
run: |
Import-Module "${{ github.workspace }}/scripts/validation.psm1"
$arguments = @{
issueNumber = ${{ github.event.issue.number }}
repository = "${{ github.event.repository.full_name }}"
}
Update-IssueStatus @arguments
shell: pwsh

0 comments on commit 003fa84

Please sign in to comment.