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
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
workflow_dispatch:
inputs:
version:
description: Version to release
required: true
description: Version to release (or "auto")
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this mean we need to type literal "auto" in the input? What version do we get then?

required: false
Comment on lines +10 to +11
Copy link

Choose a reason for hiding this comment

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

Bug: The version input in the release workflow is optional but lacks a default value. Omitting it passes an empty string, not "auto", likely causing the release to fail.
Severity: HIGH

Suggested Fix

Add default: 'auto' to the version input in the .github/workflows/release.yml file. This ensures that when the workflow is triggered without a specified version, the craft action correctly receives "auto" for automatic version determination.

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#L10-L11

Potential issue: The `release.yml` workflow's `version` input was changed to be optional
(`required: false`) without a `default` value. When a user triggers this
`workflow_dispatch` without providing a version, GitHub Actions will pass an empty
string (`''`) to the craft action. However, the input's description was updated to
`Version to release (or "auto")`, implying that omitting the version should default to
automatic versioning. The craft action expects the literal string `"auto"` for this
behavior, not an empty string. This discrepancy will likely cause the release process to
fail when a version is not manually specified.

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

force:
description: Force a release even when there are release-blockers (optional)
required: false
Expand All @@ -31,7 +31,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