-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: add reviewers parameter to UpdatePullRequest #285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
Hi @MayorFaj, can you please update the pr so we can get it merged? :) |
…ation- go run ./cmd/github-mcp-server generate-docs
@JoannaaKL the PR has been updated |
Could you update again because is out-of-date? Great PR! |
} | ||
|
||
// If no updates and no reviewers, return error | ||
if !updateNeeded && len(reviewers) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this check before the line 316?
} else { | ||
// If no update needed, just get the current PR | ||
var ghResp *github.Response | ||
pr, ghResp, err = client.PullRequests.Get(ctx, owner, repo, pullNumber) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We we need this else? If no updates are needed and no new reviewers were requested we will just return an error (please see comment below).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I'd update the part where we're fetching the pull request - I don't think we need that :)
This pull request introduces the ability to request reviewers when updating a pull request. The changes include updates to the
UpdatePullRequest
function to handle reviewers, modifications to the test cases to cover the new functionality, and updates to the documentation.Enhancements to
UpdatePullRequest
function:UpdatePullRequest
function. (pkg/github/pullrequests.go
) [1] [2] [3]pkg/github/pullrequests.go
)Documentation updates:
README.md
to include the newreviewers
parameter in the documentation for updating pull requests. (README.md
)Test case updates:
pkg/github/pullrequests_test.go
) [1] [2] [3] [4] [5]Closes: #259