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

Add a new section named development in issue view sidebar to interact with branch/pr #31899

Open
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

lunny
Copy link
Member

@lunny lunny commented Aug 21, 2024

Partially Resolve #20226

This PR add a new section on the sidebar of issue named Development. It supports creating one or multiple branches and pull requests from the sidebar.

  1. No related branch or PR
    image

  2. Create new branch from the issue
    image

  3. Related branch created
    图片

  4. Prefill title and content when creating pull request from the issue development link
    图片

  5. Realted PR created
    image

  6. Related PR merged
    image

  7. Mayge fixed near the issue title
    image

TODO:

  • Delete dev_link records from database when deleting repos/issues
  • Delete dev_link records from database when deleting pull requests/branch
  • Allow creating multiple branches/pull requests from UI
  • Bring issue information into the pull request when creating pull request

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 21, 2024
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 21, 2024
@github-actions github-actions bot added modifies/translation modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files modifies/migrations labels Aug 21, 2024
@pull-request-size pull-request-size bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 22, 2024
@pull-request-size pull-request-size bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 22, 2024
@pull-request-size pull-request-size bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 29, 2024
@lunny lunny marked this pull request as ready for review August 29, 2024 19:46
@lunny lunny added this to the 1.23.0 milestone Aug 29, 2024
@lunny lunny added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Aug 29, 2024
@techknowlogick techknowlogick added topic/ui Change the appearance of the Gitea UI topic/ux How users interact with Gitea labels Sep 24, 2024
for _, link := range devLinks {
if link.LinkType == issues_model.IssueDevLinkTypePullRequest {
if !(link.PullRequest.Issue.IsClosed && !link.PullRequest.HasMerged) {
ctx.Data["MaybeFixed"] = link.PullRequest
Copy link
Contributor

Choose a reason for hiding this comment

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

Will it be conflict with cross references? In some cases, the title may say "May be fixed by #1" and the comment list may say "User referenced a pull request that will close this issue (#2)".

Copy link
Member Author

Choose a reason for hiding this comment

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

In future, I will add a new record in this table when there is a xref.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 1 This PR needs approval from one additional maintainer to be merged. modifies/go Pull requests that update Go code modifies/migrations modifies/templates This PR modifies the template files modifies/translation size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. topic/ui Change the appearance of the Gitea UI topic/ux How users interact with Gitea 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.

Create a branch from an issue, with pull/merge request
5 participants