Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS CodeBuild trigger project on PR closed event

I'm using AWS CodeBuild and want to trigger project when my PR has been closed (WITHOUT being merged to base branch).

Terraform code example for regular merge event listed below

resource "aws_codebuild_webhook" "pr_closed" {
  project_name = "my_codebuild_project"

  filter_group {
    filter {
      type    = "EVENT"
      pattern = "PULL_REQUEST_MERGED"
    }
  }
}

Seems like there is no such event here in documentation

allowed events Is there a way to make it happen?

like image 425
Most Wanted Avatar asked Feb 06 '26 10:02

Most Wanted


1 Answers

I realize this question was asked some time ago, but for anyone finding this now - CodeBuild now supports for filtering on pull request closed events without a merge.

You can use a "PULL_REQUEST_CLOSED" for both your GitHub and BitBucket webhook.

like image 78
Yong Tao Avatar answered Feb 08 '26 01:02

Yong Tao