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

Send push event when tag is created or deleted #13999

Merged
merged 3 commits into from
Dec 16, 2020

Conversation

CirnoT
Copy link
Contributor

@CirnoT CirnoT commented Dec 15, 2020

#13381 introduced behavioral change in which push event with 0 commits was no longer sent when tag is created or removed. This is necessary:

  • To ensure compatibility with all CI solutions
  • To create advanced triggers for Drone (by allowing to trigger on refs/tags/**)
  • To maintain compatibility with GitHub webhooks

Similar fix was already made for mirrors in #13862

@CirnoT
Copy link
Contributor Author

CirnoT commented Dec 15, 2020

To create advanced triggers for Drone (by allowing to trigger on refs/tags/**)

For example:

trigger:
    ref:
        - refs/heads/master
        - refs/pull/**
        - refs/tags/**

will trigger on push to master, PR or tag creation (on event push, ref name is refs/tags/v3.1.0), however

trigger:
    ref:
        - refs/heads/master
        - refs/pull/**
        - refs/tags/**
    event:
        - push
        - tag

will only trigger on push to master and PR creation, because on event tag, ref value is v3.1.0, not refs/tags/v3.1.0 (note that all conditions must be true for trigger to fire)

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 15, 2020
@CirnoT
Copy link
Contributor Author

CirnoT commented Dec 15, 2020

Related #11397

@GiteaBot GiteaBot 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 Dec 15, 2020
@GiteaBot GiteaBot 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 Dec 15, 2020
@codecov-io
Copy link

Codecov Report

Merging #13999 (b121fdd) into master (b8c58ed) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13999      +/-   ##
==========================================
- Coverage   42.23%   42.19%   -0.04%     
==========================================
  Files         710      710              
  Lines       77261    77275      +14     
==========================================
- Hits        32629    32609      -20     
- Misses      39266    39288      +22     
- Partials     5366     5378      +12     
Impacted Files Coverage Δ
services/repository/push.go 38.46% <0.00%> (-4.65%) ⬇️
modules/notification/ui/ui.go 93.05% <0.00%> (-2.78%) ⬇️
modules/process/manager.go 72.50% <0.00%> (-2.50%) ⬇️
services/pull/check.go 49.63% <0.00%> (-2.19%) ⬇️
models/notification.go 66.25% <0.00%> (-0.99%) ⬇️
modules/log/event.go 58.96% <0.00%> (-0.95%) ⬇️
models/error.go 38.49% <0.00%> (-0.82%) ⬇️
services/pull/pull.go 40.68% <0.00%> (-0.50%) ⬇️
models/issue_comment.go 52.26% <0.00%> (-0.46%) ⬇️
modules/notification/mail/mail.go 39.08% <0.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8c58ed...263ffd8. Read the comment docs.

@techknowlogick techknowlogick added this to the 1.14.0 milestone Dec 16, 2020
@techknowlogick techknowlogick added type/bug skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Dec 16, 2020
@lafriks lafriks merged commit 66379ba into go-gitea:master Dec 16, 2020
@CirnoT CirnoT deleted the tag-webhook-push branch December 16, 2020 13:37
@go-gitea go-gitea locked and limited conversation to collaborators Jan 18, 2021
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. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants