Modify build-agent-splunk workflow release step#1035
Merged
Conversation
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR updates the build-agent-splunk GitHub Actions workflow to replace the softprops/action-gh-release action with a direct invocation of the GitHub CLI (gh) for creating releases, using the workflow’s GITHUB_TOKEN via GH_TOKEN. Sequence diagram for GitHub CLI-based release creationsequenceDiagram
participant Workflow as Workflow_build-agent-splunk
participant ReleaseStep as Step_create_release
participant GHCLI as GH_CLI
participant GitHubAPI as GitHub_API
Workflow->>ReleaseStep: Start release step
ReleaseStep->>ReleaseStep: Set GH_TOKEN env from secrets.GITHUB_TOKEN
ReleaseStep->>GHCLI: Execute gh release create tag title generate-notes agent-splunk
GHCLI->>GitHubAPI: Authenticated request to create release
GitHubAPI-->>GHCLI: Release creation result
GHCLI-->>ReleaseStep: Command exit status
ReleaseStep-->>Workflow: Step completed with status
Flow diagram for updated release step in build-agent-splunk workflowflowchart TD
A[Start release step] --> B[Set env GH_TOKEN from secrets.GITHUB_TOKEN]
B --> C[Run gh release create with tag from steps.version.outputs.tag]
C --> D[Pass title agent-splunk tag]
D --> E[Pass generate notes flag]
E --> F[Attach agent-splunk artifact]
F --> G[GitHub creates or fails to create release]
G --> H[End release step]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".github/workflows/build-agent-splunk.yml" line_range="55-57" />
<code_context>
- files: agent-splunk
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ gh release create "${{ steps.version.outputs.tag }}" \
+ --title "agent-splunk ${{ steps.version.outputs.tag }}" \
+ --generate-notes \
+ agent-splunk
</code_context>
<issue_to_address>
**suggestion:** Consider making the `gh release create` step idempotent for workflow reruns.
`softprops/action-gh-release` handled existing releases, but `gh release create` fails if the tag/release already exists, which makes reruns (e.g., after partial release creation) fragile. If reruns are likely, add a guard (e.g., `gh release view` before create) or fall back to `gh release edit` so this step can safely run multiple times.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
06d91ad to
759a598
Compare
Assisted By: claude-opus-4.6
759a598 to
006eaa1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Assisted By: claude-opus-4.6
Summary by Sourcery
CI: