Skip to content

Modify build-agent-splunk workflow release step#1035

Merged
git-hyagi merged 1 commit into
pulp:mainfrom
git-hyagi:add-agent-splunk
Apr 14, 2026
Merged

Modify build-agent-splunk workflow release step#1035
git-hyagi merged 1 commit into
pulp:mainfrom
git-hyagi:add-agent-splunk

Conversation

@git-hyagi
Copy link
Copy Markdown
Collaborator

@git-hyagi git-hyagi commented Apr 14, 2026

Assisted By: claude-opus-4.6

Summary by Sourcery

CI:

  • Switch the build-agent-splunk release step from softprops/action-gh-release to a shell step invoking the GitHub CLI with GITHUB_TOKEN for authentication.

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Apr 14, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This 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 creation

sequenceDiagram
  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
Loading

Flow diagram for updated release step in build-agent-splunk workflow

flowchart 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]
Loading

File-Level Changes

Change Details Files
Replace the gh-release action with an explicit GitHub CLI invocation for creating releases in the build-agent-splunk workflow.
  • Remove the softprops/action-gh-release@v2 usage from the release step.
  • Add GH_TOKEN environment variable wired to secrets.GITHUB_TOKEN for authentication.
  • Run gh release create with the computed tag, a formatted release title, auto-generated notes, and the agent-splunk artifact as the attached asset.
.github/workflows/build-agent-splunk.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

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>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread .github/workflows/build-agent-splunk.yml Outdated
@git-hyagi git-hyagi force-pushed the add-agent-splunk branch 5 times, most recently from 06d91ad to 759a598 Compare April 14, 2026 14:17
@git-hyagi git-hyagi merged commit 8510dbf into pulp:main Apr 14, 2026
1 of 4 checks passed
@git-hyagi git-hyagi deleted the add-agent-splunk branch April 14, 2026 14:34
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.

1 participant