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

Commits should only close/reopen issues if the issue has the correct branch #8260

Closed
guillep2k opened this issue Sep 22, 2019 · 5 comments
Closed
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug

Comments

@guillep2k
Copy link
Member

  • Gitea version (or commit ref): 1.9.3

Description

Currently a commit can close or reopen an issue it is referencing, either if repo.CloseIssuesViaCommitInAnyBranch is set or when the commit is being pushed to the default branch. However, if Issue.Ref is set, it should be used instead of the default branch.

gitea/models/action.go

Lines 603 to 607 in 63ff616

// Change issue status only if the commit has been pushed to the default branch.
// and if the repo is configured to allow only that
if repo.DefaultBranch != branchName && !repo.CloseIssuesViaCommitInAnyBranch {
continue
}

@lunny lunny added the type/bug label Sep 23, 2019
@adelowo
Copy link
Member

adelowo commented Sep 23, 2019

It is there for backward compatibility

See #5992 and #5957

@guillep2k
Copy link
Member Author

It is there for backward compatibility

See #5992 and #5957

@adelowo Using CloseIssuesViaCommitInAnyBranch is alright, but if it's not set, an the issue is marked on branch release (Issue.Ref == release), a commit on dev should not close the issue.

@adelowo
Copy link
Member

adelowo commented Sep 23, 2019

Ha true

@stale
Copy link

stale bot commented Nov 22, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label Nov 22, 2019
@zeripath zeripath added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Nov 22, 2019
@stale stale bot removed the issue/stale label Nov 22, 2019
@guillep2k
Copy link
Member Author

This was fixed in #8875

@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
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug
Projects
None yet
Development

No branches or pull requests

4 participants