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
18 changes: 18 additions & 0 deletions .github/workflows/changelog-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Changelog Preview
on:
pull_request:
types:
- opened
- synchronize
- reopened
- edited
- labeled
- unlabeled
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 @@ -4,12 +4,16 @@ on:
workflow_dispatch:
inputs:
version:
description: Version to release
required: true
description: Version to release (or "auto")
required: false
Comment on lines 6 to +8
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: When the version input is omitted in the release workflow, an empty string is passed to the craft action, which may not be handled correctly.
Severity: HIGH

Suggested Fix

To ensure the intended behavior, explicitly default the version input to 'auto' when it is not provided. Change the input to the craft action to version: ${{ github.event.inputs.version || 'auto' }}. This will correctly trigger the automatic version determination feature.

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#L6-L8

Potential issue: The `version` input for the `workflow_dispatch` trigger was changed to
be optional. When a user triggers this workflow without providing a version, GitHub
Actions will pass an empty string `''` as the value for `github.event.inputs.version`.
This empty string is then passed directly to the `getsentry/craft` action. It is unclear
how the craft action handles an empty string for its `version` parameter. This could
lead to a failure in the release process if the action does not correctly interpret the
empty string as a request for automatic version determination, which is the intended
behavior when no version is specified.

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

force:
description: Force a release even when there are release-blockers (optional)
required: false

permissions:
contents: write
pull-requests: write

jobs:
release:
runs-on: ubuntu-latest
Expand All @@ -28,7 +32,7 @@ jobs:
fetch-depth: 0

- name: Prepare release
uses: getsentry/action-prepare-release@v1
uses: getsentry/craft@c6e2f04939b6ee67030588afbb5af76b127d8203 # v2
env:
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
with:
Expand Down
Loading