Skip to content

Commit 3a5ce46

Browse files
authored
Remove unnecessary hardcoding of ref (#617)
I'm copying the setup of one of these actions to another repo, and the hardcoding of `ref` surprised me... these should be the same as the defaault behavior. I checked with Barry who originally committed these files, and he didn't remember why... possibly he'd hardcoded them when testing the action and forgot to remove them. So let's pull them out to remove confusion.
1 parent 798f45c commit 3a5ce46

File tree

4 files changed

+1
-11
lines changed

4 files changed

+1
-11
lines changed

.github/workflows/check-uncommitted.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@v4
17-
with:
18-
ref: ${{ github.event.pull_request.head.sha }}
1917

2018
- name: Setup Node.js
2119
uses: actions/setup-node@v4
@@ -36,8 +34,6 @@ jobs:
3634

3735
steps:
3836
- uses: actions/checkout@v4
39-
with:
40-
ref: ${{ github.event.pull_request.head.sha }}
4137

4238
- name: Compare the expected vs actual files
4339
run: test -z "$(git status --porcelain)"

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
17-
with:
18-
ref: ${{ github.event.pull_request.head.sha }}
1917

2018
- name: Setup Node.js
2119
uses: actions/setup-node@v4

.github/workflows/dependabot-auto-merge.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ jobs:
1414
app-id: ${{ secrets.FETCH_METADATA_ACTION_AUTOMATION_APP_ID }}
1515
private-key: ${{ secrets.FETCH_METADATA_ACTION_AUTOMATION_PRIVATE_KEY }}
1616

17-
- name: Check out code
18-
uses: actions/checkout@v4
17+
- uses: actions/checkout@v4
1918

2019
- name: Auto-merge
2120
run: gh pr merge --auto --merge '${{ github.event.pull_request.html_url }}'

.github/workflows/dependabot-build.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ jobs:
1717
package-ecosystem: ${{ steps.dependabot-metadata.outputs.package-ecosystem }}
1818
steps:
1919
- uses: actions/checkout@v4
20-
with:
21-
ref: ${{ github.event.pull_request.head.ref }}
2220

2321
- name: Fetch dependabot metadata
2422
id: dependabot-metadata
@@ -40,7 +38,6 @@ jobs:
4038

4139
- uses: actions/checkout@v4
4240
with:
43-
ref: ${{ github.event.pull_request.head.ref }}
4441
# Check out using an app token so any pushed changes will trigger checkruns
4542
token: ${{ steps.generate_token.outputs.token }}
4643

0 commit comments

Comments
 (0)