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

Prevent double-close of issues #6233

Merged

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented Mar 3, 2019

It's currently possible to end double-closing issues thus leading to a negative number of pulls remaining to be closed. This PR reloads the issue from the database within the transaction and checks that it isn't already closed in the database.

@codecov-io
Copy link

codecov-io commented Mar 3, 2019

Codecov Report

Merging #6233 into master will decrease coverage by 0.01%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6233      +/-   ##
==========================================
- Coverage   38.84%   38.83%   -0.02%     
==========================================
  Files         355      355              
  Lines       50239    50243       +4     
==========================================
- Hits        19516    19512       -4     
- Misses      27897    27903       +6     
- Partials     2826     2828       +2
Impacted Files Coverage Δ
models/issue.go 48.26% <33.33%> (-0.08%) ⬇️
modules/process/manager.go 76.81% <0%> (-4.35%) ⬇️
models/repo_list.go 66.84% <0%> (-1.06%) ⬇️

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 1986269...550141a. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 3, 2019
models/issue.go Outdated Show resolved Hide resolved
Co-Authored-By: zeripath <art27@cantab.net>
@GiteaBot GiteaBot removed the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 4, 2019
@lafriks lafriks added this to the 1.8.0 milestone Mar 4, 2019
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Mar 4, 2019
@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 Mar 4, 2019
@techknowlogick techknowlogick merged commit f066bd2 into go-gitea:master Mar 5, 2019
@zeripath zeripath deleted the prevent-negative-num-closed-pulls branch March 13, 2019 09:55
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 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.

6 participants