-
Notifications
You must be signed in to change notification settings - Fork 43
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
Enhanced GitHub webhook handler tests. #3370
Conversation
48ae4ea
to
a658174
Compare
// Previous lookup was done at this path | ||
// ".package.package_version.container_metadata.tag.name", | ||
// which is unfortunately not have available under go-github, | ||
// as field "container_metadata" is missing form its structs. | ||
// I suggest using the following, although it's still to be | ||
// verified whether that's the right one. | ||
tag, err := util.JQReadFrom[string](ctx, ".package.package_version.tag_name", payload) |
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.
Please have a look at this, I'm not sure this is 100% correct.
&serverconfig.ProviderConfig{ | ||
GitHubApp: &serverconfig.GitHubAppConfig{ | ||
WebhookSecret: "test", | ||
}, | ||
}, |
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 not particularly happy about these lines of code, but they do not impact any other test as of now. Ideally, it should be easy to start a simple server just for testing, but I did not want to pollute this PR more than necessary.
Please, let me know your opinions on this.
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 might not be as necessary with this #3371
Summary
This PR is only about adding test coverage to GitHub webhook handler.
Fixes #3358
Review Checklist: