From e9a3306f6eef0a20cd225581b3fbd88da87f8ae4 Mon Sep 17 00:00:00 2001 From: Twenty Panda Date: Wed, 24 Jul 2024 17:54:48 +0200 Subject: [PATCH] fix(release-notes-assistant): do not trigger on open Forgejo sets a label and will notify this when opening the pull request. Triggering when it opens will make two workflows for the same SHA. Re-opening is a border case that is not needed. --- .forgejo/workflows/release-notes-assistant.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/release-notes-assistant.yml b/.forgejo/workflows/release-notes-assistant.yml index 84ed067845..f55bebd0c8 100644 --- a/.forgejo/workflows/release-notes-assistant.yml +++ b/.forgejo/workflows/release-notes-assistant.yml @@ -1,8 +1,6 @@ on: pull_request_target: types: - - opened - - reopened - edited - synchronize - labeled @@ -16,6 +14,15 @@ jobs: steps: - uses: https://code.forgejo.org/actions/checkout@v3 + - name: event + run: | + cat <<'EOF' + ${{ toJSON(github.event.pull_request.labels.*.name) }} + EOF + cat <<'EOF' + ${{ toJSON(github.event) }} + EOF + - uses: https://code.forgejo.org/actions/setup-go@v4 with: go-version-file: "go.mod" @@ -29,4 +36,4 @@ jobs: - name: release-notes-assistant preview run: | - go run code.forgejo.org/forgejo/release-notes-assistant@v1.0.2 --config .release-notes-assistant.yaml --storage pr --storage-location ${{ github.event.pull_request.number }} --forgejo-url $GITHUB_SERVER_URL --repository $GITHUB_REPOSITORY --token ${{ secrets.RELEASE_NOTES_ASSISTANT_TOKEN }} preview ${{ github.event.pull_request.number }} + go run code.forgejo.org/forgejo/release-notes-assistant@v1.0.3 --config .release-notes-assistant.yaml --storage pr --storage-location ${{ github.event.pull_request.number }} --forgejo-url $GITHUB_SERVER_URL --repository $GITHUB_REPOSITORY --token ${{ secrets.RELEASE_NOTES_ASSISTANT_TOKEN }} preview ${{ github.event.pull_request.number }}