Barazo AppView backend barazo.forum

Merge pull request #176 from singi-labs/fix/standardize-auto-add-workflow

fix: standardize auto-add workflow, use PROJECT_BOARD_TOKEN

authored by

Guido X Jansen and committed by
GitHub
f52cd55b a6e1900b

+19 -2
+19 -2
.github/workflows/auto-add-to-project.yml
··· 7 7 jobs: 8 8 add-to-project: 9 9 runs-on: ubuntu-latest 10 + # Skip bot-created issues (Dependabot, GitHub Actions, etc.) 11 + if: github.actor != 'dependabot[bot]' && github.actor != 'github-actions[bot]' 10 12 steps: 11 - - uses: actions/add-to-project@v1.0.2 13 + # Wait 10s so rapid create-then-delete cycles settle 14 + - name: Wait for issue to stabilize 15 + run: sleep 10 16 + 17 + - name: Verify issue still exists 18 + id: check 19 + run: | 20 + STATUS=$(gh api repos/${{ github.repository }}/issues/${{ github.event.issue.number }} \ 21 + --jq '.state' 2>/dev/null) || STATUS="deleted" 22 + echo "status=$STATUS" >> "$GITHUB_OUTPUT" 23 + env: 24 + GH_TOKEN: ${{ github.token }} 25 + 26 + - name: Add to project 27 + if: steps.check.outputs.status == 'open' 28 + uses: actions/add-to-project@v1.0.2 12 29 with: 13 30 project-url: https://github.com/orgs/singi-labs/projects/2 14 - github-token: ${{ secrets.PROJECT_TOKEN }} 31 + github-token: ${{ secrets.PROJECT_BOARD_TOKEN }}