Skip to content

Commit

Permalink
[IDWA-28] Close issue when project is "Done" (#39)
Browse files Browse the repository at this point in the history
* [IDWA-28] Close issue when project is Done

* [IDWA-28] Close issue when project is Done

* put back PAT instead of default token

* test with default token again

* back to PAT

* see what the despatch

* rm push and add step for OCR team

* test without open statues option

* test with todo

* test with in progress

* test with review

* test with done

* rm open_statuses option

* fix typo in comment

---------

Co-authored-by: Derek Dombek <derek.a.dombek.com>
  • Loading branch information
derekadombek authored Mar 27, 2024
1 parent 880895c commit 3110fcb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/issues-assign-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/[email protected]
with:
project-url: https://github.com/orgs/CDCgov/projects/34
github-token: ${{ secrets.ASSIGN_ISSUES_TO_PROJECTS }} #this custom action doesn't allow the default GITHUB_TOKEN, it requires us to use a PAT as the secret unfortunetly..
github-token: ${{ secrets.ASSIGN_ISSUES_TO_PROJECTS }} #this custom action doesn't allow the default GITHUB_TOKEN, it requires us to use a PAT as the secret unfortunately..
add-to-ocr-project:
if: contains(github.event.issue.labels.*.name, 'OCR')
name: Add issue to the ocr project
Expand All @@ -21,4 +21,4 @@ jobs:
- uses: actions/[email protected]
with:
project-url: https://github.com/orgs/CDCgov/projects/33
github-token: ${{ secrets.ASSIGN_ISSUES_TO_PROJECTS }} #this custom action doesn't allow the default GITHUB_TOKEN, it requires us to use a PAT as the secret unfortunetly..
github-token: ${{ secrets.ASSIGN_ISSUES_TO_PROJECTS }} #this custom action doesn't allow the default GITHUB_TOKEN, it requires us to use a PAT as the secret unfortunately..
25 changes: 25 additions & 0 deletions .github/workflows/issues-close-project-done.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Project Issue State Sync
on:
schedule:
# Runs on minute 0 every 2 hours
- cron: 0 0-23/2 * * *
workflow_dispatch:
# Manual trigger
jobs:
issue-state-sync:
runs-on: ubuntu-latest
steps:
- name: Sync issues for dedupe
uses: dasmerlon/project-issue-state-sync@v2
with:
github_token: ${{ secrets.CLOSE_ISSUE_WHEN_PROJECT_DONE }} #this custom action doesn't allow the default GITHUB_TOKEN, it requires us to use a PAT as the secret unfortunately..
owner: CDCgov
project_number: 34
closed_statuses: Done
- name: Sync issues for OCR
uses: dasmerlon/project-issue-state-sync@v2
with:
github_token: ${{ secrets.CLOSE_ISSUE_WHEN_PROJECT_DONE }} #this custom action doesn't allow the default GITHUB_TOKEN, it requires us to use a PAT as the secret unfortunately..
owner: CDCgov
project_number: 33
closed_statuses: Done

0 comments on commit 3110fcb

Please sign in to comment.