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 support for creating GitLab issues #37
Conversation
go.mod
Outdated
@@ -1,17 +1,11 @@ | |||
module github.com/matrix-org/rageshake | |||
|
|||
go 1.16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the readme claims "rageshake requires Go version 1.11 or later."
I have no particular desire to support ancient Go versions, but we better update the documentation and the CI if we want to update it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the readme and go.mod to say 1.15 and made matrix-org/pipelines#171 to update the CI.
@@ -541,7 +570,7 @@ func buildReportTitle(p parsedPayload) string { | |||
return trimmedUserText | |||
} | |||
|
|||
func buildReportBody(p parsedPayload, quoteChar string) *bytes.Buffer { | |||
func buildReportBody(p parsedPayload, newline, quoteChar string) *bytes.Buffer { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is getting a bit confusing. A comment explaining what exactly the parameters do would be helpful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also not entirely convinced this needs to be different between email and github/gitlab?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Email isn't markdown and I didn't want to accidentally break something with extra spaces at the end of each line, but I guess it might be fine to add the spaces for emails too. (GitHub is markdown, but doesn't seem to require the two spaces for newlines. GitLab does require spaces to make a newline)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm otherwise
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Thanks @tulir! |
This adds support for creating GitLab issues using https://github.com/xanzy/go-gitlab.
I also updated the report body to have two spaces before newlines so it would work better as markdown. I'd assume GitHub doesn't care either way, but GitLab requires those.
Signed-off-by: Tulir Asokan <tulir@maunium.net>