Skip to content

chore(github/branch): require the checks of the shared workflows under their new names - #1121

Merged
panicboat merged 1 commit into
mainfrom
chore/restore-required-checks
Oct 25, 2026
Merged

panicboat merged 1 commit into
mainfrom
chore/restore-required-checks

Conversation

@panicboat

Copy link
Copy Markdown
Owner

Summary

monorepo・platform・deploy-actions の ruleset に、共通の workflow で変わった新しい名前で必須チェックを戻します。
あわせて panicboat/.github に ruleset を作ります。

Why

#1119 で、切り替えの間だけ名前が変わる必須チェックを外しました。
切り替えの PR(#1120・panicboat/monorepo#1750・panicboat/deploy-actions#357)はすべて merge されたので、新しい名前で戻します。
panicboat/.github は 3 つのリポジトリが参照する workflow の正本なので、ほかのリポジトリと同じく main を ruleset で守ります。

Before / After

  • monorepo の必須チェック
    • Before: Docs Sync Check のみ
    • After: ci-gatekeeper / CI Gatekeeper・validate / Validate PR title・ensure-sha-pinned / Ensure actions are pinned to SHAs・Docs Sync Check
  • platform の必須チェック
    • Before: なし
    • After: ci-gatekeeper / CI Gatekeeper・validate / Validate PR title・ensure-sha-pinned / Ensure actions are pinned to SHAs
  • deploy-actions の必須チェック
    • Before: なし
    • After: validate / Validate PR title・ensure-sha-pinned / Ensure actions are pinned to SHAs
  • panicboat/.github の ruleset
    • Before: なし
    • After: defaults.hcl の既定に、必須チェック gatekeeper / CI Gatekeeper・semantic / Validate PR title・lint / Ensure actions are pinned to SHAs・Test scripts
      • .github は自分の workflow を呼ぶので、呼び出し側の job 名がほかのリポジトリと違います。

Decisions

  • test / checkout / Self checkout は必須にしません。
    • 共通の workflow の仕組みを確かめる check で、ci-gatekeeper が全体の成否を見ています。

Impact

  • 利用規約
  • プライバシーポリシー
  • ドキュメント

Verification

  • VERIFIED: terragrunt render --format json で、4 つのリポジトリの required_status_checks が After のとおりになることを確認しました。
  • VERIFIED: 名前は実際の check run と照合しました。
  • REASONED: monorepo の ci-gatekeeper / CI Gatekeeper は、caller の job id が platform と同じなので同じ名前になります。
  • plan は deploy ラベルで走ります。
    • 期待する plan は、3 つの ruleset の変更と .github の ruleset の作成です。

Relations

🤖 Generated with Claude Code

https://claude.ai/code/session_01R7jQZQj1VyeBbYR7P1ssV7

…r their new names

Claude-Session: https://claude.ai/code/session_01R7jQZQj1VyeBbYR7P1ssV7
Signed-off-by: panicboat <panicboat@gmail.com>
@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a5cd3708-3273-4042-ad14-cc34f6a791fb
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@panicboat-github-workflow-bot panicboat-github-workflow-bot Bot added the deploy:branch Auto-generated deployment label label Oct 25, 2026
@panicboat-github-workflow-bot

Copy link
Copy Markdown
Contributor

Plan Result (branch/master)

CI link

Plan: 1 to add, 3 to change, 0 to destroy.
  • Create
    • github_repository_ruleset.branches["dot-github-main"]
  • Update
    • github_repository_ruleset.branches["deploy-actions-main"]
    • github_repository_ruleset.branches["monorepo-main"]
    • github_repository_ruleset.branches["platform-main"]
Change Result (Click me)
  # github_repository_ruleset.branches["deploy-actions-main"] will be updated in-place
  ~ resource "github_repository_ruleset" "branches" {
        id          = "15519988"
        name        = "deploy-actions-main"
        # (6 unchanged attributes hidden)

      ~ rules {
            # (7 unchanged attributes hidden)

          + required_status_checks {
              + do_not_enforce_on_create             = false
              + strict_required_status_checks_policy = false

              + required_check {
                  + context        = "ensure-sha-pinned / Ensure actions are pinned to SHAs"
                  + integration_id = 0
                }
              + required_check {
                  + context        = "validate / Validate PR title"
                  + integration_id = 0
                }
            }

            # (1 unchanged block hidden)
        }

        # (1 unchanged block hidden)
    }

  # github_repository_ruleset.branches["dot-github-main"] will be created
  + resource "github_repository_ruleset" "branches" {
      + enforcement = "active"
      + etag        = (known after apply)
      + id          = (known after apply)
      + name        = "dot-github-main"
      + node_id     = (known after apply)
      + repository  = ".github"
      + ruleset_id  = (known after apply)
      + target      = "branch"

      + conditions {
          + ref_name {
              + exclude = []
              + include = [
                  + "~DEFAULT_BRANCH",
                ]
            }
        }

      + rules {
          + deletion                      = true
          + non_fast_forward              = true
          + required_linear_history       = true
          + required_signatures           = false
          + update_allows_fetch_and_merge = false

          + pull_request {
              + allowed_merge_methods             = (known after apply)
              + dismiss_stale_reviews_on_push     = false
              + require_code_owner_review         = false
              + require_last_push_approval        = false
              + required_approving_review_count   = 0
              + required_review_thread_resolution = false
            }

          + required_status_checks {
              + do_not_enforce_on_create             = false
              + strict_required_status_checks_policy = false

              + required_check {
                  + context        = "Test scripts"
                  + integration_id = 0
                }
              + required_check {
                  + context        = "gatekeeper / CI Gatekeeper"
                  + integration_id = 0
                }
              + required_check {
                  + context        = "lint / Ensure actions are pinned to SHAs"
                  + integration_id = 0
                }
              + required_check {
                  + context        = "semantic / Validate PR title"
                  + integration_id = 0
                }
            }
        }
    }

  # github_repository_ruleset.branches["monorepo-main"] will be updated in-place
  ~ resource "github_repository_ruleset" "branches" {
        id          = "15519991"
        name        = "monorepo-main"
        # (6 unchanged attributes hidden)

      ~ rules {
            # (7 unchanged attributes hidden)

          ~ required_status_checks {
                # (2 unchanged attributes hidden)

              + required_check {
                  + context        = "ci-gatekeeper / CI Gatekeeper"
                  + integration_id = 0
                }
              + required_check {
                  + context        = "ensure-sha-pinned / Ensure actions are pinned to SHAs"
                  + integration_id = 0
                }
              + required_check {
                  + context        = "validate / Validate PR title"
                  + integration_id = 0
                }

                # (1 unchanged block hidden)
            }

            # (1 unchanged block hidden)
        }

        # (3 unchanged blocks hidden)
    }

  # github_repository_ruleset.branches["platform-main"] will be updated in-place
  ~ resource "github_repository_ruleset" "branches" {
        id          = "15519990"
        name        = "platform-main"
        # (6 unchanged attributes hidden)

      ~ rules {
            # (7 unchanged attributes hidden)

          + required_status_checks {
              + do_not_enforce_on_create             = false
              + strict_required_status_checks_policy = false

              + required_check {
                  + context        = "ci-gatekeeper / CI Gatekeeper"
                  + integration_id = 0
                }
              + required_check {
                  + context        = "ensure-sha-pinned / Ensure actions are pinned to SHAs"
                  + integration_id = 0
                }
              + required_check {
                  + context        = "validate / Validate PR title"
                  + integration_id = 0
                }
            }

            # (1 unchanged block hidden)
        }

        # (1 unchanged block hidden)
    }

Plan: 1 to add, 3 to change, 0 to destroy.

Changes to Outputs:
  ~ branch_protection_rulesets = {
      + dot-github-main     = {
          + id         = (known after apply)
          + name       = "dot-github-main"
          + repository = ".github"
        }
        # (3 unchanged attributes hidden)
    }

@panicboat
panicboat marked this pull request as ready for review October 25, 2026 02:09
@panicboat
panicboat merged commit bab39b8 into main Oct 25, 2026
20 checks passed
@panicboat
panicboat deleted the chore/restore-required-checks branch October 25, 2026 02:09
@panicboat-github-workflow-bot

Copy link
Copy Markdown
Contributor

✅ Apply Succeeded (branch/master)

CI link

Apply complete! Resources: 1 added, 3 changed, 0 destroyed.
Details (Click me)
Oct 25 02:09:49.491 INF download and unarchive the package program=aqua version=2.64.0 env=linux/amd64 exe_name=terragrunt package_name=gruntwork-io/terragrunt package_version=v1.0.2 registry=standard

Initializing the backend...

Successfully configured the backend "s3"! OpenTofu will automatically
use this backend unless the backend configuration changes.

Initializing provider plugins...
- Finding integrations/github versions matching "~> 6.13"...
- Installing integrations/github v6.13.0 to the shared cache directory...
- Installed integrations/github v6.13.0 (signed, key ID 38027F80D7FD5FB2)
- Using integrations/github v6.13.0 from the shared cache directory

Providers are signed by their developers.
If you'd like to know more about provider signing, you can read about it here:
https://opentofu.org/docs/cli/plugins/signing/

OpenTofu has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that OpenTofu can guarantee to make the same selections by default when
you run "tofu init" in the future.

OpenTofu has been successfully initialized!

You may now begin working with OpenTofu. Try running "tofu plan" to see
any changes that are required for your infrastructure. All OpenTofu commands
should now work.

If you ever set or change modules or backend configuration for OpenTofu,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
data.github_repository.repo["deploy-actions"]: Reading...
data.github_repository.repo["platform"]: Reading...
data.github_repository.repo["monorepo"]: Reading...
data.github_repository.repo["dot-github"]: Reading...
data.github_repository.repo["platform"]: Read complete after 1s [id=platform]
data.github_repository.repo["monorepo"]: Read complete after 1s [id=monorepo]
data.github_repository.repo["dot-github"]: Read complete after 1s [id=.github]
data.github_repository.repo["deploy-actions"]: Read complete after 2s [id=deploy-actions]
github_repository_ruleset.branches["monorepo-main"]: Refreshing state... [id=15519991]
github_repository_ruleset.branches["platform-main"]: Refreshing state... [id=15519990]
github_repository_ruleset.branches["deploy-actions-main"]: Refreshing state... [id=15519988]

OpenTofu used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create
  ~ update in-place (current -> planned)

OpenTofu will perform the following actions:

  # github_repository_ruleset.branches["deploy-actions-main"] will be updated in-place
  ~ resource "github_repository_ruleset" "branches" {
        id          = "15519988"
        name        = "deploy-actions-main"
        # (6 unchanged attributes hidden)

      ~ rules {
            # (7 unchanged attributes hidden)

          + required_status_checks {
              + do_not_enforce_on_create             = false
              + strict_required_status_checks_policy = false

              + required_check {
                  + context        = "ensure-sha-pinned / Ensure actions are pinned to SHAs"
                  + integration_id = 0
                }
              + required_check {
                  + context        = "validate / Validate PR title"
                  + integration_id = 0
                }
            }

            # (1 unchanged block hidden)
        }

        # (1 unchanged block hidden)
    }

  # github_repository_ruleset.branches["dot-github-main"] will be created
  + resource "github_repository_ruleset" "branches" {
      + enforcement = "active"
      + etag        = (known after apply)
      + id          = (known after apply)
      + name        = "dot-github-main"
      + node_id     = (known after apply)
      + repository  = ".github"
      + ruleset_id  = (known after apply)
      + target      = "branch"

      + conditions {
          + ref_name {
              + exclude = []
              + include = [
                  + "~DEFAULT_BRANCH",
                ]
            }
        }

      + rules {
          + deletion                      = true
          + non_fast_forward              = true
          + required_linear_history       = true
          + required_signatures           = false
          + update_allows_fetch_and_merge = false

          + pull_request {
              + allowed_merge_methods             = (known after apply)
              + dismiss_stale_reviews_on_push     = false
              + require_code_owner_review         = false
              + require_last_push_approval        = false
              + required_approving_review_count   = 0
              + required_review_thread_resolution = false
            }

          + required_status_checks {
              + do_not_enforce_on_create             = false
              + strict_required_status_checks_policy = false

              + required_check {
                  + context        = "Test scripts"
                  + integration_id = 0
                }
              + required_check {
                  + context        = "gatekeeper / CI Gatekeeper"
                  + integration_id = 0
                }
              + required_check {
                  + context        = "lint / Ensure actions are pinned to SHAs"
                  + integration_id = 0
                }
              + required_check {
                  + context        = "semantic / Validate PR title"
                  + integration_id = 0
                }
            }
        }
    }

  # github_repository_ruleset.branches["monorepo-main"] will be updated in-place
  ~ resource "github_repository_ruleset" "branches" {
        id          = "15519991"
        name        = "monorepo-main"
        # (6 unchanged attributes hidden)

      ~ rules {
            # (7 unchanged attributes hidden)

          ~ required_status_checks {
                # (2 unchanged attributes hidden)

              + required_check {
                  + context        = "ci-gatekeeper / CI Gatekeeper"
                  + integration_id = 0
                }
              + required_check {
                  + context        = "ensure-sha-pinned / Ensure actions are pinned to SHAs"
                  + integration_id = 0
                }
              + required_check {
                  + context        = "validate / Validate PR title"
                  + integration_id = 0
                }

                # (1 unchanged block hidden)
            }

            # (1 unchanged block hidden)
        }

        # (3 unchanged blocks hidden)
    }

  # github_repository_ruleset.branches["platform-main"] will be updated in-place
  ~ resource "github_repository_ruleset" "branches" {
        id          = "15519990"
        name        = "platform-main"
        # (6 unchanged attributes hidden)

      ~ rules {
            # (7 unchanged attributes hidden)

          + required_status_checks {
              + do_not_enforce_on_create             = false
              + strict_required_status_checks_policy = false

              + required_check {
                  + context        = "ci-gatekeeper / CI Gatekeeper"
                  + integration_id = 0
                }
              + required_check {
                  + context        = "ensure-sha-pinned / Ensure actions are pinned to SHAs"
                  + integration_id = 0
                }
              + required_check {
                  + context        = "validate / Validate PR title"
                  + integration_id = 0
                }
            }

            # (1 unchanged block hidden)
        }

        # (1 unchanged block hidden)
    }

Plan: 1 to add, 3 to change, 0 to destroy.

Changes to Outputs:
  ~ branch_protection_rulesets = {
      + dot-github-main     = {
          + id         = (known after apply)
          + name       = "dot-github-main"
          + repository = ".github"
        }
        # (3 unchanged attributes hidden)
    }
github_repository_ruleset.branches["dot-github-main"]: Creating...
github_repository_ruleset.branches["platform-main"]: Modifying... [id=15519990]
github_repository_ruleset.branches["deploy-actions-main"]: Modifying... [id=15519988]
github_repository_ruleset.branches["monorepo-main"]: Modifying... [id=15519991]
github_repository_ruleset.branches["dot-github-main"]: Creation complete after 1s [id=25804793]
github_repository_ruleset.branches["platform-main"]: Modifications complete after 3s [id=15519990]
github_repository_ruleset.branches["deploy-actions-main"]: Modifications complete after 4s [id=15519988]
github_repository_ruleset.branches["monorepo-main"]: Modifications complete after 6s [id=15519991]

Apply complete! Resources: 1 added, 3 changed, 0 destroyed.

Outputs:

branch_protection_rulesets = {
  "deploy-actions-main" = {
    "id" = "15519988"
    "name" = "deploy-actions-main"
    "repository" = "deploy-actions"
  }
  "dot-github-main" = {
    "id" = "25804793"
    "name" = "dot-github-main"
    "repository" = ".github"
  }
  "monorepo-main" = {
    "id" = "15519991"
    "name" = "monorepo-main"
    "repository" = "monorepo"
  }
  "platform-main" = {
    "id" = "15519990"
    "name" = "platform-main"
    "repository" = "platform"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deploy:branch Auto-generated deployment label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant