fix(ci): run refactor PR automation from main - #2103
Closed
tejaskash wants to merge 2 commits into
Closed
Conversation
Contributor
Package TarballHow to installgh release download pr-2103-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.28.0.tgz |
Contributor
There was a problem hiding this comment.
AgentCore Harness Review
Verdict: Looks good
Workflow-only change; no application code, tests, or telemetry surface area to consider. I reviewed both the diff and the resulting .github/workflows/pr-automation.yml end-to-end.
Things I checked and consider fine:
- Fork-PR safety.
tarball-authorizegates onAUTHORIZED_USERSviafetch-secrets/check-authorized-userbefore thepr-tarballjob runsbun install/bun run build/bun pm packon PR head code. This matches the existingpr-tarball.ymlprecedent (same gate pattern, sameallow-unsafe-pr-checkout: truejustification). workflow_dispatchpath. Authz steps correctly skip on dispatch (if: github.event_name == 'pull_request_target'), andDetermine authorizationshort-circuits tois_authorized=truefor dispatch — dispatch already requires repo write.PR_NUMBERis regex-validated (^[0-9]+$) before being used withgh api, and the resolver rejects non-refactorbases so a mis-dispatched run fails loudly instead of packing the wrong PR.- Sticky-comment collision. Both this job and the existing
pr-tarball.ymluseheader: tarball, but they fire on disjoint base refs (refactorhere vs.main/feat/**there), so no PR will ever see both. - Release lifecycle.
gh release delete "$tag" --yes --cleanup-tagbeforegh release create ... --draft --target "$HEAD_SHA"is idempotent acrosssynchronizeevents. (Note: the existingcleanup-pr-tarballs.ymlfilters on.isPrerelease, which does not match--draftreleases — same pre-existing quirk aspr-tarball.yml, so this PR isn't making anything worse. Worth cleaning up separately if drafts are accumulating.) - Comment accuracy.
# pull_request_target workflows are loaded from main…matches the PR description's motivation for hoisting the refactor tarball logic here rather than leaving it on therefactorbranch.
YAML parses cleanly and all five jobs (size-title, security-review, harness-review, tarball-authorize, pr-tarball) are well-formed. No changes requested.
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
Contributor
Coverage Report
|
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.
Summary
us.anthropic.claude-opus-5refactoron open, reopen, and synchronizeworkflow_dispatchContext
pull_request_targetloads workflow definitions from the repository default branch. The Bun workflow merged torefactorin #2100 therefore cannot control refactor PR open events; the default-branchpr-automation.ymlmust route those events.The existing npm E2E and tarball workflows remain scoped to
main/feat/**. This job is additionally gated tobase.ref == refactor, so the package-manager paths do not overlap.Verification
go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.7 .github/workflows/pr-automation.ymlgit diff --check