diff --git a/.github/workflows/codeowners-enforcement.yml b/.github/workflows/codeowners-enforcement.yml index e5cd135..1f79522 100644 --- a/.github/workflows/codeowners-enforcement.yml +++ b/.github/workflows/codeowners-enforcement.yml @@ -2,9 +2,11 @@ name: "CodeOwners Enforcement" on: pull_request: + merge_group: jobs: enforce-codeowners: + if: ${{ github.event_name == 'pull_request' }} name: "Enforce" runs-on: ubuntu-latest permissions: @@ -16,4 +18,3 @@ jobs: uses: smartcontractkit/.github/actions/codeowners-sanity-check@codeowners-sanity-check/v1 env: GITHUB_TOKEN: ${{ github.token }} - diff --git a/.github/workflows/codeowners-validation.yml b/.github/workflows/codeowners-validation.yml index 0b8908e..a525fe2 100644 --- a/.github/workflows/codeowners-validation.yml +++ b/.github/workflows/codeowners-validation.yml @@ -2,12 +2,14 @@ name: "CodeOwners Validation" on: pull_request: + merge_group: jobs: # This job is necessary because the org-wide rulesets don't support event-based path filtering. # (https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#running-your-pull_request-workflow-based-on-files-changed-in-a-pull-request) # We include this job to filter the paths manually. filter-changes: + if: ${{ github.event_name == 'pull_request' }} name: Filter changes runs-on: ubuntu-latest permissions: @@ -31,7 +33,7 @@ jobs: permissions: contents: read id-token: write - if: ${{ needs.filter-changes.outputs.codeowners == 'true' }} + if: ${{ github.event_name == 'pull_request' && needs.filter-changes.outputs.codeowners == 'true' }} steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/pr-draft-nudge.yml b/.github/workflows/pr-draft-nudge.yml index b41a2d1..bd21a06 100644 --- a/.github/workflows/pr-draft-nudge.yml +++ b/.github/workflows/pr-draft-nudge.yml @@ -12,6 +12,7 @@ name: PR Draft Nudge on: pull_request: types: [opened] + merge_group: permissions: {} @@ -20,6 +21,7 @@ env: jobs: pr-draft-nudge: + if: ${{ github.event_name == 'pull_request' }} name: PR Draft Nudge runs-on: ubuntu-latest timeout-minutes: 10