Amazon CodeCommit is no longer available to new customers. Existing customers of
Amazon CodeCommit can continue to use the service as normal.
Learn more"
Disassociate an approval rule template
If the approval rules generated by an approval rule template no longer make sense for your team's workflow in a repository, you can disassociate the template from that repository. Disassociating a template does not remove any approval rules created while the template was associated with the repository.
For more information about managed policies and permissions for approval rule templates, see Permissions for actions on approval rule templates and Amazon managed policies for CodeCommit.
Disassociate an approval rule template (console)
You can use the console to remove the association between a repository and an approval rule template.
To disassociate an approval rule template from repositories
Open the CodeCommit console at https://console.www.amazonaws.cn/codesuite/codecommit/home
. -
Choose Approval rule templates. Choose the template you want to disassociate from a repository or repositories, and then choose Edit.
-
In Associated repositories, choose the X next to the repositories you want to disassociate. The repository names no longer appear.
-
Choose Save. Approval rules are not applied to pull requests created in those repositories. The rules are still applied to pull requests that were made while the association was in place.
Disassociate an approval rule template (Amazon CLI)
You can use the Amazon CLI to disassociate one or more repositories from an approval rule template.
To disassociate an approval rule template from a repository
-
At the terminal or command line, run the disassociate-approval-rule-template-from-repository command, specifying:
-
The name of the approval rule template.
-
The name of the repository.
For example, to disassociate an approval rule template named
1-approver-rule-for-all-pull-requests
from a repository namedMyDemoRepo
:aws codecommit disassociate-approval-rule-template-from-repository --repository-name
MyDemoRepo
--approval-rule-template-name1-approver-rule-for-all-pull-requests
-
-
If successful, this command returns nothing.
To disassociate an approval rule template from multiple repositories
-
At the terminal or command line, run the batch-disassociate-approval-rule-template-from-repositories command, specifying:
-
The name of the approval rule template.
-
The names of the repositories.
For example, to disassociate an approval rule template named
1-approver-rule-for-all-pull-requests
from a repository namedMyDemoRepo
and a repository namedMyOtherDemoRepo
:aws codecommit batch-disassociate-approval-rule-template-from-repositories --repository-names "
MyDemoRepo
", "MyOtherDemoRepo
" --approval-rule-template-name1-approver-rule-for-all-pull-requests
-
-
If successful, this command returns output similar to the following:
{ "disassociatedRepositoryNames": [ "MyDemoRepo", "MyOtherDemoRepo" ], "errors": [] }