Skip to content

Commit

Permalink
ci: add action to update the project column of issues based on label …
Browse files Browse the repository at this point in the history
…assignment

Signed-off-by: Filipe Laíns <[email protected]>
  • Loading branch information
FFY00 authored and lwasser committed May 24, 2024
1 parent 54d8693 commit dcf5d50
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/update-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: update-project

on:
issues:
types:
- labeled

jobs:
update-issue-column:
runs-on: ubuntu-latest
permissions:
repository-projects: write
steps:
- uses: actions/checkout@v4
- name: Get column name
id: get-column-name
run: |
value=$(jq -r .labelToColumn.\"${{ github.event.label.name }}\" update-project.json)
echo "name=$value" >>$GITHUB_OUTPUT
echo "Column Name: $value"
- name: Move issue to column
if: ${{ steps.get-column-name.outputs.name != 'null' }}
uses: alex-page/[email protected]
with:
project: peer-review-status
column: ${{ steps.get-column-name.outputs.name }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
8 changes: 8 additions & 0 deletions update-project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"labelToColumn": {
"0/pre-review-checks": "pre-review-checks",
"1-editor-assigned": "under-review",
"6/pyOS-approved 🚀🚀🚀": "pyos-accepted",
"9/joss-approved": "joss-accepted"
}
}

0 comments on commit dcf5d50

Please sign in to comment.