Conversation
|
I think this is ready to review again. |
| } | ||
|
|
||
| // add dev links | ||
| if pr.Flow == issues_model.PullRequestFlowGithub { |
There was a problem hiding this comment.
Why GitHub-only ? Agit PR can't be used to close an issue?
There was a problem hiding this comment.
Agit PR have no real head branch. So that branch, err := git_model.GetBranch(ctx, pr.HeadRepoID, pr.HeadBranch) will fail.
There was a problem hiding this comment.
Is it really reasonable?
Here you are creating "IssueDevLinkTypePullRequest" dev-links.
You mean that AGit PR can't be used to link to an issue and close the related issue?
| <a class="tw-mt-1 fluid ui show-modal" data-modal="#create_branch">{{ctx.Locale.Tr "repo.branch.new_branch"}}</a> | ||
| </div> | ||
| {{end}} | ||
| {{range .DevLinks}} |
There was a problem hiding this comment.
Please don't use the data from root template data.
Most side bar parts have been refactored to use their own "struct" types to make code stable.
I don't. |
|
@lunny updates on that? |
Updated. |
There was a problem hiding this comment.
https://github.com/go-gitea/gitea/pull/31899/files#r1881918670
Just tried to play with GitHub's development sidebar for a while. I can see there could be a lot of edge cases:
- create a new branch
123-my-issue, rename the branch to123-my-issue-other, the link disappears, rename another branch to123-my-issue, the link won't appear again.- create a new branch
123-my-issue, create a PR from123-my-issue, then the link is updated to PR, the branch link is replaced.I believe these details need enough documents(comments) and tests.
|
I just downloaded this branch to play around with the development sidebar in its current state, to test the edge cases that wxiaoguang mentioned earlier. The rename and delete branch scenarios behave very differently from the described GitHub behavior. This is not necessarily a bad thing, though:
|
Assisted-by: Codet:unknown
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.No related branch or PR

Create new branch from the issue
Prefill title and content when creating pull request from the issue development link

Realted PR created

Related PR merged

Mayge fixed near the issue title
