Skip to content

Commit 7a10bac

Browse files
Update services/pull/pull.go
Co-authored-by: wxiaoguang <[email protected]>
1 parent a73248d commit 7a10bac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

services/pull/pull.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ func NewPullRequest(ctx context.Context, opts *NewPullRequestOptions) error {
6464
}
6565

6666
// user should be a collaborator or a member of the organization for base repo
67-
if (!issue.Poster.IsAdmin) && pr.Flow == issues_model.PullRequestFlowGithub {
67+
canCreate := issue.Poster.IsAdmin || pr.Flow == issues_model.PullRequestFlowAGit
68+
if !canCreate {
6869
canCreate, err := repo_model.IsOwnerMemberCollaborator(ctx, repo, issue.Poster.ID)
6970
if err != nil {
7071
return err

0 commit comments

Comments
 (0)