-
Notifications
You must be signed in to change notification settings - Fork 350
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
Integrate Merge PR API #8232
Integrate Merge PR API #8232
Conversation
# Conflicts: # webui/src/pages/repositories/repository/pulls/createPull.jsx
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.
LGTM!
One comment
@@ -32,18 +31,12 @@ const PullDetailsContent = ({repo, pull}) => { | |||
setError(null); | |||
setLoading(true); | |||
try { | |||
await refsAPI.merge(repo.id, pull.source_branch, pull.destination_branch); | |||
await pullsAPI.merge(repo.id, pull.id); | |||
} catch (error) { | |||
setError(`Failed to merge pull request: ${error.message}`); |
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.
I think the error here may be confusing. The merge might have been successful and the failure was on the update.
Since we are returning a verbose error message from the server, lets just use it as is.
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.
Right! It's there since we had two different errors (merge + status change), and now it isn't relevant anymore.
Changed.
Closes #8210.