Reading notes from `refs/notes/commits` for the "timely commentaries"
Sending GitHub PRs to the Git mailing list
Brought to you by:
ashba22
Originally created by: phil-blain
I learned today that git format-patch can be told to use the notes (git notes) associated with the commits it is handling to write the "timely commentary" about each patch that gets inserted between the three dash line and the diffstat.
Wouldn't it be great if Gitgitgadget could somehow read the notes associated with commits from a PR (if a contributor has pushed these notes to their GitHub repo under refs/notes/commits/) to insert them in the patches before sending to the mailing list ?
Originally posted by: dscho
While the idea is cute, I am not completely convinced that we can make this work reliably: so far, we simply fetch the commits from gitgitgadget/git, via the
refs/pull/<number>/headref. That ref would obviously not contain those notes.Originally posted by: phil-blain
@dscho I just had an idea: what if I used GitHub commit comments instead ? would GGG have access more easily to those, through the API ?
Originally posted by: dscho
Sure, but how to discern the comments you intended to be included in the patch mails from the comments you did not want to be included?
Originally posted by: phil-blain
Well, personally I would not use the commit comments for anything else then the timely commentaries, so I guess it would be safe to always send this unique per-commit comment (if there is one and the PR author is the comment author).
As an additional safety, it could be a separate command, i.e.
/submit-with-comments, maybe ?Originally posted by: dscho
Probably would make more sense to implement something like
/submit --notes=[refs/notes/]<refname>.I still don't like the fact that those notes will be found nowhere near the
pr-tags; Currently, those tags have pretty much all the metadata reflecting the entirety of the submission (so that you don't need to be online to look at the submission history).