yuyaban / gitlab-comment

About gitlab-comment is a CLI command to post Merge Request Note.
Other
14 stars 2 forks source link

Retrieve mr number from commit hash #10

Closed kitagry closed 1 year ago

kitagry commented 1 year ago

Hi @yuyaban . Thank you for the nice tool!

I want to comment to MR when the MR is merged. So, I implemented the feature to retrieve MR number associated with SHA1.

And, sorry:pray: This PR include #9 commits. :bow: :bow: So, I will close #9

yuyaban commented 1 year ago

Thank you for your contribution. There are two things I would like to see fixed. If possible, please modified.

yuyaban commented 1 year ago

Currently, getMRNumber returns Error if CI_MERGE_REQUEST_IID is not found. Since CI_MERGE_REQUEST_IID is not defined at merging MRs pipeline, I think it is better to return nil if CI_MERGE_REQUEST_IID is not found. https://github.com/yuyaban/gitlab-comment/blob/469c9a85038e7e42e88be68dc30e03c361d20b69/pkg/platform/platform.go#L37-L46

kitagry commented 1 year ago

@yuyaban Thank you for the review! I fixed

yuyaban commented 1 year ago

@kitagry Thank you for your contribution!! 🙇