Add pre-merge cherry-pick flow for patch-labeled PRs#579
Merged
Conversation
Mirror of HarperFast/harper-pro PR #151 (plus the checkout-ref fix from #157), adapted for core: - .github/workflows/cherry-pick-patch.yml: rewritten to a pre-merge flow. On `labeled`/`synchronize` (re)create cherry-pick/<release>/pr-<N> off the release branch, cherry-pick the PR commits, dispatch unit + integration tests on success, commit conflict markers and @-mention Claude on failure. On merge, fast-forward into the release branch. On unlabel, tear down. Pinned to ref: main so the helper script is always present. - .github/workflows/report-cherry-pick-tests.yml: workflow_run listener for both Integration Tests and Unit Test. Uses per-workflow sticky marker so the two results don't overwrite each other. Gated on head_repository == repository to block fork spoofing. - .github/scripts/upsert-sticky-comment.js: shared sticky-comment upsert helper keyed by marker string. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
For pull_request events, GitHub loads the workflow definition from the PR head ref, so PRs branched off main before this workflow landed won't trigger the new label flow. Switch to pull_request_target so the definition is always loaded from main. Token has write scope; we mitigate the usual risk by pinning checkout to main and only running git against PR commits — no PR-controlled scripts are executed in this workflow. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
Reviewed; no blockers found. The prior finding (workflow files on the cherry-pick branch executing under write permissions) is resolved — |
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Member
Author
|
Just copying from harper-pro |
kriszyp
pushed a commit
that referenced
this pull request
May 19, 2026
Resolves conflicts caused by the .js → .ts rename pass on main (most of the codebase moved from CommonJS to ESM TS in #460/#579). Specifically: - bin/cliOperations.ts: kept main's ESM imports + new CLI features (loadCredentials, isJWTExpired, normalizeTarget) and layered in the multipart streaming additions (streamPackagedDirectory, buildMultipartBody, TRANSPORT_ONLY_FIELDS, the _multipart branch, body=stream). - components/Application.ts: kept the Buffer | string | Readable payload switch from this branch (main's resolution was just a Buffer/base64 fallback). - server/serverHelpers/multipartParser.ts: updated the hdbError import from .js to .ts to match the rename. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
7 tasks
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
Mirror of HarperFast/harper-pro#151 (plus the checkout-ref fix from harper-pro#157), ported to core.
When a PR is labeled
patch:cherry-pick/<release>/pr-<N>off the release branch, cherry-pick the PR commits.Integration TestsandUnit Testworkflows against that branch. Sticky comments on the original PR link the runs and (viareport-cherry-pick-tests.yml) update with pass/fail when each completes.unlabeled, tear down the branch.closed && merged, re-pick from the final merge SHA and fast-forward into the release branch.Differences from harper-pro
integration-tests.ymlandunit-test.yml(core has both; harper-pro only has integration tests).report-cherry-pick-tests.ymllistens for completion of both workflows and uses a per-workflow sticky marker so the two results don't overwrite each other.Where to focus review
.github/workflows/cherry-pick-patch.yml— the main logic.report-cherry-pick-tests.yml— gated onhead_repository.full_name == github.repositoryto block fork spoofing.🤖 Generated by Claude Opus 4.7 (1M context).