Release: Bug Fixes and Improvements (#399)
fix: Error messages and run all tests (#381) feat: Automatically open fold under cursor (#380) fix: Discussion ID is not required (#383) chore: Add more emojis (#384) fix: Publish all drafts (#391) fix: Make discussion tree buffers no-modifiable (#394) fix: Incorrect warning about commits (#395) fix: Show draft replies in the correct tree (#396) fix: Cannot choose merge requests (#398) --------- Co-authored-by: George Kontridze <george.kontridze@gmail.com> Co-authored-by: Jakub F. Bortlík <jakub.bortlik@proton.me>
This commit is contained in:
committed by
GitHub
parent
38bde8a0e4
commit
341d56a1cb
@@ -11,7 +11,7 @@ type PluginOptions struct {
|
||||
GitlabRequest bool `json:"gitlab_request"`
|
||||
GitlabResponse bool `json:"gitlab_response"`
|
||||
} `json:"debug"`
|
||||
ChosenTargetBranch *string `json:"chosen_target_branch,omitempty"`
|
||||
ChosenMrIID int `json:"chosen_mr_iid"`
|
||||
ConnectionSettings struct {
|
||||
Insecure bool `json:"insecure"`
|
||||
Remote string `json:"remote"`
|
||||
|
||||
@@ -105,7 +105,10 @@ func (m withMrMiddleware) handle(next http.Handler) http.Handler {
|
||||
options := gitlab.ListProjectMergeRequestsOptions{
|
||||
Scope: gitlab.Ptr("all"),
|
||||
SourceBranch: &m.data.gitInfo.BranchName,
|
||||
TargetBranch: pluginOptions.ChosenTargetBranch,
|
||||
}
|
||||
|
||||
if pluginOptions.ChosenMrIID != 0 {
|
||||
options.IIDs = gitlab.Ptr([]int{pluginOptions.ChosenMrIID})
|
||||
}
|
||||
|
||||
mergeRequests, _, err := m.client.ListProjectMergeRequests(m.data.projectInfo.ProjectId, &options)
|
||||
|
||||
Reference in New Issue
Block a user