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 34 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
@yp05327
Copy link
Contributor

yp05327 commented Oct 15, 2024

Can we just close the modal after click the button no matter whether the creation is success or not?
Or it is hard to see the error message:
image

@yp05327
Copy link
Contributor

yp05327 commented Oct 15, 2024

image
this is not in middle

@yp05327
Copy link
Contributor

yp05327 commented Oct 15, 2024

image
No word break for long branch name

Also here:
image
image

@yp05327
Copy link
Contributor

yp05327 commented Oct 15, 2024

If I changed the values of the form, and leave this page, a warning will disappear:
image

@yp05327
Copy link
Contributor

yp05327 commented Oct 15, 2024

image
Only branch name here, but no owner name.
ps: testaaa branch is from fork.

@yp05327
Copy link
Contributor

yp05327 commented Oct 15, 2024

image
use the time template like this?
image

@yp05327
Copy link
Contributor

yp05327 commented Oct 15, 2024

We have this:
image
So I think we can use it here:
image

Or also here?
Uploading image.png…

@yp05327
Copy link
Contributor

yp05327 commented Oct 15, 2024

The prefill title and content can be uppercase?

@yp05327
Copy link
Contributor

yp05327 commented Oct 15, 2024

image

Maybe the empty value check can be done by js/browser first?

@yp05327
Copy link
Contributor

yp05327 commented Oct 15, 2024

Branch list is not correct.
image
This branch is only exist in the origin repo, not in the fork repo.
And you can even select the base branch first, no matter whether you have selected the repo or not.
It is wrong.
image

@yp05327
Copy link
Contributor

yp05327 commented Oct 15, 2024

image
And what is this reference for? It seems that they are similar.

@lunny
Copy link
Member Author

lunny commented Oct 22, 2024

image And what is this reference for? It seems that they are similar.

This is unrelated to this pull request. It's to record the bug's branch.

<select name="source_branch_name">
{{range .Branches}}
<option value="{{.}}"{{if eq . $.Issue.Ref}} checked{{end}}>{{.}}</option>
{{end}}
Copy link
Contributor

Choose a reason for hiding this comment

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

It is wrong.

  1. What is a Ref and what was it ever used for? Is it really related to the "issue link"?
  2. You can't compare a branch to a ref.

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
6 participants