Skip to content
Merged
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
4 changes: 4 additions & 0 deletions .github/workflows/changelog-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
pull_request:
types: [opened, synchronize, reopened, edited, labeled]

permissions:
contents: read
pull-requests: write

jobs:
changelog-preview:
uses: getsentry/craft/.github/workflows/changelog-preview.yml@v2
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ 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)
Expand All @@ -15,6 +15,10 @@ on:
(optional)
required: false
default: master
permissions:
contents: write
pull-requests: write

jobs:
release:
runs-on: ubuntu-latest
Expand All @@ -33,7 +37,7 @@ jobs:
- name: Install Dependencies
run: yarn install
- name: Prepare release
uses: getsentry/action-prepare-release@v1
uses: getsentry/craft@c6e2f04939b6ee67030588afbb5af76b127d8203 # v2
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 for the release workflow is optional. If not provided, it passes an empty string to the craft action, which may cause the workflow to fail.
Severity: MEDIUM

Suggested Fix

To prevent potential failures, provide a default value for the version input. For example, setting default: 'auto' would align with the input's description and ensure the craft action receives a valid, expected value when the input is not manually specified.

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#L40

Potential issue: In the `release.yml` workflow, the `version` input is now optional
(`required: false`) and lacks a default value. When this workflow is triggered manually
without providing a version, GitHub Actions passes an empty string (`''`) to the
`getsentry/craft` action. It is uncertain if the `craft` action is designed to handle an
empty string for its `version` parameter. If it is not, this could cause the release
process to fail when a version is not explicitly provided during a manual trigger.

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

Copy link
Member

Choose a reason for hiding this comment

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

@BYK I believe this is no longer required because the action would determine the release automatically, unless manually specified, correct?

env:
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
with:
Expand Down
Loading