Users need a streamlined way to pull down pull requests from GitHub locally to their machine, enabling them to review the code directly in their development environment and push their own changes or suggestions back to the PR. This would improve the code review workflow.
I think I've figured out an AI code review workflow that makes me happy. So I review much, much more code than i write. I figure if I can easily ask a coding agent to build something, I should be able to just as easily ask a pull request how it works. For cartography, I use a bare repo with many git worktrees. This is because I need multiple copies of the repo at once. Sometimes I tell multiple agents to build 5 ideas at once (though most of the time I have ideas that i'll never touch again..) When people contribute to cartography (or any oss repo where they are not a member of that GH org), they have to fork the repo first, and then make a PR. I'd love to easily pull down their PR locally and either review it on my own my machine or push my own changes, and I've always been surprised git or GitHub doesn't make this easier because I always forget the CLI commands to do this. So here are the steps to save you, intrepid reader, a bunch of time: I create a remote of their fork & fetch it: ``` git remote add USER git@github.com:USER/cartography.git git fetch USER ``` Then i fetch that specific PR branch and add the worktree ``` git fetch USER BRANCH_NAME: git worktree add ~/src/cartography/ ``` and then finally i can cd in and ask Claude or Cursor questions about the contributor's PR! And then if the contributor has enabled "Allow edits by maintainers" in their PR setting in GitHub, I can even push my own changes up if the contributor has gone AWOL. This is probably basic git but I'm not smart enough to understand git (and tbf to myself don't think many people are lol) But this is great! Instead of having an AI agent slam 10 slopped PRs to the queue and me being ill-equipped to deal with that, I can have my own agent help read and review them. --- Please find attached a link to my full snippet: https://lnkd.in/gjR5fnRW And I hope this helps all you reviewers out there.