MichaelSims / MichaelSims/git-jaspr
Work around potential issues in CI/CD workflows caused by changing target branches
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 4
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Problem:
- A stack is pushed: main <- A <- B <- C
- Part of the stack is merged: main (A) <- B <- C. B's base ref is updated from
Atomain - For some reason part of the verify workflow for
Bis retriggered. It may be because it had not yet ran (rare) or had a transient failure and needs to be re-ran without any code changes made. - Some workflow actions such as https://github.com/13rac1/block-fixup-merge-action attempt to determine the base ref from the env var
GITHUB_BASE_REF, but this is wrong because it's still pointing to the jaspr branch forAwhich has been deleted. Why this value is "cached" I'm not clear on.
While this doesn't seem like a jaspr bug specifically, I can see several GH actions not responding well to a PR's base branch being changed while the PR's branch doesn't move. To work around this, consider when retargeting B to rewrite the stack (no code changes, just a bump to the commit date) and do a new push.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start at the retargeting flow for stacked pull requests and reproduce the main <- A <- B <- C sequence, including a retriggered verification workflow after B changes base. Done means retargeting B causes a fresh push or equivalent update so GitHub Actions use the current base ref.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, github-actions, kotlin
- Domain
- ci-cd, devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100