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

Delete tag API #13358

Merged
merged 6 commits into from Oct 31, 2020
Merged

Delete tag API #13358

merged 6 commits into from Oct 31, 2020

Conversation

jolheiser
Copy link
Member

Resolves #12913

Allows deletion of tags via API, but only if they are not attached to a release. If a release is attached, the user will have to call the API to delete the release, then call this API.

I considered allowing a query parameter or request body with the delete release API, however from my cursory searches it seems as though both would be undefined behavior with the DELETE method, so instead I opted for this approach.

cc @6543

Signed-off-by: jolheiser <john.olheiser@gmail.com>
@jolheiser jolheiser added type/enhancement An improvement of existing functionality modifies/api This PR adds API routes or modifies them labels Oct 30, 2020
@jolheiser jolheiser added this to the 1.14.0 milestone Oct 30, 2020
Signed-off-by: jolheiser <john.olheiser@gmail.com>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 30, 2020
@6543
Copy link
Member

6543 commented Oct 30, 2020

    release_test.go:59: 
        	Error Trace:	release_test.go:59
        	            				release_test.go:86
        	Error:      	Not equal: 
        	            	expected: 2
        	            	actual  : 3
        	Test:       	TestCreateRelease

    release_test.go:59: 
        	Error Trace:	release_test.go:59
        	            				release_test.go:95
        	Error:      	Not equal: 
        	            	expected: 2
        	            	actual  : 3
        	Test:       	TestCreateReleasePreRelease


    release_test.go:59: 
        	Error Trace:	release_test.go:59
        	            				release_test.go:104
        	Error:      	Not equal: 
        	            	expected: 2
        	            	actual  : 3
        	Test:       	TestCreateReleaseDraft

@jolheiser
Copy link
Member Author

Hah, that's what I get for running only specific #Tests locally.

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signed-off-by: jolheiser <john.olheiser@gmail.com>
@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 Oct 30, 2020
@codecov-io
Copy link

codecov-io commented Oct 30, 2020

Codecov Report

Merging #13358 into master will increase coverage by 0.00%.
The diff coverage is 55.55%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #13358   +/-   ##
=======================================
  Coverage   42.14%   42.15%           
=======================================
  Files         690      690           
  Lines       75871    75888   +17     
=======================================
+ Hits        31975    31988   +13     
+ Misses      38668    38659    -9     
- Partials     5228     5241   +13     
Impacted Files Coverage Δ
modules/context/api.go 75.22% <ø> (ø)
routers/api/v1/repo/release_tags.go 53.57% <46.66%> (-7.97%) ⬇️
routers/api/v1/api.go 79.50% <100.00%> (+0.05%) ⬆️
modules/indexer/stats/db.go 52.17% <0.00%> (-8.70%) ⬇️
modules/git/utils.go 73.77% <0.00%> (-3.28%) ⬇️
modules/charset/charset.go 73.03% <0.00%> (-2.25%) ⬇️
services/gitdiff/gitdiff.go 67.39% <0.00%> (-1.99%) ⬇️
modules/git/repo.go 46.19% <0.00%> (-1.53%) ⬇️
services/pull/check.go 51.82% <0.00%> (-0.73%) ⬇️
services/pull/pull.go 40.78% <0.00%> (ø)
... and 7 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 e16a5bb...dd0fa25. Read the comment docs.

@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 Oct 31, 2020
@noerw
Copy link
Member

noerw commented Dec 7, 2020

Did this make it into v1.13.0? Merge date lets me think so, but milestone says otherwise..

@lunny
Copy link
Member

lunny commented Dec 7, 2020

You should compare merge date with v1.13.0-rc1 but not v1.13.0

@go-gitea go-gitea locked and limited conversation to collaborators Dec 14, 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. modifies/api This PR adds API routes or modifies them type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[API] Delete a Tag
6 participants