From f2588d93c90709756ea20f7951329e64afd75ede Mon Sep 17 00:00:00 2001 From: Ivan Petrushevski <84075726+ippetrus@users.noreply.github.com> Date: Wed, 12 May 2021 13:43:03 +0200 Subject: [PATCH 1/2] Update default master branch to main As Github changed the default branch name from master, to main for new repositories, we should update in ADF as well, so customers will not require to modify the main branch in Github or provider custom parameter for branch. --- .../adf-build/shared/cdk/cdk_constructs/adf_github.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/cdk/cdk_constructs/adf_github.py b/src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/cdk/cdk_constructs/adf_github.py index ddeb06324..8429b7060 100644 --- a/src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/cdk/cdk_constructs/adf_github.py +++ b/src/lambda_codebase/initial_commit/bootstrap_repository/adf-build/shared/cdk/cdk_constructs/adf_github.py @@ -55,7 +55,7 @@ def create_webhook_when_required(scope, pipeline, map_params): filters=[ _codepipeline.CfnWebhook.WebhookFilterRuleProperty( json_path="$.ref", - match_equals="refs/heads/{0}".format(map_params.get('default_providers', {}).get('source', {}).get('properties', {}).get('branch', {}) or 'master') + match_equals="refs/heads/{0}".format(map_params.get('default_providers', {}).get('source', {}).get('properties', {}).get('branch', {}) or 'main') ) ], target_action="source", From e9c6f34c372751ae240b8036d18dc6f4164a47f4 Mon Sep 17 00:00:00 2001 From: Ivan Petrushevski <84075726+ippetrus@users.noreply.github.com> Date: Wed, 12 May 2021 13:59:51 +0200 Subject: [PATCH 2/2] Update documentation to affect Github branch name Github changed default branch name from master to main. Updating this in documentation to affect together with GIthub CDK helper code, which was updated in this proposed change. --- docs/providers-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/providers-guide.md b/docs/providers-guide.md index 2017790d7..785ede395 100644 --- a/docs/providers-guide.md +++ b/docs/providers-guide.md @@ -101,7 +101,7 @@ Provider type: `github`. > The GitHub repository name. > For example, for the ADF repository it would be: > `aws-deployment-framework`. -- *branch* - *(String)* - default: `master`. +- *branch* - *(String)* - default: `main`. > The Branch on the GitHub repository to use to trigger this specific > pipeline. - *owner* - *(String)* **(required)**