Skip to content

chore: create tags for go modules in subdirectories#28

Merged
feloy merged 1 commit intoopenkaiden:mainfrom
feloy:go-tags
Apr 7, 2026
Merged

chore: create tags for go modules in subdirectories#28
feloy merged 1 commit intoopenkaiden:mainfrom
feloy:go-tags

Conversation

@feloy
Copy link
Copy Markdown
Contributor

@feloy feloy commented Apr 7, 2026

Go needs specific tags when modules are in subdirectories: cli/go/vx.y.z and workspace-configuration/go/vx.y.z

Fixes #27

Signed-off-by: Philippe Martin <phmartin@redhat.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 7, 2026

📝 Walkthrough

Walkthrough

The release workflow's tag step is modified to create and push multiple git tags with different path-based prefixes (empty, cli/go/, workspace-configuration/go/) instead of a single tag, using an environment variable set from the TAG_UTIL step output.

Changes

Cohort / File(s) Summary
GitHub Actions Release Workflow
.github/workflows/release.yaml
The tag step now iterates over multiple path prefixes to create and push multiple versioned git tags instead of a single tag, using an environment variable to store the base tag value.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding support for creating Git tags for Go modules in subdirectories.
Description check ✅ Passed The description is directly related to the changeset, explaining the specific requirement for Go module tags in subdirectories and referencing the issue being fixed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/release.yaml (1)

83-88: Go module tagging approach is correct.

The prefixed tags (cli/go/vX.Y.Z, workspace-configuration/go/vX.Y.Z) correctly match the module paths declared in their respective go.mod files, ensuring proper Go module proxy resolution.

Optional: Quote variables and add error handling for robustness.

🛡️ Suggested improvements for shell robustness
          for prefix in "" "cli/go/" "workspace-configuration/go/"
          do
            echo "Tagging with ${prefix}${NEW_GITHUB_TAG}"
-           git tag ${prefix}${NEW_GITHUB_TAG}
-           git push origin ${prefix}${NEW_GITHUB_TAG}
+           git tag "${prefix}${NEW_GITHUB_TAG}"
+           git push origin "${prefix}${NEW_GITHUB_TAG}"
          done

Additionally, consider adding set -e at the start of the script or explicit error checking to ensure partial failures don't leave the repository in an inconsistent state (e.g., some tags pushed but not others).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yaml around lines 83 - 88, The tag loop uses
unquoted variables and lacks failure handling; update the script to quote
${NEW_GITHUB_TAG} and any expansions in echo, git tag and git push calls (refer
to the loop that iterates prefixes and uses NEW_GITHUB_TAG) and add robust error
handling such as enabling "set -e" at the top of the workflow or checking the
exit status after each git tag/git push so the job fails fast if any tag or push
fails, preventing partial tagging.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/release.yaml:
- Around line 83-88: The tag loop uses unquoted variables and lacks failure
handling; update the script to quote ${NEW_GITHUB_TAG} and any expansions in
echo, git tag and git push calls (refer to the loop that iterates prefixes and
uses NEW_GITHUB_TAG) and add robust error handling such as enabling "set -e" at
the top of the workflow or checking the exit status after each git tag/git push
so the job fails fast if any tag or push fails, preventing partial tagging.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f3332337-224e-44a3-8518-e705913ee056

📥 Commits

Reviewing files that changed from the base of the PR and between b4236ea and 6d5c482.

📒 Files selected for processing (1)
  • .github/workflows/release.yaml

@feloy feloy requested review from benoitf and jeffmaury April 7, 2026 08:31
@feloy feloy merged commit 5d1cecc into openkaiden:main Apr 7, 2026
3 checks passed
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.

tags must be cli/go/vx.y.z and workspace-configuration/go/vx.y.z

3 participants