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

Closed
opened 2025-11-02 05:33:36 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @guillep2k on GitHub (Sep 22, 2019).

  • 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.

63ff61615e/models/action.go (L603-L607)

Originally created by @guillep2k on GitHub (Sep 22, 2019). - 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. https://github.com/go-gitea/gitea/blob/63ff61615ec6aaa25887f8ce605c9082c106a34b/models/action.go#L603-L607
GiteaMirror added the issue/confirmedtype/bug labels 2025-11-02 05:33:36 -06:00
Author
Owner

@adelowo commented on GitHub (Sep 23, 2019):

It is there for backward compatibility

See https://github.com/go-gitea/gitea/pull/5992 and https://github.com/go-gitea/gitea/issues/5957

@adelowo commented on GitHub (Sep 23, 2019): It is there for backward compatibility See https://github.com/go-gitea/gitea/pull/5992 and https://github.com/go-gitea/gitea/issues/5957
Author
Owner

@guillep2k commented on GitHub (Sep 23, 2019):

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.

@guillep2k commented on GitHub (Sep 23, 2019): > > > 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.
Author
Owner

@adelowo commented on GitHub (Sep 23, 2019):

Ha true

@adelowo commented on GitHub (Sep 23, 2019): Ha true
Author
Owner

@stale[bot] commented on GitHub (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[bot] commented on GitHub (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.
Author
Owner

@guillep2k commented on GitHub (Nov 22, 2019):

This was fixed in #8875

@guillep2k commented on GitHub (Nov 22, 2019): This was fixed in #8875
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4000