-
-
Notifications
You must be signed in to change notification settings - Fork 125
Use atmos for readme generation #978
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
Conversation
📝 WalkthroughWalkthroughIntroduces Atmos tooling: adds atmos.yaml with remote import, updates .gitignore to exclude .atmos, adds Makefile targets to generate README via Atmos, and appends a “Get Support” badge to README. No existing behaviors altered; changes are additive and configuration-focused. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks (3 passed)✅ Passed checks (3 passed)
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. ✨ Finishing Touches🧪 Generate unit tests
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
README.md (1)
17-23: Update “DO NOT EDIT” instructions to Atmos (still references build-harness)This block now misleads contributors. Replace with Atmos-based guidance.
- ** This file was automatically generated by the `cloudposse/build-harness`. - ** 1) Make all changes to `README.yaml` - ** 2) Run `make init` (you only need to do this once) - ** 3) Run`make readme` to rebuild this file. + ** This file is automatically generated via Atmos. + ** 1) Make all changes to `README.yaml` + ** 2) Run `atmos docs generate readme` (or `make readme/atmos` if provided) + ** 3) Commit the updated `README.md`Makefile (1)
80-85: “make readme” likely still runs build-harness (target collision)Because
build-harnessis included (Line 18) and definesreadme, your newreadme: readme/build(no recipe) will just add a prerequisite; GNU Make will still execute the build-harnessreadmerecipe afterward, undoing the Atmos output (or erroring if multiple recipes exist). Rename the target or remove/disable the BH rule.Option A (non-breaking, avoids collision): introduce
readme/atmosonly and drop thereadmealias for now.-.PHONY: all %.all build %.build install %.install run %.run run/new run/check +.PHONY: all %.all build %.build install %.install run %.run run/new run/check readme/build readme/atmos @@ -readme/build: - @atmos docs generate readme - -readme: readme/build +readme/atmos: readme/build + +readme/build: + @atmos docs generate readmeThen update the README “DO NOT EDIT” block to point to
make readme/atmos(see README comment).
🧹 Nitpick comments (2)
README.md (1)
5-9: Badge style mismatch (“for-the-badge”) vs other badgesThe new “Get Support” badge uses a different style and looks out of place. Recommend matching the existing flat style.
-<p align="right"><a href="https://github.com/cloudposse/geodesic/actions?query=workflow%3Adocker"><img src="https://github.com/cloudposse/geodesic/workflows/docker/badge.svg" alt="Build Status"/></a><a href="https://github.com/cloudposse/geodesic/releases/latest"><img src="https://img.shields.io/github/release/cloudposse/geodesic.svg" alt="Latest Release"/></a><a href="https://slack.cloudposse.com"><img src="https://slack.cloudposse.com/badge.svg" alt="Slack Community"/></a><a href="https://archive.sweetops.com/geodesic"><img src="https://img.shields.io/badge/slack-archive-blue.svg" alt="Slack Archive"/></a><a href="https://cloudposse.com/support/"><img src="https://img.shields.io/badge/Get_Support-success.svg?style=for-the-badge" alt="Get Support"/></a> +<p align="right"><a href="https://github.com/cloudposse/geodesic/actions?query=workflow%3Adocker"><img src="https://github.com/cloudposse/geodesic/workflows/docker/badge.svg" alt="Build Status"/></a><a href="https://github.com/cloudposse/geodesic/releases/latest"><img src="https://img.shields.io/github/release/cloudposse/geodesic.svg" alt="Latest Release"/></a><a href="https://slack.cloudposse.com"><img src="https://slack.cloudposse.com/badge.svg" alt="Slack Community"/></a><a href="https://archive.sweetops.com/geodesic"><img src="https://img.shields.io/badge/slack-archive-blue.svg" alt="Slack Archive"/></a><a href="https://cloudposse.com/support/"><img src="https://img.shields.io/badge/Get_Support-success.svg" alt="Get Support"/></a>Makefile (1)
80-85: Declare PHONY for readme targets and add an Atmos pre-flight check
Pre-flight check improves UX and clearer failures; satisfies checkmake’s “Target readme should be PHONY”..PHONY: all %.all build %.build install %.install run %.run run/new run/check readme readme/build check/atmos -readme: readme/build +readme: check/atmos readme/build readme/build: @atmos docs generate readme +check/atmos: + @command -v atmos >/dev/null 2>&1 || { \ + echo "Error: atmos not found. Install via: brew install atmos or curl -fsSL https://atmos.tools/install.sh | bash"; exit 127; }
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- Linear integration is disabled
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (4)
.gitignore(1 hunks)Makefile(1 hunks)README.md(2 hunks)atmos.yaml(1 hunks)
🧰 Additional context used
🪛 checkmake (0.2.2)
Makefile
[warning] 84-84: Target "readme" should be declared PHONY.
(phonydeclared)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build-and-push (debian)
🔇 Additional comments (1)
.gitignore (1)
6-6: Add.atmosignore — LGTMGood call adding the Atmos cache dir to
.gitignore.
| import: | ||
| - https://raw.githubusercontent.com/cloudposse/.github/refs/heads/main/.github/atmos/default.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Pin remote import to a commit/tag for reproducibility
Using refs/heads/main is non-deterministic and a supply-chain risk. Pin to a commit SHA or a released tag.
import:
- - https://raw.githubusercontent.com/cloudposse/.github/refs/heads/main/.github/atmos/default.yaml
+ - https://raw.githubusercontent.com/cloudposse/.github/<PINNED_COMMIT_SHA>/.github/atmos/default.yamlOptionally document how to update the pin.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| import: | |
| - https://raw.githubusercontent.com/cloudposse/.github/refs/heads/main/.github/atmos/default.yaml | |
| import: | |
| - https://raw.githubusercontent.com/cloudposse/.github/<PINNED_COMMIT_SHA>/.github/atmos/default.yaml |
🤖 Prompt for AI Agents
In atmos.yaml around lines 11 to 12, the remote import currently references the
branch ref "refs/heads/main", which is non-deterministic; replace that URL with
one pinned to a specific commit SHA or a released tag (e.g.,
.../raw/<tag-or-sha>/.github/atmos/default.yaml) to ensure reproducible builds,
and optionally add a short comment above the import describing how to update the
pin (e.g., instructing to update to a new tag or SHA and run any verification).
what
why