You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating new repositories, with branch names [production, non-production, development], and setting the default_branch = "production", there are 422 errors.
Terraform:
private_repositories={
myorg-gcp-00-bootstrap = {
advance_security =false
allow_auto_merge =true
default_branch ="production"
delete_head_on_merge =true
dependabot_security_updates =false
description ="Used to hold the bootstrap terraform for the GCP Organization"
has_vulnerability_alerts =true
homepage =""
protected_branches = ["production", "development", "non-production"]
requires_web_commit_signing =true
topics = ["gcp", "infrastructure-as-code"]
}
Error:
│ Error: PATCH https://api.github.com/repos/FociSolutions/bupa-gcp-02-environments: 422 Validation Failed [{Resource:Repository Field:default_branch Code:invalid Message:The branch production was not found. Please push that ref first or create it via the Git Data API.}]
│
│ with module.private_repositories["bupa-gcp-02-environments"].module.repository_base.github_branch_default.default_branch,
│ on ../repository_base/repository.tf line 98, in resource "github_branch_default""default_branch":
│ 98: resource "github_branch_default""default_branch" {
│
The text was updated successfully, but these errors were encountered:
bzarboni1
changed the title
[Bug] Setting a default branch name other than 'main
[Bug] Setting a default branch name other than 'main' causes 422 Errors
Dec 12, 2024
ISSUE
When creating new repositories, with branch names [
production
,non-production
,development
], and setting thedefault_branch = "production"
, there are 422 errors.Terraform:
Error:
The text was updated successfully, but these errors were encountered: