Skip to content
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

Trigger sync webhooks on UI commit #2302

Merged
merged 2 commits into from
Aug 17, 2017
Merged

Conversation

ethantkoenig
Copy link
Member

Fixes #2295.

Ensure that AddTestPullRequestTask(..) called during a UI commit. For normally-pushed commits, AddTestPullRequestTask(..) is called by the post-receive webhook, but the webhook does not run* for UI commits.

(*It technically runs, but immediately quits because $SSH_ORIGINAL_COMMAND is not set)


log.Trace("TriggerTask '%s/%s' by %s", repo.Name, branch, pusher.Name)

go models.HookQueue.Add(repo.ID)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is actually removed (as opposed to simply being moved to models/update.go), since the repo ID is already added to HookQueue by CommitRepoAction(..)

@lunny
Copy link
Member

lunny commented Aug 16, 2017

In fact, there are still many places to call CommitRepoAction for example DeleteRepoFile where maybe also need to be replaced by PushUpdate?

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 16, 2017
@ethantkoenig
Copy link
Member Author

@lunny Good point, I've updated DeleteRepoFile(..) and UploadRepoFiles(..)

@lunny
Copy link
Member

lunny commented Aug 17, 2017

LGTM

@tboerger tboerger added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Aug 17, 2017
@strk
Copy link
Member

strk commented Aug 17, 2017

LGTM

@tboerger tboerger added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Aug 17, 2017
@lunny lunny merged commit 7907786 into go-gitea:master Aug 17, 2017
@ethantkoenig ethantkoenig deleted the fix/webhook branch August 20, 2017 20:57
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Committing using web UI does not trigger webhook action "synchronized"
4 participants