branch-diff icon indicating copy to clipboard operation
branch-diff copied to clipboard

Suggestion: have branch-diff check commit comments for PR metadata

Open gibfahn opened this issue 8 years ago • 7 comments

We get problems like this: https://github.com/nodejs/node/commit/75318e46b824c2dbba6251d94b178469d461b3ef#commitcomment-24788304 all the time. The solution we have is to put the PR-URL (or other relevant metadata) in a comment on the commit.

If branch-diff could check this it would alleviate the problem for LTS maintainers.

I was going to have a look at implementing this but never got around to it. Thought I'd put this here in case anyone else has the time and inclination.

cc/ @MylesBorins @rvagg

gibfahn avatar Oct 09 '17 18:10 gibfahn

@gibfahn I've thought about this a number of times myself.

I believe this would need to be implemented in commit-stream, and branch-diff would inherit the change

MylesBorins avatar Oct 09 '17 18:10 MylesBorins

We could do it at any point in the chain I think. Given that commit-stream is a fairly dumb stream that doesn't do network at the moment it might make most sense to do it in changelog-maker where we do a lot of GitHub fetching already. When a commit comes in from commit-stream without a prUrl we could call out to the comments on the commit. Unfortunately I don't have any existing libraries to get commit comments, I've never needed that before. I've got issues and pulls. It looks like the API for this hangs off "Repositories" so it could go here pretty simply I think (the comments & pagination code is shared across all of these libraries and should be straightforward to extend for this).

/cc @ralphtheninja FYI

rvagg avatar Oct 16 '17 10:10 rvagg

Added https://github.com/rvagg/ghrepos/tree/commits-and-comments#getcommitcommentsauth-org-repo-sha1-options-callback

ralphtheninja avatar Oct 17 '17 15:10 ralphtheninja

@ralphtheninja @rvagg what's the status of this? Anything I could do to help out?

gibfahn avatar Jan 03 '18 23:01 gibfahn

@gibfahn ghrepos has support for retrieving commit comments so I'm guessing it would be a matter of tweaking changelog-maker.

ralphtheninja avatar Jan 03 '18 23:01 ralphtheninja

@gibfahn should this move to branch-diff?

MylesBorins avatar Feb 10 '18 21:02 MylesBorins

@gibfahn should this move to branch-diff?

Sounds like it needs coordination across multiple repos, so I'd prefer to leave this open for now.

gibfahn avatar Feb 19 '18 01:02 gibfahn