-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5285c9b
commit ed605c8
Showing
1 changed file
with
28 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,28 @@ | ||
name: Update Project Status on CSV Comment | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
update-project-status: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check if Comment Contains CSV Attachment | ||
id: check_csv | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const commentBody = context.payload.comment.body; | ||
const csvPattern = /\.(csv|zip)\b/; | ||
return csvPattern.test(commentBody); | ||
- name: Update Project Item Status to "Under Review" | ||
if: steps.check_csv.outputs.result == 'true' | ||
uses: nipe0324/[email protected] | ||
with: | ||
project-url: https://github.com/users/ben-domingue/projects/1 | ||
github-token: ${{ secrets.PROJECTS_TEST }} | ||
field-name: Status | ||
field-value: Under Review |