Skip to content

Conversation

@chungjac
Copy link
Contributor

@chungjac chungjac commented Nov 7, 2025

Problem

Relied on Github Actions to do the version increment, but actually any commits going into main but be done via PR, or have the appropriate permissions

remote: error: GH013: Repository rule violations found for refs/heads/main.        
remote: Review all repository rules at https://github.com/aws/aws-toolkit-common/rules?ref=refs%2Fheads%2Fmain        
remote: 
remote: - Changes must be made through a pull request.        
remote: 
remote: - 4 of 4 required status checks are expected.        
remote: 
To https://github.com/aws/aws-toolkit-common
 ! [remote rejected] main -> main (push declined due to repository rule violations)
error: failed to push some refs to 'https://github.com/aws/aws-toolkit-common'
Error: Process completed with exit code 1.

Solution

Codepipelines has permission as it authenticates as aws-toolkit-automation user with write permissions to be able to push commits directly into main

New Flow

  1. When user merges PR to main, triggers Github Actions workflow which immediately triggers the CodePipeline
  2. CodePipeline goes through stages
    1. clone repo
    2. aws-toolkit-automation commits version increment to main
    3. build maven/nuget
    4. publish maven/nuget
  3. When aws-toolkit-automation commits version increment to main, Github Actions workflow will publish npm

License

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

@chungjac chungjac requested a review from a team as a code owner November 7, 2025 02:05
@chungjac chungjac merged commit e9b806c into aws:main Nov 7, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants