Skip to content

Improve timeline entries for WIP prefix changes in pull requests#36518

Merged
wxiaoguang merged 25 commits intomainfrom
copilot/fix-issue-36517
Feb 5, 2026
Merged

Improve timeline entries for WIP prefix changes in pull requests#36518
wxiaoguang merged 25 commits intomainfrom
copilot/fix-issue-36517

Conversation

Copy link
Contributor

Copilot AI commented Feb 2, 2026

Add new timeline event types when the WIP prefix is added or removed, replacing the previous ugly title change messages.

Fixes: #36517

image

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 2, 2026
Copilot AI and others added 4 commits February 2, 2026 17:28
- Added CommentTypeMarkedAsWorkInProgress and CommentTypeMarkedAsReadyForReview
- Updated ChangeIssueTitle to detect WIP prefix changes
- Added locale strings for the new messages
- Updated template to render new comment types

Co-authored-by: silverwind <115237+silverwind@users.noreply.github.com>
Co-authored-by: silverwind <115237+silverwind@users.noreply.github.com>
…for WIP

Co-authored-by: silverwind <115237+silverwind@users.noreply.github.com>
Co-authored-by: silverwind <115237+silverwind@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue related to gitea functionality Improve timeline entries for WIP prefix changes in pull requests Feb 2, 2026
Copilot AI requested a review from silverwind February 2, 2026 17:37
@github-actions github-actions bot added modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files labels Feb 2, 2026
@silverwind
Copy link
Member

Tested, works:

image

- Changed translation keys from repo.issues.* to repo.pulls.*
- Removed unnecessary %s placeholder and $createdStr argument from messages

Co-authored-by: silverwind <115237+silverwind@users.noreply.github.com>
Co-authored-by: silverwind <115237+silverwind@users.noreply.github.com>
@silverwind silverwind marked this pull request as ready for review February 2, 2026 18:05
@silverwind
Copy link
Member

silverwind commented Feb 2, 2026

@copilot restore the $createdStr suffix removed in d2d6b91, it's needed.

@lunny
Copy link
Member

lunny commented Feb 4, 2026

Maybe a new column is_draft should be added to pull request table.

@silverwind
Copy link
Member

silverwind commented Feb 4, 2026

Maybe a new column is_draft should be added to pull request table.

If we wanna completely implement it like GitHub, the "WIP" prefix would need to be removed but I guess that would be too breaking for users which may be used to manually adding that prefix, potentially in their git commit message title.

The only gain that a separate is_draft boolean would bring is that when a user manually adds or removes the prefix, we could opt to not set the PR in/out of draft, but in my opinion that's actually desirable behaviour to decide draft status on presence or absence of prefix alone.

@lunny
Copy link
Member

lunny commented Feb 4, 2026

Maybe a new column is_draft should be added to pull request table.

If we wanna completely implement it like GitHub, the "WIP" prefix would need to be removed but I guess that would be too breaking for users which may be used to manually adding that prefix, potentially in their git commit message title.

The only gain that a separate is_draft boolean would bring is that when a user manually adds or removes the prefix, we could opt to not set the PR in/out of draft, but in my opinion that's actually desirable behaviour to decide draft status on presence or absence of prefix alone.

Another benefit is that it could be used as a filter option in the pull request list.

@silverwind
Copy link
Member

silverwind commented Feb 4, 2026

Another benefit is that it could be used as a filter option in the pull request list.

Hmm yes I agree but can be added in another PR imho. It will be a bit complex because it requires a migration. I would like to keep this PR focused on only adjusting the timeline messages.

@silverwind
Copy link
Member

AGENTS.md is further slimmed down. The removed instructions are unnecessary for a somewhat smart agent and a non-issue with local agents.

@lunny
Copy link
Member

lunny commented Feb 5, 2026

The issue https://github.com/go-gitea/gitea/pull/36518/files#r2765306365 need to be resovled.

@wxiaoguang
Copy link
Contributor

We need those new comment types, they differ by icon and I want them to match GitHub:

No, you can still have different icons by #36518 (comment), it's clearer and simpler.

And it's easier to "cover that case user edit title and changed wip prefix also title at the same time".

@silverwind
Copy link
Member

I don't understand "cover that case user edit title and changed wip prefix also title at the same time".

These are two distinct actions on the UI, one is a title edit and there's the wip toggle button. How could those be triggered at the same time?

@silverwind
Copy link
Member

You can "fix" #36517 by checking the old/new titles when rendering the timeline item without introducing more CommentType.

What kind of timeline item should it use? Is there a a generic type?

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Feb 5, 2026

I don't understand "cover that case user edit title and changed wip prefix also title at the same time".

These are two distinct actions on the UI, one is a title edit and there's the wip toggle button. How could those be triggered at the same time?

Edit the title manually

You can "fix" #36517 by checking the old/new titles when rendering the timeline item without introducing more CommentType.

What kind of timeline item should it use? Is there a a generic type?

<div timeline>
   <badge> $item.IconName </badge>
   <content> $item.Content </content>
</div>
image

@silverwind
Copy link
Member

Edit the title manually

Ah, a title edit with wip state change, yes in this case it needs to show the rename timeline item.

@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 Feb 5, 2026
@wxiaoguang wxiaoguang added the type/enhancement An improvement of existing functionality label Feb 5, 2026
@wxiaoguang wxiaoguang enabled auto-merge (squash) February 5, 2026 05:36
@wxiaoguang wxiaoguang merged commit 000d7c1 into main Feb 5, 2026
28 checks passed
@GiteaBot GiteaBot added this to the 1.26.0 milestone Feb 5, 2026
@wxiaoguang wxiaoguang deleted the copilot/fix-issue-36517 branch February 5, 2026 05:57
zjjhot added a commit to zjjhot/gitea that referenced this pull request Feb 9, 2026
* giteaofficial/main:
  Refactor merge conan and container auth preserve actions taskID (go-gitea#36560)
  Fix assignee sidebar links and empty placeholder after go-gitea#32465 refactor (go-gitea#36559)
  Fix various version parsing problems (go-gitea#36553)
  Fix highlight diff result (go-gitea#36539)
  Refactor Nuget Auth to reuse Basic Auth Token Validation (go-gitea#36558)
  Update go dependencies (go-gitea#36548)
  Prevent navigation keys from triggering actions during IME composition (go-gitea#36540)
  Fix various mermaid bugs (go-gitea#36547)
  Add `elk` layout support to mermaid (go-gitea#36486)
  Allow configuring default PR base branch (fixes go-gitea#36412) (go-gitea#36425)
  [skip ci] Updated translations via Crowdin
  Color command/error logs in Actions log (go-gitea#36538)
  Add paging headers (go-gitea#36521)
  Fix issues filter dropdown showing empty label scope section (go-gitea#36535)
  [SECURITY] fix: Adjust the toolchain version (go-gitea#36537)
  Hide `add-matcher` and `remove-matcher` from actions job logs (go-gitea#36520)
  Improve timeline entries for WIP prefix changes in pull requests (go-gitea#36518)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/docs modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files type/enhancement An improvement of existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve the pull request timeline entry when adding or removing the WIP: prefix

6 participants