diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 556ec7db..63c107e7 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -17,7 +17,9 @@ permissions: jobs: backport-on-push: - if: github.event_name == 'push' + if: > + github.repository == 'openwisp/openwisp-users' && + github.event_name == 'push' uses: openwisp/openwisp-utils/.github/workflows/reusable-backport.yml@master with: commit_sha: ${{ github.sha }} @@ -27,6 +29,7 @@ jobs: backport-on-comment: if: > + github.repository == 'openwisp/openwisp-users' && github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.issue.pull_request.merged_at != null && diff --git a/.github/workflows/bot-autoassign-issue.yml b/.github/workflows/bot-autoassign-issue.yml index 754e3519..a02df370 100644 --- a/.github/workflows/bot-autoassign-issue.yml +++ b/.github/workflows/bot-autoassign-issue.yml @@ -10,7 +10,9 @@ concurrency: cancel-in-progress: true jobs: respond-to-assign-request: - if: github.event.issue.pull_request == null + if: > + github.repository == 'openwisp/openwisp-users' && + github.event.issue.pull_request == null uses: openwisp/openwisp-utils/.github/workflows/reusable-bot-autoassign.yml@master with: bot_command: issue_assignment diff --git a/.github/workflows/bot-autoassign-pr-issue-link.yml b/.github/workflows/bot-autoassign-pr-issue-link.yml index dcc1d50d..d66be1c0 100644 --- a/.github/workflows/bot-autoassign-pr-issue-link.yml +++ b/.github/workflows/bot-autoassign-pr-issue-link.yml @@ -11,7 +11,9 @@ concurrency: cancel-in-progress: true jobs: auto-assign-issue: - if: github.event.action != 'closed' || github.event.pull_request.merged == false + if: > + github.repository == 'openwisp/openwisp-users' && + (github.event.action != 'closed' || github.event.pull_request.merged == false) uses: openwisp/openwisp-utils/.github/workflows/reusable-bot-autoassign.yml@master with: bot_command: issue_assignment diff --git a/.github/workflows/bot-autoassign-pr-reopen.yml b/.github/workflows/bot-autoassign-pr-reopen.yml index 4ee94302..a38f4cb0 100644 --- a/.github/workflows/bot-autoassign-pr-reopen.yml +++ b/.github/workflows/bot-autoassign-pr-reopen.yml @@ -13,7 +13,10 @@ concurrency: cancel-in-progress: true jobs: reassign-on-reopen: - if: github.event_name == 'pull_request_target' && github.event.action == 'reopened' + if: > + github.repository == 'openwisp/openwisp-users' && + github.event_name == 'pull_request_target' && + github.event.action == 'reopened' uses: openwisp/openwisp-utils/.github/workflows/reusable-bot-autoassign.yml@master with: bot_command: pr_reopen @@ -21,7 +24,11 @@ jobs: OPENWISP_BOT_APP_ID: ${{ secrets.OPENWISP_BOT_APP_ID }} OPENWISP_BOT_PRIVATE_KEY: ${{ secrets.OPENWISP_BOT_PRIVATE_KEY }} handle-pr-activity: - if: github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.issue.user.login == github.event.comment.user.login + if: > + github.repository == 'openwisp/openwisp-users' && + github.event_name == 'issue_comment' && + github.event.issue.pull_request && + github.event.issue.user.login == github.event.comment.user.login uses: openwisp/openwisp-utils/.github/workflows/reusable-bot-autoassign.yml@master with: bot_command: pr_reopen diff --git a/.github/workflows/bot-autoassign-stale-pr.yml b/.github/workflows/bot-autoassign-stale-pr.yml index 80e42048..c4c0a37a 100644 --- a/.github/workflows/bot-autoassign-stale-pr.yml +++ b/.github/workflows/bot-autoassign-stale-pr.yml @@ -12,6 +12,7 @@ concurrency: cancel-in-progress: false jobs: manage-stale-prs-python: + if: github.repository == 'openwisp/openwisp-users' uses: openwisp/openwisp-utils/.github/workflows/reusable-bot-autoassign.yml@master with: bot_command: stale_pr diff --git a/.github/workflows/bot-changelog-runner.yml b/.github/workflows/bot-changelog-runner.yml index 218a7cce..2d84914c 100644 --- a/.github/workflows/bot-changelog-runner.yml +++ b/.github/workflows/bot-changelog-runner.yml @@ -12,7 +12,9 @@ permissions: jobs: fetch-metadata: runs-on: ubuntu-latest - if: github.event.workflow_run.conclusion == 'success' + if: > + github.repository == 'openwisp/openwisp-users' && + github.event.workflow_run.conclusion == 'success' permissions: actions: read outputs: @@ -40,7 +42,9 @@ jobs: changelog: needs: fetch-metadata - if: needs.fetch-metadata.outputs.pr_number != '' + if: > + github.repository == 'openwisp/openwisp-users' && + needs.fetch-metadata.outputs.pr_number != '' permissions: contents: read pull-requests: write diff --git a/.github/workflows/bot-changelog-trigger.yml b/.github/workflows/bot-changelog-trigger.yml index 0c67145c..565f280c 100644 --- a/.github/workflows/bot-changelog-trigger.yml +++ b/.github/workflows/bot-changelog-trigger.yml @@ -8,7 +8,8 @@ permissions: {} jobs: check: - if: | + if: > + github.repository == 'openwisp/openwisp-users' && github.event.review.state == 'approved' && (github.event.review.author_association == 'OWNER' || github.event.review.author_association == 'MEMBER' || diff --git a/.github/workflows/bot-ci-failure.yml b/.github/workflows/bot-ci-failure.yml index daa3d848..4465b82d 100644 --- a/.github/workflows/bot-ci-failure.yml +++ b/.github/workflows/bot-ci-failure.yml @@ -18,7 +18,10 @@ concurrency: jobs: find-pr: runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.event == 'pull_request' }} + if: > + github.repository == 'openwisp/openwisp-users' && + github.event.workflow_run.conclusion == 'failure' && + github.event.workflow_run.event == 'pull_request' outputs: pr_number: ${{ steps.pr.outputs.number }} pr_author: ${{ steps.pr.outputs.author }} diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index f912644a..7d6a4ffc 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -9,6 +9,7 @@ permissions: jobs: pypi-publish: + if: github.repository == 'openwisp/openwisp-users' name: Release Python Package on Pypi.org runs-on: ubuntu-latest environment: diff --git a/.github/workflows/version-branch.yml b/.github/workflows/version-branch.yml index 20206be8..c3e1918f 100644 --- a/.github/workflows/version-branch.yml +++ b/.github/workflows/version-branch.yml @@ -7,6 +7,7 @@ on: jobs: version-branch: + if: github.repository == 'openwisp/openwisp-users' uses: openwisp/openwisp-utils/.github/workflows/reusable-version-branch.yml@master with: module_name: openwisp_users