Skip to content
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

Fix comment to associated MR when push pipeline #23

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

kitagry
Copy link
Collaborator

@kitagry kitagry commented Apr 11, 2024

relate #17

I discovered that the changes I made were blocked in this part( https://github.com/kitagry/tfcmt-gitlab/blob/main/pkg/notifier/gitlab/notify.go?plain=1#L67-L76 ).

Comment on lines +237 to +240
name: "get MR IID when MR number is 0",
createMockGitLabAPI: func(ctrl *gomock.Controller) *gitlabmock.MockAPI {
api := gitlabmock.NewMockAPI(ctrl)
api.EXPECT().ListCommits(gomock.Any()).Return([]*gitlab.Commit{{ID: "1"}, {ID: "2"}}, nil, nil)
api.EXPECT().ListMergeRequestsByCommit("2").Return([]*gitlab.MergeRequest{{IID: 1}}, nil, nil)
api.EXPECT().ListMergeRequestsByCommit("revision").Return([]*gitlab.MergeRequest{{IID: 1}}, nil, nil)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirmed the behavior here.

@kitagry kitagry requested a review from hirosassa April 11, 2024 00:50
@kitagry
Copy link
Collaborator Author

kitagry commented Apr 11, 2024

@hirosassa @yokomotod Please review!

@kitagry kitagry requested a review from yokomotod April 11, 2024 05:22
Copy link
Collaborator

@yokomotod yokomotod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kitagry You mean !17 have actually never worked, right ?

If I understood correctly, LGTM

pkg/notifier/gitlab/commits_test.go Outdated Show resolved Hide resolved
@kitagry kitagry merged commit 2b267e0 into hirosassa:main Apr 11, 2024
1 check passed
@kitagry kitagry deleted the fix-last-one branch April 11, 2024 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants