Lorem ipsum #14
This file contains hidden or 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
| name: Project | |
| on: | |
| issues: | |
| types: | |
| - closed | |
| - opened | |
| - reopened | |
| pull_request: | |
| types: | |
| - closed | |
| - opened | |
| - reopened | |
| - ready_for_review | |
| jobs: | |
| handle-issue-closed: | |
| if: github.event_name == 'issues' && github.event.action == 'closed' | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - id: status | |
| name: Set the status based on the close reason | |
| run: | | |
| case "${{ github.event.issue.state_reason }}" in | |
| "completed") | |
| echo "status=Done" >> $GITHUB_OUTPUT | |
| ;; | |
| "duplicate") | |
| echo "status=Duplicate" >> $GITHUB_OUTPUT | |
| ;; | |
| *) | |
| echo "status=Canceled" >> $GITHUB_OUTPUT | |
| ;; | |
| esac3 | |
| - name: Update project | |
| uses: nipe0324/update-project-v2-item-field@v2.0.2 | |
| with: | |
| field-name: Status | |
| field-value: ${{ steps.status.outputs.status }} | |
| github-token: ${{ secrets.GH_TOKEN }} | |
| project-url: https://github.com/orgs/spear-ai/projects/41 | |
| handle-issue-opened: | |
| if: github.event_name == 'issues' && (github.event.action == 'opened' || github.event.action == 'reopened') | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| actions: read | |
| contents: read | |
| issues: write | |
| steps: | |
| - name: Update project | |
| uses: nipe0324/update-project-v2-item-field@v2.0.2 | |
| with: | |
| field-name: Status | |
| field-value: Backlog | |
| github-token: ${{ secrets.GH_TOKEN }} | |
| project-url: https://github.com/orgs/spear-ai/projects/41 | |
| - id: parsed-issue | |
| name: Parse issue | |
| uses: stefanbuck/github-issue-parser@v3.2.1 | |
| with: | |
| template-path: .github/ISSUE_TEMPLATE/feature.yml | |
| - name: Set labels based on severity field | |
| uses: redhat-plumbers-in-action/advanced-issue-labeler@v3.2.2 | |
| with: | |
| issue-form: ${{ steps.parsed-issue.outputs.jsonString }} | |
| token: ${{ secrets.GH_TOKEN }} | |
| handle-review: | |
| if: github.event_name == 'pull_request' && github.event.action == 'ready_for_review' | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Update project | |
| uses: nipe0324/update-project-v2-item-field@v2.0.2 | |
| with: | |
| field-name: Status | |
| field-value: In review | |
| github-token: ${{ secrets.GH_TOKEN }} | |
| project-url: https://github.com/orgs/spear-ai/projects/41 | |
| permissions: | |
| contents: read |