Skip to content

docs: unify README with shared skeleton, add PR template - #57

Merged
donbeave merged 4 commits into
mainfrom
docs/readme-skeleton
Oct 12, 2026
Merged

donbeave merged 4 commits into
mainfrom
docs/readme-skeleton

Conversation

@donbeave

@donbeave donbeave commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Related pull requests

Summary

This PR aligns the README with the shared skeleton used by the other github-terraform repositories — same sections in the same order (Layout, Authentication, Adding a repository, Verification) — and adds the repository's pull request template.

What ships

  • README gains an Authentication section documenting that tofu reads an ambient GITHUB_TOKEN needing Administration: write on every managed repository.
  • The "Adding a repository" runbook now includes the mandatory-list step in checks.tf (mandatory_target_repositories_present) and the no-CI allowlist step, matching the actual checks.
  • A pull request template matching this repository's CI gates (tofu fmt/init/validate, plan smoke).

What this addresses

  • The runbook omitted the mandatory-list check update, so following it produced a failing checks.tf invariant.
  • The token requirement was undocumented; the provider reads GITHUB_TOKEN from the environment with no repository guidance.

Verify locally

Checkout

gh pr checkout 57

Static checks

Expected: tofu validate prints "Success! The configuration is valid."

tofu fmt -check -recursive
tofu init -backend=false -input=false -lockfile=readonly
tofu validate -no-color

Migration notes

None.

Same section order and wording as the other github-terraform repos:
Layout, Authentication, Adding a repository, Verification. Documents the
ambient GITHUB_TOKEN requirement and the mandatory-list step in checks.tf
when adding a repository.

Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T14:01:13.597850Z 75fa58d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 75fa58d96c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread README.md Resolved
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
donbeave added a commit to tailrocks/github-terraform that referenced this pull request Oct 12, 2026
…#50)

## Related pull requests

- ChainArgos/github-terraform#27
- jackin-project/github-terraform#57

## Summary

This PR brings tailrocks/github-terraform to full parity with the
ChainArgos and jackin-project github-terraform repos: the same mise tofu
tasks inject the org's `*-opentofu` token from 1Password, the dead
1Password provider path is removed, the README follows the shared
skeleton, and the repository inventory is reconciled with live GitHub
state (two repos were renamed, three had stale ruleset import IDs). A
pull request template matching this repo's CI gates is included.

## What ships

- `tofu:plan` / `tofu:apply` mise tasks that read the
`tailrocks-opentofu` token from 1Password and export it as
`GITHUB_TOKEN`; bare `tofu` with an ambient token still works too.
- Removal of the unconfigured `onepassword` provider, its data sources,
the org-secret resource, the `secret_visibility` variable, and the
`managed_secrets` output (no org secrets remain since 2026-10-01);
provider lockfile regenerated.
- Inventory reconciliation: `tui-snap` and
`tailrocks-open-source-skills` removed (renamed on GitHub to `tuiscotti`
and `tailrocks-contribution-skills`, already in the inventory under the
new names); six ruleset import blocks added for `repo-scan`,
`tailrocks-repository-skills`, and `rust-repository-policy` whose live
rulesets were never imported.
- README on the shared three-repo skeleton with both token flows
documented; repository count corrected to 45.
- A pull request template matching this repository's CI gates (tofu
fmt/init/validate, plan smoke).

## Behavior changes

- tofu runs authenticate via `mise run tofu:plan` / `mise run
tofu:apply` (1Password injection) or an exported `GITHUB_TOKEN`; the
token needs org admin on `tailrocks` plus Administration: write on every
managed repository.

## What this addresses

- Every `tofu plan`/`apply` failed with "Invalid provider configuration"
from the dead 1Password provider, plus 403s from tokens lacking org
permissions.
- Renamed repos were double-managed under stale names, and three repos'
live rulesets were unimported — both surfaced as create conflicts during
the state rebuild.

## Not included

- `tailrocks-asd-ste100-skills` protect-main/protect-tags rulesets: the
org is on the free plan and the repo is private, so GitHub returns 403
"Upgrade to GitHub Pro or make this repository public". Its two ruleset
creations remain as a pending diff until visibility or plan changes.

## Verify locally

### Checkout

```sh
gh pr checkout 50
```

### Static checks

Expected: `tofu validate` prints "Success! The configuration is valid."

```sh
tofu fmt -check -recursive
tofu init -backend=false -input=false -lockfile=readonly
tofu validate -no-color
```

### Smoke

```sh
mise run tofu:plan
```

Expected: the plan renders with no provider or permission errors; the
only pending actions are the two `tailrocks-asd-ste100-skills` ruleset
creates (free-plan 403, see "Not included").

## Migration notes

Use `mise run tofu:plan` / `mise run tofu:apply`, or export
`GITHUB_TOKEN` manually. The old `tofu` field in the 1Password
`tailrocks/GitHub` item is superseded by `tailrocks-opentofu`.

---------

Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
Codex PR feedback: the previous wording tied the checks.tf mandatory-list
update to the no-CI clause, but mandatory_target_repositories_present
compares the full key set, so every addition needs it.

Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
@sonarqubecloud

Copy link
Copy Markdown

@donbeave
donbeave merged commit 4eb4e2c into main Oct 12, 2026
7 checks passed
@donbeave
donbeave deleted the docs/readme-skeleton branch October 12, 2026 11:39
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.

1 participant