Skip to content

GHA-283 Make new-version optional by default#143

Merged
nils-werner-sonarsource merged 2 commits intomasterfrom
alex/new-version-optional
Apr 28, 2026
Merged

GHA-283 Make new-version optional by default#143
nils-werner-sonarsource merged 2 commits intomasterfrom
alex/new-version-optional

Conversation

@alex-meseldzija-sonarsource
Copy link
Copy Markdown
Contributor

Part of

@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod Bot changed the title Make new-version optional by default GHA-283 Make new-version optional by default Apr 28, 2026
@hashicorp-vault-sonar-prod
Copy link
Copy Markdown

hashicorp-vault-sonar-prod Bot commented Apr 28, 2026

GHA-283

@sonar-review-alpha
Copy link
Copy Markdown

sonar-review-alpha Bot commented Apr 28, 2026

Summary

This PR makes the new-version input optional in the automated-release workflow (previously required). When new-version is not provided, the workflow will presumably use an alternative version-determination mechanism.

The PR also improves the notify-slack action to accept Slack channel IDs (e.g., C1234ABCDE, D…, G…) in addition to channel names. The regex validation ensures only valid Slack IDs are preserved as-is, while channel names are still prefixed with # as needed.

What reviewers should know

Start with: .github/workflows/automated-release.yml — the core change is one-line (required: truerequired: false). Check if there are any workflow steps that handle the case when new-version is not provided.

Watch for: The incomplete author description ("Part of ") suggests this might be part of a larger effort. Verify this change doesn't break existing callers that rely on the validation, and check if the workflow has a fallback mechanism when the version isn't manually specified.

notify-slack changes: The channel ID support is a pure enhancement. The regex ^[CDG][A-Z0-9]{8,10}$ follows Slack's actual ID format. Tests cover the boundary cases (8, 9, 10 suffix chars). Documentation was updated to reflect the new capability.


  • Generate Walkthrough
  • Generate Diagram

🗣️ Give feedback

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown

@sonar-review-alpha sonar-review-alpha Bot left a comment

Choose a reason for hiding this comment

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

The change is safe and intentional. When new-version is omitted, it flows as an empty string into create-jira-version's jira-new-version-name input, which already handles the empty case by auto-incrementing the minor version (see create-jira-version/action.yml lines 53–78). The summary step at line 542 already has the || 'not specified, autoincrement minor version' fallback, confirming this behavior was pre-planned.

One thing worth a quick confirmation: cloud-security-automated-release.yml (line 71–72) and abd-automated-release.yml (line 70–72) both still declare new-version as required: true. If the intent of the larger effort is to make auto-increment the default across all release workflows, those two will need the same update. If they're intentionally excluded for now that's fine, but it's worth noting the inconsistency so callers aren't surprised.

🗣️ Give feedback

Comment thread .github/workflows/automated-release.yml
Copy link
Copy Markdown
Contributor

@nils-werner-sonarsource nils-werner-sonarsource left a comment

Choose a reason for hiding this comment

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

LGTM!

@nils-werner-sonarsource nils-werner-sonarsource enabled auto-merge (squash) April 28, 2026 15:17
@nils-werner-sonarsource nils-werner-sonarsource merged commit af430f8 into master Apr 28, 2026
7 checks passed
@nils-werner-sonarsource nils-werner-sonarsource deleted the alex/new-version-optional branch April 28, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants