We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello, excellent project! I'm very excited to use it in gitlab, but unfortunately I can't. Comments can't be posted to any gitlab mr.
I think that error is here:
tfnotify/notifier/gitlab/gitlab.go
Line 26 in a2897c6
To be precise error-prone part is this: fmt.Sprintf("%s/%s", g.namespace, g.project)
fmt.Sprintf("%s/%s", g.namespace, g.project)
sprint here leads to incorrect api url: https://gitlab.com/api/v4/projects/{namespace}/{project}/merge_requests/{mr}/notes
https://gitlab.com/api/v4/projects/{namespace}/{project}/merge_requests/{mr}/notes
because gitlab doesn't have namespace and project, only project, so right url should look like this:
https://gitlab.com/api/v4/projects/{project}/merge_requests/{mr}/notes
also it should be mentioned that underlying gitlab client specifies this signature: https://github.com/xanzy/go-gitlab/blob/41c6472d936a0ce5f919f7eb1afb8dc8ac46247a/notes.go#L477
func (s *NotesService) CreateMergeRequestNote(pid interface{}, mergeRequest int, opt *CreateMergeRequestNoteOptions, options ...RequestOptionFunc) (*Note, *Response, error) {
where pid is for project_id
pid
project_id
The text was updated successfully, but these errors were encountered:
No branches or pull requests
WHAT
Hello, excellent project! I'm very excited to use it in gitlab, but unfortunately I can't. Comments can't be posted to any gitlab mr.
WHY
I think that error is here:
tfnotify/notifier/gitlab/gitlab.go
Line 26 in a2897c6
To be precise error-prone part is this:
fmt.Sprintf("%s/%s", g.namespace, g.project)
sprint here leads to incorrect api url:
https://gitlab.com/api/v4/projects/{namespace}/{project}/merge_requests/{mr}/notes
because gitlab doesn't have namespace and project, only project, so right url should look like this:
https://gitlab.com/api/v4/projects/{project}/merge_requests/{mr}/notes
also it should be mentioned that underlying gitlab client specifies this signature:
https://github.com/xanzy/go-gitlab/blob/41c6472d936a0ce5f919f7eb1afb8dc8ac46247a/notes.go#L477
func (s *NotesService) CreateMergeRequestNote(pid interface{}, mergeRequest int, opt *CreateMergeRequestNoteOptions, options ...RequestOptionFunc) (*Note, *Response, error) {
where
pid
is forproject_id
The text was updated successfully, but these errors were encountered: