2

When creating a GitHub Pull Request, it is often that a file (script, lib, etc.) may be completely replaced (or introduced) with one from another repo. Sometimes, the file requires small changes. I'm trying to establish a standard for my team for how to communicate where the file came from and what changed. In the same way that you can craft a URL to highlight a specific change in a single repo, I'd like to be able to highlight a change across repos.

The reality may very well be that GitHub does not offer this. (I do a lot of research before asking questions. Consequently, the answer is often, "you couldn't find an answer because it is impossible.") In which case an alternative will be needed. One possibility might be to generate a diff in markdown and add it as a comment. (Notice I improved that answer back in 2016.)

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
Bruno Bronosky
  • 66,273
  • 12
  • 162
  • 149

1 Answers1

0

One possibility might be to generate a diff in markdown and add it as a comment.

Good idea.
One alternative which would not depend on a PR comment would be to use git notes. They are not supported/displayed by GitHub since 2014 and they are criticised, but they would remain in your case possible way to leave... well a note describing where some of the PR files are coming from.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks [but]! As GitHub Enterprise users, it's pretty integral to our process that all the info needed for code review be available through their tools. It wouldn't be my preference because I insist on using the CLI for everything. But, you have to do what works for the team. I haven't managed to convince people that `git add -i` is useful enough to justify scrapping their GUIs. – Bruno Bronosky Sep 10 '19 at 16:44
  • 1
    @BrunoBronosky I like `git add -p` myself ;) – VonC Sep 10 '19 at 16:47
  • `-p, --patch This effectively runs add --interactive, but bypasses the initial command menu and directly jumps to the patch subcommand.` Actually, that is what I should be using. I always choose patch from the initial menu. Thanks! – Bruno Bronosky Sep 11 '19 at 17:50