-
Notifications
You must be signed in to change notification settings - Fork 0
chore: add dev loop hook scripts and remove completed design TODOs #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
koenighotze
wants to merge
15
commits into
main
Choose a base branch
from
feature/workflows-cleanup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c377fab
Use actions where possible
koenighotze 837cd6f
fix: set go-version-input and go-package on govulncheck-action
Copilot 71f4ae9
Merge branch 'main' into feature/workflows-cleanup
koenighotze 0f6e6d6
ci: disable govulncheck internal checkout to fix duplicate Authorizat…
koenighotze a3476d1
Ignore commit message tmp files
koenighotze bcdafe1
chore: add dev loop hook scripts and remove completed design TODOs
koenighotze d6665c6
fix: exclude untracked files from loop-reminder dirty check
koenighotze c9bcd71
feat: add /watch-pr command and extend loop reminder with PR state
koenighotze 52d6e8b
fix: address Copilot review findings and add /ship command
koenighotze 6ac2c02
fix: resolve shellcheck warnings in hook scripts
koenighotze 7b9d15a
fix: correct markdown formatting in command files
koenighotze 77b85ee
fix: silence loop-reminder when open PR has all CI checks green
koenighotze b5c0762
chore: merge main into feature/workflows-cleanup and resolve Makefile…
Copilot 28c552e
fix: address remaining Copilot review findings on hook scripts
koenighotze 9c91aa0
fix: guard jq and git commands against errexit abort in test-on-edit …
koenighotze File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,127 @@ | ||
| # Ship — Full Delivery Loop | ||
|
|
||
| Commit staged work, push, open a PR, then run the full CI + review loop until the PR is green and all findings are addressed or dismissed. | ||
|
|
||
| ## Phase 1 — Commit & PR | ||
|
|
||
| ### 1.1 Check state | ||
|
|
||
| ```bash | ||
| git status --porcelain | grep -v '^??' | ||
| git branch --show-current | ||
| ``` | ||
|
|
||
| If no tracked changes and no unpushed commits, check for an already-open PR and skip to Phase 2. | ||
|
|
||
| ### 1.2 Stage and commit | ||
|
|
||
| ```bash | ||
| git add -u | ||
| ``` | ||
|
|
||
| Write a conventional commit message (`feat:`, `fix:`, `chore:`, etc.) that describes the why, not the what. | ||
|
|
||
| ```bash | ||
| git commit -m "<type>: <message>" | ||
| ``` | ||
|
|
||
| ### 1.3 Push | ||
|
|
||
| ```bash | ||
| git push -u origin HEAD | ||
| ``` | ||
|
|
||
| ### 1.4 Create PR (or detect existing) | ||
|
|
||
| ```bash | ||
| PR_NUM=$(gh pr list --head "$(git branch --show-current)" --state open --json number --jq '.[0].number' 2>/dev/null) | ||
| ``` | ||
|
|
||
| If `PR_NUM` is empty, create one: | ||
|
|
||
| ```bash | ||
| gh pr create --title "<title>" --body "<summary + test plan>" | ||
| PR_NUM=$(gh pr list --head "$(git branch --show-current)" --state open --json number --jq '.[0].number') | ||
| ``` | ||
|
|
||
| Capture `PR_NUM` — it is used in every subsequent step. | ||
|
|
||
| --- | ||
|
|
||
| ## Phase 2 — CI Loop | ||
|
|
||
| Repeat until all checks pass. | ||
|
|
||
| ### 2.1 Wait for checks | ||
|
|
||
| ```bash | ||
| gh pr checks "$PR_NUM" --watch --interval 15 | ||
| ``` | ||
|
|
||
| ### 2.2 Handle failures | ||
|
|
||
| For each failed check: | ||
|
|
||
| 1. Find the run ID: `gh pr checks "$PR_NUM" --json name,link` | ||
| 2. Fetch failure logs: `gh run view <run-id> --log-failed` | ||
| 3. Diagnose root cause | ||
| 4. Fix the code | ||
| 5. `make test` — must pass locally before pushing | ||
| 6. Commit and push: | ||
|
|
||
| ```bash | ||
| git add -u | ||
| git commit -m "fix: <what was wrong>" | ||
| git push | ||
| ``` | ||
|
|
||
| 7. Go back to 2.1 | ||
|
|
||
| --- | ||
|
|
||
| ## Phase 3 — Review Loop | ||
|
|
||
| Run once CI is fully green. | ||
|
|
||
| ### 3.1 Fetch inline comments (Copilot, reviewers) | ||
|
|
||
| ```bash | ||
| REPO=$(gh repo view --json nameWithOwner --jq '.nameWithOwner') | ||
| gh api "repos/$REPO/pulls/$PR_NUM/comments" --jq '.[] | {path: .path, line: .line, body: .body}' | ||
| ``` | ||
|
|
||
| ### 3.2 Fetch review summaries | ||
|
|
||
| ```bash | ||
| gh pr view "$PR_NUM" --json reviews --jq '.reviews[] | {author: .author.login, state: .state, body: .body}' | ||
| ``` | ||
|
|
||
| ### 3.3 Evaluate each finding | ||
|
|
||
| For each comment: | ||
|
|
||
| - **Warranted**: apply fix, run `make test` | ||
| - **Not warranted**: note the reasoning explicitly — do not apply blindly | ||
|
|
||
| ### 3.4 If fixes were made | ||
|
|
||
| ```bash | ||
| git add -u | ||
| git commit -m "fix: address review findings" | ||
| git push | ||
| ``` | ||
|
|
||
| Then go back to Phase 2 to confirm CI still passes with the fixes. | ||
|
|
||
| --- | ||
|
|
||
| ## Done | ||
|
|
||
| Report the PR as ready to merge when: | ||
|
|
||
| - All CI checks are green | ||
| - All review findings are addressed or explicitly dismissed with reasoning | ||
|
|
||
| ```bash | ||
| gh pr view "$PR_NUM" --json url,title,state | ||
| ``` |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # Watch PR — CI and Review Loop | ||
|
|
||
| After opening a PR, wait for CI and Copilot/reviewer feedback, fix warranted issues, | ||
| and push until the PR is green and all review findings are addressed. | ||
|
|
||
| ## Step 1 — Identify the PR | ||
|
|
||
| ```bash | ||
| BRANCH=$(git branch --show-current) | ||
| gh pr list --head "$BRANCH" --state open --json number,url | ||
| ``` | ||
|
|
||
| If no open PR is found, stop and tell the user. | ||
|
|
||
| ## Step 2 — Wait for CI | ||
|
|
||
| ```bash | ||
| gh pr checks <number> --watch --interval 15 | ||
| ``` | ||
|
|
||
| ## Step 3 — Handle CI failures | ||
|
|
||
| For each failed check: | ||
|
|
||
| 1. Fetch the failure output from the check run logs via `gh run view` | ||
| 2. Diagnose the root cause | ||
| 3. Fix the code | ||
| 4. Run `make test` to verify locally | ||
| 5. Push — then go back to Step 2 | ||
|
|
||
| ## Step 4 — Fetch review feedback | ||
|
|
||
| ```bash | ||
| gh pr view <number> --json reviews,comments | ||
| ``` | ||
|
|
||
| For each finding: | ||
|
|
||
| - Evaluate whether it is correct and warranted | ||
| - If yes: apply the fix, run `make test` | ||
| - If no: note the reasoning — do not blindly apply every suggestion | ||
|
|
||
| ## Step 5 — Push and re-check | ||
|
|
||
| If any fixes were made: | ||
|
|
||
| ```bash | ||
| git add -u | ||
| git commit -m "fix: address CI failures / review findings" | ||
| git push | ||
| ``` | ||
|
|
||
| Then go back to Step 2 to confirm CI still passes. | ||
|
|
||
| ## Done | ||
|
|
||
| Report the PR as ready to merge when CI is green and all review findings are addressed or | ||
| explicitly dismissed with reasoning. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,3 +26,4 @@ TestResults.json | |
| *.test | ||
| *.out | ||
| go.work | ||
| .commit_msg_tmp | ||
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.