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 8b03e7a
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
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 }}"
}
4 changes: 2 additions & 2 deletions .github/workflows/labels-changed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ on:
types: [labeled]

jobs:
init:
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
- 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:
init:
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 8b03e7a

Please sign in to comment.