Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop PRs to same repo interfering with each other #89

Merged
merged 2 commits into from
Sep 19, 2024
Merged

Conversation

samuelallan72
Copy link
Contributor

Previously the branch name was static,
which caused issues when terraform opens PRs to multiple target branches to the same repository.
This is because the terraform run for each target branch was trying to work on the same branch,
and opening PRs from the same branch.
This was observed in repos when we maintain multiple branches (eg. snap-tempest with main, stable/caracal, stable/bobcat, etc.).

This fixes it by including the target branch name in the PR branch, ensuring that each PR in a target repository will use its own branch, and there won't be any more cross interference.

Fixes: #88

Previously the branch name was static,
which caused issues when terraform opens PRs to multiple target branches
to the same repository.
This is because the terraform run for each target branch
was trying to work on the same branch,
and opening PRs from the same branch.
This was observed in repos when we maintain multiple branches
(eg. snap-tempest with main, stable/caracal, stable/bobcat, etc.).

This fixes it by including the target branch name in the PR branch,
ensuring that each PR in a target repository will use its own branch,
and there won't be any more cross interference.

Fixes: #88
Copy link
Contributor

@jneo8 jneo8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice found! Thanks.

@samuelallan72 samuelallan72 merged commit 7685ff2 into main Sep 19, 2024
46 checks passed
@samuelallan72 samuelallan72 deleted the fix-branch branch September 19, 2024 21:05
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.

Fix issue with possibly wrong base branch for automated PRs
3 participants