From 972aab32642cc442ee9af40575c9e0e5a3af22ba Mon Sep 17 00:00:00 2001 From: Manu Lorente Date: Fri, 19 Jun 2026 20:52:49 -0600 Subject: [PATCH] =?UTF-8?q?fix(ci):=20add=20PRs=20to=20bit=C3=A1cora=20boa?= =?UTF-8?q?rd=20via=20gh=20CLI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/add-to-project.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml index a99c0eb..6c83043 100644 --- a/.github/workflows/add-to-project.yml +++ b/.github/workflows/add-to-project.yml @@ -4,6 +4,9 @@ name: Add to bitácora # (GitHub Project #1). Pairs with bitacora-status.yml (which flips an assigned # issue to In Progress). Canonical copy for the OPS-002 (#258) multi-repo rollout. +# Note: actions/add-to-project@v1 only supports issues, not PRs. We use it for +# issues and fall back to gh project item-add for PRs. + on: issues: types: [opened, reopened] @@ -18,8 +21,18 @@ jobs: if: github.event_name == 'issues' || github.event.pull_request.head.repo.fork == false runs-on: ubuntu-latest steps: - # Pin a real release: actions/add-to-project@v1 does NOT resolve (no floating v1 tag). - - uses: actions/add-to-project@v1.0.2 + # Issues: use the official action (works fine for issues) + - name: Add issue to project + if: github.event_name == 'issues' + uses: actions/add-to-project@v1.0.2 with: project-url: https://github.com/users/mlorentedev/projects/1 github-token: ${{ secrets.BITACORA_PAT }} + + # PRs: use gh CLI directly (the action doesn't support PRs) + - name: Add PR to project + if: github.event_name == 'pull_request' + run: | + gh project item-add 1 --owner mlorentedev --url "${{ github.event.pull_request.html_url }}" + env: + GH_TOKEN: ${{ secrets.BITACORA_PAT }}