review-design: list commits without merge commits, and name the pull request of each commit

Open
#82 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
git, shell
Domain
tooling

Research direction

Read .agents/skills/review-design/SKILL.md Step 1, then inspect the script added by #69 and the collector under tools/trace-decision/ for how it finds landing commits and extracts pull request numbers. Decide how to represent commits without a linked pull request. Done when the script omits merge commits and associates each listed commit with its pull request, with a defined output for commits that have none.

Written by the indexing model from the issue text.

Description

type/feature
Problem to solve

Step 1 of .agents/skills/review-design/SKILL.md collects the fix history of a path. Its output lists each commit with its subject and --numstat. #69 moves this lookup into a script and keeps merge commits in the list.

A merge commit gives little in this list:

  • It has no --numstat lines, because git log shows no diff for a merge commit by default. The lines of a fix are on the commits inside the pull request.
  • Only its subject has the pull request number, for example 7c2e454 docs!: put the decision record on the landing commit of each PR (#68). The commits inside a pull request have no number in their subjects.
  • The list is in date order, so a merge commit and the commits that it brought in are not always next to each other.

Step 1 also reads review threads. With this list, an AI assistant cannot tell which pull request holds a fix commit, so it cannot go from the fix to its review threads.

Proposal
  • The script lists commits with --no-merges.
  • For each commit, the script names its pull request.

Decide:

  • How the script finds the pull request. One way: find the landing commit on the first-parent line, as the trace-decision collector does, and read (#n) from its subject. This shares code with tools/trace-decision/, or repeats it.
  • What the script prints for a commit with no pull request: a commit pushed to the default branch directly, or a repo of this template that merges with squash or rebase.
Version

7c2e454

More information

Depends on #69: the script exists only after #69.

No case has needed this yet. The goal is that an AI assistant can go from a fix commit to its review threads. The comment https://github.com/c-w-z/commit-decision-record/issues/69#issuecomment-7336645801 compares this option with keeping merge commits and with --no-merges alone.

Dominant language
Shell
Stars
1
Forks
0
Avg merge
6h 59m
Merged PRs (30d)
26

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from c-w-z/commit-decision-record

All issues in c-w-z/commit-decision-record

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.