Skip to content
Merged
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
23 changes: 11 additions & 12 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "Craft Prepare Release"
description: "Prepare a new release using Craft"
name: 'Craft Prepare Release'
description: 'Prepare a new release using Craft'

inputs:
version:
Expand All @@ -13,11 +13,11 @@ inputs:
force:
description: Force a release even when there are release-blockers
required: false
default: "false"
default: 'false'
blocker_label:
description: Label that blocks releases
required: false
default: "release-blocker"
default: 'release-blocker'
publish_repo:
description: Repository for publish issues (owner/repo format)
required: false
Expand All @@ -30,17 +30,17 @@ inputs:
path:
description: The path that Craft will run inside
required: false
default: "."
default: '.'
craft_config_from_merge_target:
description: Use the craft config from the merge target branch
required: false
default: "false"
default: 'false'
craft_version:
description: >
Version of Craft to install (tag or "latest").
Defaults to the action ref (e.g., "v2") if not specified.
required: false
default: ""
default: ''

outputs:
version:
Expand All @@ -63,7 +63,7 @@ outputs:
value: ${{ steps.request-publish.outputs.issue_url }}

runs:
using: "composite"
using: 'composite'
steps:
- id: killswitch
name: Check release blockers
Expand Down Expand Up @@ -204,10 +204,9 @@ runs:

title="publish: ${GITHUB_REPOSITORY}${SUBDIRECTORY}@${RESOLVED_VERSION}"

# Check if issue already exists
# GitHub only allows search with the "in" operator and this issue search can
# return non-exact matches. We extract the titles and check with grep -xF
existing_issue_url=$(gh -R "$PUBLISH_REPO" issue list -S "'$title' in:title" --json title,url -q ".[] | select(.title == \"$title\") | .url")
# Check if issue already exists by listing all open issues and filtering by exact title match.
# We avoid GitHub search API to bypass indexing delays and query syntax edge cases.
existing_issue_url=$(gh -R "$PUBLISH_REPO" issue list --json title,url | jq -r --arg t "$title" '.[] | select(.title == $t) | .url')
if [[ -n "$existing_issue_url" ]]; then
echo "There's already an open publish request, skipped issue creation."
echo "::notice::Existing publish request: ${existing_issue_url}"
Expand Down
Loading