feat: GitHub Actions auto-commit - #1062
Conversation
- Update configuration documentation to reference v1.8.15 - Update resolveNodeBreadthLimit default value from 100 to 10 - Update dependencies to latest versions
- Add permissions for GitHub Actions to commit documentation changes - Add auto-commit step to update OpenFGA configuration docs - Update pr-preview-action to latest version This needs further review as requested by maintainers.
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThe updates include enhancements to GitHub Actions workflows for deployment and preview, documentation changes for OpenFGA configuration, and dependency upgrades in Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub Actions
participant Build System
participant Docs Repo
GitHub Actions->>Build System: Build website
Build System-->>GitHub Actions: Build artifacts
GitHub Actions->>Docs Repo: Auto-commit updated *.mdx docs
GitHub Actions->>GitHub Pages: Deploy site
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (4)
.github/workflows/deploy.yml(2 hunks).github/workflows/preview.yml(1 hunks)docs/content/getting-started/setup-openfga/configuration.mdx(4 hunks)package.json(2 hunks)
⏰ 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). (3)
- GitHub Check: Socket Security: Pull Request Alerts
- GitHub Check: deploy-preview
- GitHub Check: Test deployment
🔇 Additional comments (4)
.github/workflows/preview.yml (1)
37-40: Action remains pinned – 👍 but consider aliasing for easier upgradesThe workflow keeps the
rossjrw/pr-preview-actionpinned to a full-length SHA (good for supply-chain security).
If you want quicker upgrades without editing every commit hash, you can pin to a semver tag (e.g.v1) and combine it with@refverification (actions/verify-hash) so you still get tamper-proofing while lowering maintenance overhead.
No blocking issues here..github/workflows/deploy.yml (1)
18-22: Explicitpermissionsblock improves least-privilege complianceGranting only
contents,pagesandid-tokenis exactly what this job needs and nothing more. Nice hardening.package.json (2)
28-45: Large dependency bump – verify Node/React/Docusaurus compatibilityUpgrading Docusaurus to
3.8.1, React 18.3 and moving the CI runner to Node 22 is a triple-jump. Node 22 is not an LTS release yet and Docusaurus’ latest docs still recommend Node 18/20.Please double-check:
- Local dev machines on older LTS versions won’t break.
- The generated static site still works in PROD (no React 18.3 breaking changes).
engines.nodeinpackage.json(if present) is updated accordingly.If everything passes locally & in preview, all good ‑ just worth an explicit verification.
56-58: ESLint major upgrade to v9 may require config tweaks
eslint9.x is eslint-config-breaking (theflatconfig becomes default).
Make sure.eslintrc.*has been migrated or the lint job will error out.If you need a minimal patch:
{ - "root": true, - "extends": ["eslint:recommended", "plugin:react/recommended"], + "eslintConfig": { + "root": true, + "extends": ["eslint:recommended", "plugin:react/recommended"] + } }(or switch to the new
eslint.config.jsflat format).
rhamzeh
left a comment
There was a problem hiding this comment.
Instead of having the deploy workflow commit directly to the repo, let's add a separate nightly job that checks for changes and commit only if any are made.
Let's keep the deploy as is.
Can you remove the parts that are unrelated from this (dep updates + eslint)?
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
|
This PR has had no human activity for 90 days, so it has been marked This is automated backlog grooming, not a judgment on the work. What happens next, unless there is activity:
To keep it open, push a commit or leave a comment, and the clock will reset. For work that should not auto-close, such as an RFC or long-running experiment, ask a maintainer to add |
|
@rhamzeh - any thoughts on this? |
There was a problem hiding this comment.
Pull request overview
Adds GitHub Actions automation intended to periodically regenerate and commit OpenFGA configuration documentation, alongside a small formatting fix in the generated MDX.
Changes:
- Adds a scheduled/manual
update-docsworkflow that builds the site and auto-commits documentation changes. - Fixes a minor MDX formatting/indentation issue in the configuration docs page.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/content/getting-started/setup-openfga/configuration.mdx | Minor formatting adjustment to the related links component closing tag. |
| .github/workflows/update-docs.yml | New scheduled workflow to build and auto-commit updated documentation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks @Siddhant-K-code! This would be helpful. Can you change it to open a PR instead of autocommit. hardcode the branch & set the job name so that there can only be 1 open PR that either gets created or updated Auto-committing to main is something we do not want to allow, in general. @SoulPancake can probably help with some guidance if needed, as he's set up similar workflows for Generator => SDKs |
|
@Siddhant-K-code Thanks! I think codex might not have the CLA, Can u rebase and amend author to just you? |
0622bdf to
65578f7
Compare
|
@SoulPancake - done! |
d2f21df to
72b13dd
Compare
SoulPancake
left a comment
There was a problem hiding this comment.
Since the git-auto-commit-action step has no branch set, scheduled/dispatch runs would try to push configuration.mdx directly to main without review ( which is also blocked ). Could we switch to a PR-based flow and add pull-requests: write to permissions?
The bot account should be able to create the PRs
|
@SoulPancake - i've fixed it in 443c2f1 |
Related #1054
Summary
configuration.mdxchanges, instead of pushing generated changes directly tomain.