Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/changelog-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Changelog Preview
on:
pull_request:
types:
- opened
- synchronize
- reopened
- edited
- labeled
permissions:
contents: write
pull-requests: write

jobs:
changelog-preview:
uses: getsentry/craft/.github/workflows/changelog-preview.yml@v2
secrets: inherit
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ on:
workflow_dispatch:
inputs:
version:
description: Version to release
required: true
description: Version to release (or "auto")
required: false
force:
description: Force a release even when there are release-blockers (optional)
required: false
merge_target:
description: Target branch to merge into. Uses the default branch as a fallback (optional)
required: false
permissions:
contents: write
pull-requests: write

jobs:
release:
runs-on: ubuntu-latest
Expand All @@ -27,7 +31,7 @@ jobs:
token: ${{ steps.token.outputs.token }}
fetch-depth: 0
- name: Prepare release
uses: getsentry/action-prepare-release@v1
uses: getsentry/craft@1c58bfd57bfd6a967b6f3fc92bead2c42ee698ce # v2
env:
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
with:
Comment on lines +34 to 37
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The release.yml workflow may fail during manual runs if a version is not specified, as the downstream pre-release script requires version arguments.
Severity: HIGH

Suggested Fix

The analysis could not confirm this bug. To be safe, either revert the version input to required: true or verify that the getsentry/craft action at commit 1c58bfd correctly handles an empty string for the version input by auto-detecting and passing the necessary arguments to the preReleaseCommand script.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: .github/workflows/release.yml#L34-L37

Potential issue: The `release.yml` workflow's `version` input was changed from required
to optional. When a user triggers this workflow manually via `workflow_dispatch` without
providing a version, GitHub Actions passes an empty string. This value is then used by
the `getsentry/craft` action. The action's configured `preReleaseCommand` is
`scripts/craft-pre-release.sh`, which uses `set -eux` and requires two version
arguments. If the `craft` action does not correctly handle the empty string input by
auto-detecting and passing the required versions, the script will fail, blocking the
release process.

Did we get this right? 👍 / 👎 to inform future reviews.

Expand Down
Loading