diff --git a/.forgejo/workflows/issue-labels.yml b/.forgejo/workflows/issue-labels.yml index 0424304b50..886d0640a0 100644 --- a/.forgejo/workflows/issue-labels.yml +++ b/.forgejo/workflows/issue-labels.yml @@ -1,14 +1,52 @@ # Copyright 2024 The Forgejo Authors # SPDX-License-Identifier: MIT # +# To modify the pull_request_target jobs: +# +# - push it to the wip-ci-issue-labels branch on the forgejo repository +# otherwise it will not have access to the required secrets. +# +# - once it works, open a pull request for the sake of keeping track +# of the change even if the PR won't run it because it will use +# whatever is in the default branch instead +# +# - after it is merged, double check it works by changing the labels +# to trigger the job. +# name: issue-labels on: + push: + branches: + - 'wip-ci-issue-labels' + pull_request_target: types: + - closed + - edited - labeled + - synchronize + + pull_request: + types: + - edited + - labeled + - opened + - synchronize jobs: + info: + if: vars.ROLE == 'forgejo-coding' + runs-on: docker + container: + image: code.forgejo.org/oci/node:20-bookworm + steps: + - name: Debug info + run: | + cat <<'EOF' + ${{ toJSON(github) }} + EOF + end-to-end: if: > vars.ROLE == 'forgejo-coding' && @@ -51,18 +89,7 @@ jobs: destination-token: ${{ secrets.END_TO_END_CASCADING_PR_DESTINATION }} close-merge: true update: .forgejo/cascading-pr-end-to-end -# Copyright 2024 The Forgejo Authors -# SPDX-License-Identifier: MIT -# -name: issue-labels -on: - pull_request_target: - types: - - closed - - labeled - -jobs: backporting: if: > vars.ROLE == 'forgejo-coding' && @@ -95,19 +122,7 @@ jobs: enable-err-notification: true git-user: forgejo-backport-action git-email: forgejo-backport-action@noreply.codeberg.org -# Copyright 2024 The Forgejo Authors -# SPDX-License-Identifier: MIT -name: issue-labels - -on: - pull_request: - types: - - labeled - - edited - - opened - -jobs: merge-conditions: if: > vars.ROLE == 'forgejo-coding' && @@ -147,16 +162,7 @@ jobs: echo "Manual test label is set. The PR description needs to contain test steps introduced by a heading like:" echo "# Testing" exit 1 -name: issue-labels -on: - pull_request_target: - types: - - edited - - synchronize - - labeled - -jobs: release-notes: if: > vars.ROLE == 'forgejo-coding' &&