diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index c29d4c3..47d8cae 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -24,7 +24,7 @@ concurrency: ${{ ( inputs.publication || github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' || github.event_name == 'workflow_run' && github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' || - github.event_name == 'pull_request_target' && github.event.pull_request.user.login != 'dependabot[bot]' && + github.event_name == 'pull_request_target' && (github.event.action != 'closed' || !github.event.pull_request.merged) && (!(github.event.action == 'labeled' || github.event.action == 'unlabeled') || github.event.label.name == 'benchmarks: skip') && (github.event.action != 'edited' || github.event.changes.base) @@ -36,7 +36,7 @@ jobs: if: >- inputs.publication || github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' || github.event_name == 'workflow_run' && github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' || - github.event_name == 'pull_request_target' && github.event.pull_request.user.login != 'dependabot[bot]' && + github.event_name == 'pull_request_target' && (github.event.action != 'closed' || !github.event.pull_request.merged) && (!(github.event.action == 'labeled' || github.event.action == 'unlabeled') || github.event.label.name == 'benchmarks: skip') && (github.event.action != 'edited' || github.event.changes.base) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 220b351..e5d5653 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -15,7 +15,7 @@ concurrency: jobs: revision: - if: ${{ github.event.pull_request.draft == false && github.event.pull_request.user.login != 'dependabot[bot]' }} + if: ${{ github.event.pull_request.draft == false }} runs-on: ubuntu-latest timeout-minutes: 10 outputs: diff --git a/scripts/publication.test.ts b/scripts/publication.test.ts index 93ce52c..cd82f7f 100644 --- a/scripts/publication.test.ts +++ b/scripts/publication.test.ts @@ -424,7 +424,7 @@ test('workflows must match trusted main', async context => { } }) -test('Pages verifies previews with revision and build jobs and excludes draft and Dependabot PRs', async context => { +test('Pages verifies previews with revision and build jobs and excludes draft PRs', async context => { const temporary = mkdtempSync(resolve(tmpdir(), 'benchmark-preview-policy-')) const previousDirectory = process.cwd() const previousArguments = process.argv @@ -443,7 +443,7 @@ test('Pages verifies previews with revision and build jobs and excludes draft an process.env.GITHUB_REPOSITORY = repository process.env.GH_TOKEN = 'fixture-token' const pr = { - number: 7, draft: false, user: { login: 'contributor' }, labels: [], + number: 7, draft: false, user: { login: 'dependabot[bot]' }, labels: [], head: { sha: 'a'.repeat(40), repo: { full_name: repository } }, base: { sha: 'b'.repeat(40), ref: 'main', repo: { full_name: repository } }, } @@ -470,7 +470,7 @@ test('Pages verifies previews with revision and build jobs and excludes draft an const responses: Record = { 'git/ref/heads/main': { object: { sha: pr.base.sha } }, 'git/matching-refs/heads/data': [], - pulls: [pr, { ...pr, number: 8, user: { login: 'dependabot[bot]' } }, { ...pr, number: 9, draft: true }], + pulls: [pr, { ...pr, number: 9, draft: true }], 'pulls/7': pr, 'actions/runs/123': run, 'actions/artifacts/456': artifact, diff --git a/scripts/site-ci.ts b/scripts/site-ci.ts index ecfcc2c..0cd9b52 100644 --- a/scripts/site-ci.ts +++ b/scripts/site-ci.ts @@ -20,7 +20,7 @@ async function inputs() { const main = await github('git/ref/heads/main') const refs = await github('git/matching-refs/heads/data') const data = refs.find((entry: { ref: string }) => entry.ref === 'refs/heads/data')?.object.sha ?? null - const prs = (await pages('pulls?state=open&base=main')).filter(pr => !pr.draft && pr.user?.login !== 'dependabot[bot]') + const prs = (await pages('pulls?state=open&base=main')).filter(pr => !pr.draft) return { prs, snapshot: {