Skip to content

Commit

Permalink
PR Types
Browse files Browse the repository at this point in the history
  • Loading branch information
epompeii committed Feb 3, 2024
1 parent d8c0cc2 commit 6c79134
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/pr_and_cache_benchmarks.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Run and Cache Benchmarks

on: pull_request
on:
pull_request:
types: [opened, reopened, synchronize]

jobs:
benchmark:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pr_benchmarks.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
on: pull_request
on:
pull_request:
types: [opened, reopened, synchronize]

jobs:
benchmark_pr_with_bencher:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/pr_target_benchmarks.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
on: pull_request_target
on:
pull_request_target:
types: [opened, reopened, synchronize]

jobs:
fork_pr_requires_review:
Expand All @@ -25,7 +27,7 @@ jobs:
- name: Track Benchmarks with Bencher
run: |
bencher run \
--if-branch '${{ github.head_ref }}' \
--if-branch '${{ github.event.number }}/merge' \
--else-if-branch '${{ github.base_ref }}' \
--else-if-branch main \
--github-actions "${{ secrets.GITHUB_TOKEN }}" \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr_track_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
script: |
let fs = require('fs');
let prEvent = JSON.parse(fs.readFileSync(process.env.PR_EVENT, {encoding: 'utf8'}));
core.exportVariable("PR_HEAD", prEvent.pull_request.head.ref);
core.exportVariable("PR_HEAD", `${prEvent.number}/merge`);
core.exportVariable("PR_BASE", prEvent.pull_request.base.ref);
core.exportVariable("PR_DEFAULT", prEvent.pull_request.base.repo.default_branch);
core.exportVariable("PR_NUMBER", prEvent.number);
Expand Down

0 comments on commit 6c79134

Please sign in to comment.