Repository navigation
Make GitAutomation interface GitHub agnostic - #2223
Merged
Merged
Conversation
lbussell
force-pushed
the
lbussell/gitautomation-provider-neutral
branch
from
September 1, 2026 17:07
28b192a to
4d1deef
Compare
mthalman
reviewed
Sep 1, 2026
| extension(CommitInfo) | ||
| { | ||
| public static CommitInfo FromPullRequestCommit(PullRequestCommit prCommit) => | ||
| new CommitInfo(prCommit.Sha, prCommit.Author.Name, prCommit.Author.Email); |
Member
There was a problem hiding this comment.
Apparently the recommendation is to use prCommit.Commit.Author instead of prCommit.Author. You can see in Octokit's own tests that they don't populate Name/Email for prCommit.Author: https://github.com/octokit/octokit.net/blob/main/Octokit.Tests/Models/PullRequestCommitTests.cs.
FWIW, the previous implementation of this code used the recommended way:
Member
Author
There was a problem hiding this comment.
Yep. Thought I could simplify it! Guess not. I will make sure this gotcha is captured in a comment.
lbussell
force-pushed
the
lbussell/gitautomation-provider-neutral
branch
2 times, most recently
from
September 1, 2026 22:09
d243299 to
2b85da4
Compare
mthalman
approved these changes
Sep 2, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 43e0dbdb-c6a4-4dbf-bf78-b620f850990d
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 43e0dbdb-c6a4-4dbf-bf78-b620f850990d
lbussell
force-pushed
the
lbussell/gitautomation-provider-neutral
branch
from
September 2, 2026 21:26
2b85da4 to
5d8ba4c
Compare
mthalman
approved these changes
Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR reworks the GitAutomation API to be provider neutral before adding Azure DevOps support. Trying to retrofit the provider-agnostic requirements on to the previous implementation resulted in a lot of tension because we support forks on GitHub but not on Azure DevOps. The boundary had to be reworked a little bit.
All remote operations are now behind a new
IPullRequestEndpointinterface.GitandGitContextare now also behind oneGitWorkingCopyimplementation.Part of:
Stack created with GitHub Stacks CLI • Give Feedback 💬