Skip to content

feat!: remove the issue branch/tag reference - #39114

Draft
silverwind wants to merge 1 commit into
go-gitea:mainfrom
silverwind:remove-issue-ref
Draft

feat!: remove the issue branch/tag reference#39114
silverwind wants to merge 1 commit into
go-gitea:mainfrom
silverwind:remove-issue-ref

Conversation

@silverwind

@silverwind silverwind commented Aug 25, 2026

Copy link
Copy Markdown
Member

The issue sidebar's branch selector only stored a ref name and displayed it back. Nothing else acts on it, and it has been marked for removal since 1.24 in #32744.

Breaking is unavoidable: the column backing these fields goes away, so keeping them would mean returning an empty ref forever.

⚠️ BREAKING ⚠️

  • ref is removed from the issue API (Issue, CreateIssueOption, EditIssueOption) and from issue webhook payloads. There is no replacement, record the branch in the issue title or body instead.
  • ref in issue templates is ignored, existing templates keep working.
  • With CloseIssuesViaCommitInAnyBranch disabled, an issue that had a ref is now closed by default-branch commits instead of commits on that ref.
  • Migration 352 drops the issue.ref column.

The issue sidebar's branch selector only ever wrote a ref name into the
database and displayed it back. It offered no indication of what picking a
branch would do, and eight years on there is still no behaviour attached to
it beyond one narrow close-via-commit exception.

Removing it also drops a branch listing and a tag query from every issue
view and new-issue render, since the PR target-branch dropdown is now the
only consumer of the branch list.

The comment type for past ref changes is kept so existing timelines still
render.

BREAKING: The `ref` field is removed from the issue API (`Issue`,
`CreateIssueOption`, `EditIssueOption`) and from issue webhook payloads. The
`ref` key in issue templates is ignored. With
`CloseIssuesViaCommitInAnyBranch` disabled, an issue that carried a ref is
now closed by commits on the default branch rather than on that ref.

Assisted-by: Claude Code:claude-opus-5
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 25, 2026
@github-actions github-actions Bot added pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! type/feature Completely new functionality. Can only be merged if feature freeze is not active. labels Aug 25, 2026
@silverwind silverwind changed the title feat!: remove the issue branch/tag reference chore!: remove the issue branch/tag reference Aug 25, 2026
@github-actions github-actions Bot added skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. and removed type/feature Completely new functionality. Can only be merged if feature freeze is not active. labels Aug 25, 2026

@wxiaoguang wxiaoguang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, it can't be removed at the moment.

There are still many users using it. Will provide you proofs.

@GiteaBot GiteaBot added lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Aug 25, 2026
@wxiaoguang

wxiaoguang commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

@silverwind

silverwind commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

The code is full of TODO: RemoveIssueRef comments since 1.5 years, maybe we should just drop those comments then?

I would at least move it to a less prominent position in the sidebar, e.g. not the first item.

@wxiaoguang

Copy link
Copy Markdown
Contributor

The code is full of TODO: RemoveIssueRef comments since 1.5 years, maybe we should just drop those comments then?

I think so, the comment needs to be updated, since we know there are real users.

@silverwind

silverwind commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

In my eyes the feature is of dubious usefulness. You can link PRs to an issue, and a branch can fix more than one issue. I'd rather drop it and dissatisfy 0.01% of users.

@wxiaoguang

Copy link
Copy Markdown
Contributor

In my eyes the feature is of dubious usefulness. You can link PRs to an issue, and a branch can fix more than one issue. I'd rather drop it and dissatisfy 0.01% of users.

I agree with you and that's why I ever proposed to remove it. But end users have other opinions. (more: #39062 (comment))

@bircni bircni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chores are not breaking

@lunny

lunny commented Aug 25, 2026

Copy link
Copy Markdown
Member

We could have an option to disable it by default in v28

@silverwind silverwind changed the title chore!: remove the issue branch/tag reference feat!: remove the issue branch/tag reference Aug 25, 2026
@github-actions github-actions Bot added type/feature Completely new functionality. Can only be merged if feature freeze is not active. and removed skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Aug 25, 2026
@silverwind

Copy link
Copy Markdown
Member Author

chores are not breaking

No fitting semantic commit type for a pure removal, I set feat! now which seems the most agreed upon type.

We could have an option to disable it by default in v28

Might actually work. I'm only concerned about having a clean issue UI without this useless dropdown.

@wxiaoguang
wxiaoguang marked this pull request as draft August 26, 2026 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! type/feature Completely new functionality. Can only be merged if feature freeze is not active.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants