Open colyoonamaz opened 1 week ago
Hi @colyoonamaz , thanks for reaching out.
Is this FR in accordance with this bug reported - https://github.com/aws/aws-cdk/issues/31726
Could you please check and share your insights ?
I've submitted a PR that adds support for creating GitHub organization-level webhooks directly in the GitHubSource construct for CodeBuild.
However, I'm currently running into issues with building the aws-cdk-lib package locally and could use some help testing this feature. If anyone can assist by setting up a CodeBuild project with the new organization webhook property and verifying that it works as expected, I would greatly appreciate it!
Thanks in advance for any help and feedback!
Thanks @dviryamin for submtting a PR. For guidance/help, you could-
Hope this would be helpful!
@khushail, https://github.com/aws/aws-cdk/issues/31726 looks like a separate issue, as this is in relation to missing attributes rather than webhook creation failures
Hi @colyoonamaz, Thank you so much for your guidance and help! I was able to successfully build the aws-cdk-lib package locally and test my pull request with the new organization webhook feature. Everything worked as expected on my end.
It would be great if you could test it out as well and let me know if it resolves the issue you were facing. I’d really appreciate your feedback!
Describe the feature
CodeBuild webhooks in CDK should support the REPOSITORY_NAME/WORKFLOW name filters e.g.
as these filter types are currently missing (https://docs.aws.amazon.com/codebuild/latest/APIReference/API_WebhookFilter.html). Additionally, there is no option to provide a scope configuration for the webhook in the source (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-scopeconfiguration.html).
Use Case
The REPOSITORY_NAME/WORKFLOW_NAME filters are used to filter out organization/global webhook events, so that the webhook doesn't trigger builds for specific repositories/workflows. Additionally, scope configuration is needed to create an organization or global webhook (https://docs.aws.amazon.com/codebuild/latest/userguide/github-global-organization-webhook.html)
Proposed Solution
Add repository name and workflow name to the list of webhook filters and allow a scope configuration to be provided in the source for the webhook
Other Information
No response
Acknowledgements
CDK version used
2.162.1
Environment details (OS name and version, etc.)
Any