-
-
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
Gitea webhook commits wrong hash on HEAD reset #11802
Labels
Comments
This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions. |
nop stale |
6543
pushed a commit
that referenced
this issue
Jun 30, 2021
AbdulrhmnGhanem
pushed a commit
to kitspace/gitea
that referenced
this issue
Aug 10, 2021
Use `..` instead of `...` with `rev-list`. In combination with go-gitea#16282 the receiver can get the correct commit. The behaviour is now like Github. fixes go-gitea#11802
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
Gitea webhook has already deleted git hash in list
commits
, if agit push --force
is initiated after agit reset --hard
to a previous commit.If this is an intended behaviour, please correct me.
Steps to reproduce
git push
(initiates webhook with correctcommits
content)git reset --hard HEAD~1
)git push --force
(initiates webhook with wrongcommits
content)For example after step 2 described above we have the following commit hashes:
Now we reset to
da2c75d512a3f0aa36cc025723d9ea17631a6609
and push it to gitea.Expected behaviour
Expectect JSON content of webhook (unrelevant data cut away) with git hash of the new branch head:
Actual behaviour
The actual webhook contains the already deleted hash
b44305a4f7cad8617cd2b5ac5d0251b05cf03fdb
as a commit. Triggered buildservers try to checkout an invalid hash and can not build the new head of the branch.System information
[x]
):The text was updated successfully, but these errors were encountered: