Skip to content

Commit 6ca145e

Browse files
vaindclaude
andcommitted
feat: include checkout in composite actions
Move initial checkout step into both updater and danger composite actions to match behavior of original reusable workflows. Remove redundant checkout steps from test workflows since actions now handle this internally. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 05c1ca4 commit 6ca145e

4 files changed

Lines changed: 13 additions & 7 deletions

File tree

.github/workflows/danger-workflow-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ jobs:
1515
test-danger-pr-analysis:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v4
19-
2018
- name: Run danger action
2119
id: danger
2220
uses: ./danger

.github/workflows/workflow-tests.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ jobs:
1414
test-updater-pr-creation:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v4
18-
1917
- name: Run updater action
2018
id: updater
2119
uses: ./updater
@@ -77,8 +75,6 @@ jobs:
7775
test-updater-no-changes:
7876
runs-on: macos-latest
7977
steps:
80-
- uses: actions/checkout@v4
81-
8278
- name: Run updater action
8379
id: updater
8480
uses: ./updater

danger/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: 'Danger JS'
22
description: 'Runs DangerJS with a pre-configured set of rules on a Pull Request'
33
author: 'Sentry'
44

5+
inputs:
6+
api-token:
7+
description: 'Token for the repo. Can be passed in using {{ secrets.GITHUB_TOKEN }}'
8+
required: false
9+
default: ${{ github.token }}
10+
511
outputs:
612
outcome:
713
description: 'Whether the Danger run finished successfully. Possible values are success, failure, cancelled, or skipped.'
@@ -13,6 +19,7 @@ runs:
1319
- name: Checkout repository
1420
uses: actions/checkout@v4
1521
with:
22+
token: ${{ inputs.api-token }}
1623
fetch-depth: 0
1724

1825
# Using a pre-built docker image in GitHub container registry instead of NPM to reduce possible attack vectors.

updater/action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ outputs:
4949
runs:
5050
using: 'composite'
5151
steps:
52+
- name: Checkout repository
53+
uses: actions/checkout@v4
54+
with:
55+
token: ${{ inputs.api-token }}
56+
5257
- name: Cancel Previous Runs
5358
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # Tag: 0.12.1
5459
with:
@@ -260,4 +265,4 @@ runs:
260265
261266
Auto-generated by a [dependency updater](https://github.com/getsentry/github-workflows/blob/main/updater/action.yml).
262267
${{ env.TARGET_CHANGELOG }}
263-
labels: dependencies
268+
labels: dependencies

0 commit comments

Comments
 (0)