aws-cdk icon indicating copy to clipboard operation
aws-cdk copied to clipboard

feat(codebuild): add support of organization webhook in github source

Open dviryamin opened this issue 1 year ago • 2 comments

Issue # (if applicable)

closes #31736

Reason for this change

Currently, the AWS CDK aws-codebuild module lacks native support for creating GitHub organization-level webhooks through the Source construct. Users need to manually use the CfnProject to enable organization webhooks, which adds complexity and inconsistency to the CodeBuild setup. This PR introduces support for creating GitHub organization webhooks directly within the Source construct, streamlining the experience and making it more consistent with the rest of the AWS CDK's high-level constructs.

Description of changes

  • Enhanced the GitHubSource construct in the aws-codebuild module to support GitHub organization webhooks.
  • Updated the GitHubSource construct's configuration to so when repo is not specified an organization webhook is created.
  • Added filter of REPOSITORY_NAME to FilterGroups.

Description of how you validated changes

  • [x] Added unit tests to validate that organization-level webhooks are created correctly when repo is not specified.
  • [x] Ran integration tests to ensure that the changes do not break any existing functionality related to project webhooks.
  • [x] Tested deployment of a CodeBuild project with organization webhook setup in a sample CDK application to verify end-to-end functionality.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

dviryamin avatar Oct 12 '24 17:10 dviryamin

This is great - any blockers on getting this merged

shivatalwar avatar Oct 20 '24 04:10 shivatalwar

@dviryamin do you need any help with the failed integ test?

GavinZZ avatar Oct 24 '24 21:10 GavinZZ

Hi @GavinZZ, Thank you for offering to help! I’ve updated the integration test snapshot with the new default image, so the tests should pass now. I’d really appreciate it if you could take a moment to review the PR when you have time. Looking forward to your feedback!

dviryamin avatar Oct 25 '24 00:10 dviryamin

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

mergify[bot] avatar Oct 28 '24 17:10 mergify[bot]

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 12d982547aeddbb7d69e7d5ad2ccbadb6260e06c
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

aws-cdk-automation avatar Oct 28 '24 17:10 aws-cdk-automation

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

mergify[bot] avatar Oct 28 '24 17:10 mergify[bot]

Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.

github-actions[bot] avatar Oct 28 '24 17:10 github-actions[bot]