-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add merge files files to GetCommitFileStatus #20515
Add merge files files to GetCommitFileStatus #20515
Conversation
ebbb28f
to
3504f4c
Compare
3504f4c
to
dff160f
Compare
bfb7560
to
917abde
Compare
Hey, What I did locally was to add two commits to the If someone could give any pointer on how to update this, I'd be grateful. |
917abde
to
78a823e
Compare
You can just checkout the bare repo and commit and push. |
78a823e
to
8ccc2f3
Compare
Add new test repo repo6_merge
8ccc2f3
to
637125c
Compare
I added a new bare repository in This repo has this history:
I choose an octopus merge to test a case where a commit has >2 parents. I also choose to do a test in the git module rather than an integration test as the issue is contained to the Lastly, in addition to the (Sorry, I forgot about the guildelines to merge main and not rebase the history of a PR. I should be able to find the previous branch if necessary. Although, this is basically a new PR at this point). |
Please remove those unnecessary files like |
I think I stripped everything I could |
The e2e-tests failure seem unrelated to the changes AFAIK. |
@jasugun please fix the merge conflicts. 🍵 |
@jasugun please fix the merge conflicts. 🍵 |
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.
PRs from an org can't be updated/edited by maintainers.
So either keep the PR update-to-date by the author (to make sure it passes all checks), or let owners merge it without the update-to-date check.
Didn't know that! Will keep it mind if I open another PR. |
* giteaofficial/main: Fix review bar misalignment (go-gitea#26711) Use "small-loading-icon" insead of "btn-octicon is-loading" (go-gitea#26710) Improve Image Diff UI (go-gitea#26696) Make issue template field template access correct template data (go-gitea#26698) add Upload URL to release API (go-gitea#26663) Add merge files files to GetCommitFileStatus (go-gitea#20515) PATCH branch-protection updates check list even when checks are disabled (go-gitea#26351) Add `member`, `collaborator`, `contributor`, and `first-time contributor` roles and tooltips (go-gitea#26658) chore(actions): support cron schedule task (go-gitea#26655)
Hi,
We'd like to add merge files files to GetCommitFileStatus fucntions so API returns the list of all the files associated to a merged pull request commit, like GitHub API does.
The list of affectedFiles for an API commit is fetched from toCommit() function in routers/api/v1/repo/commits.go, and API was returning no file in case of a pull request with no conflict, or just files associated to the confict resolution, but NOT the full list of merged files.
This would lead to situations where a CI polling a repo for changes could miss some file changes due to API returning an empty / partial list in case of such merged pull requests. (Hope this makes sense :) )
NOTE: I'd like to add a unittest in integrations/api_repo_git_commits_test.go but failed to understand how to add my own test bare repo so I can make a test on a merged pull request commit to check for affectedFiles.
Is there a merged pull request in there that I could use maybe?
Could someone please direct me to the relevant ressources with informations on how to do that please?
Thanks for your time,
Laurent.