Skip to content

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

Closed
@guillep2k

Description

@guillep2k
  • 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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions