feat: unify workflows, remove duplications and update packages for the website#2231
Conversation
✅ Deploy Preview for ocm-website canceled.
|
📝 WalkthroughWalkthroughConsolidates website markdown checks into the main markdown workflow, removes website-specific spellcheck and wordlist, updates multiple GitHub Actions pins and runtime/tool versions, revises core and website wordlists, removes website license/REUSE files, and bumps several website development and Go module dependencies. Changes
Sequence Diagram(s)sequenceDiagram
participant PR as Pull Request
participant GA as GitHub Actions
participant Netlify as Netlify Deploy Preview
participant Linkspector as Linkspector
participant Repo as Repository
PR->>GA: Trigger main markdown workflow (includes website paths)
GA->>Repo: Checkout repo
GA->>GA: Run website `markdown-lint` job against `website/**/*.md`
GA->>Netlify: Wait for deploy-preview check (poll via GitHub checks)
alt Netlify preview available
Netlify->>GA: Respond with preview target_url
GA->>Repo: Generate `.github/config/website-linkspector.yaml` with preview URL
GA->>Linkspector: Run Linkspector on `./website/content` using generated config
Linkspector->>GA: Return link results (report to PR checks)
else No website changes
GA->>GA: Skip `verify-links-website` job
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
f19bba0 to
fc56e18
Compare
…e website On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com> Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
7aeb271 to
131dbed
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
website/netlify.toml (1)
6-6: Keep Netlify ignore scoped to website changes.Line 6 now tracks the entire repo (
-- ./), which will trigger website builds for unrelated changes. If the goal is to avoid unnecessary previews, keep this scoped to website paths.Suggested change
- ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- ./" + ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- website/"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@website/netlify.toml` at line 6, The Netlify ignore rule currently uses the repository root marker `-- ./` in the `ignore` setting, causing builds to trigger for unrelated repo changes; update the `ignore` value (the `ignore` key that contains the `"git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- ./"` string) to scope diffs to website files only (e.g., replace `-- ./` with the website path(s) like `-- website/` or the specific directories/files that should trigger a site build) so only changes under the website paths will trigger Netlify builds.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/config/wordlist.txt:
- Line 493: Replace the misspelled token "omponentsubscription's" with the
correct "componentsubscription's" in the wordlist entry; locate the exact string
"omponentsubscription's" in the file and update it to "componentsubscription's"
so the allowlist token is spelled correctly.
In @.github/workflows/markdown.yml:
- Around line 8-10: The workflow's trigger only includes '**/*.md' under the
paths filter, so changes in non-Markdown website files won't run the
verify-links-website job; update the paths filter to include website/** (or more
narrowly include website/**/*.md if you prefer limiting to markdown) so that
changes under the website directory will trigger the workflow, or alternatively
change the condition that gates the verify-links-website job to only run when
website/**/*.md changed; refer to the paths block and the verify-links-website
job name when making the change.
- Around line 108-111: The workflow currently extracts PREVIEW_STATUS and
PREVIEW_URL using the hardcoded context "netlify/ocm-website/deploy-preview"
which can yield an empty PREVIEW_URL; update the shell block that sets
PREVIEW_STATUS and PREVIEW_URL to either (a) select the status with a tolerant
jq filter (e.g., match contexts that contain "netlify" and "deploy-preview") or
(b) keep the current selector but immediately validate PREVIEW_URL after
extraction and fail fast if empty: print a clear error like "No Netlify preview
URL found for context ...: $PREVIEW_STATUS" and exit 1; ensure the failing path
happens before writing to GITHUB_OUTPUT and before the linkspector/baseUrl
generation so downstream steps never receive an invalid baseUrl.
---
Nitpick comments:
In `@website/netlify.toml`:
- Line 6: The Netlify ignore rule currently uses the repository root marker `--
./` in the `ignore` setting, causing builds to trigger for unrelated repo
changes; update the `ignore` value (the `ignore` key that contains the `"git
diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- ./"` string) to scope diffs to
website files only (e.g., replace `-- ./` with the website path(s) like `--
website/` or the specific directories/files that should trigger a site build) so
only changes under the website paths will trigger Netlify builds.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6f40cab1-bc44-4406-8e38-23b4bf044ef9
⛔ Files ignored due to path filters (2)
website/hack/generate-cli-docs/go.sumis excluded by!**/*.sumwebsite/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (18)
.github/config/.markdownlint-cli2.yaml.github/config/website-spellcheck.yml.github/config/website-wordlist.txt.github/config/website.markdownlint-cli2.yaml.github/config/wordlist.txt.github/workflows/markdown.yml.github/workflows/website-manual-update-cli-docs.yaml.github/workflows/website-publish-site.yaml.github/workflows/website-update-cli-docs.yaml.github/workflows/website-update-security-txt.yaml.github/workflows/website-verify-markdown.yml.github/workflows/website-verify-scripts.ymlwebsite/LICENSEwebsite/LICENSES/Apache-2.0.txtwebsite/REUSE.tomlwebsite/hack/generate-cli-docs/go.modwebsite/netlify.tomlwebsite/package.json
💤 Files with no reviewable changes (6)
- website/LICENSE
- .github/config/website-spellcheck.yml
- website/REUSE.toml
- .github/config/website-wordlist.txt
- website/LICENSES/Apache-2.0.txt
- .github/workflows/website-verify-markdown.yml
frewilhelm
left a comment
There was a problem hiding this comment.
lgtm, beside the findings from coderabbitai
On-behalf-of: Gergely Brautigam <gergely.brautigam@sap.com> Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
edc67b1 to
e30551c
Compare
|
fixed the typo the "clever" ai flagged :P |
…e website (#2231) <!-- markdownlint-disable MD041 --> #### What this PR does / why we need it Refactor the website to remove some duplication and formalize the actions. #### Which issue(s) this PR fixes Fixes open-component-model/ocm-project#1003 #### Testing ##### How to test the changes <!-- Required files to test the changes: .ocmconfig ```yaml type: generic.config.ocm.software/v1 configurations: - type: credentials.config.ocm.software repositories: - repository: type: DockerConfig/v1 dockerConfigFile: "~/.docker/config.json" ``` Commands that test the change: ```bash ocm get cv xxx ocm transfer xxx ``` --> ##### Verification - [ ] I have tested the changes locally by running `ocm` --------- Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> 0a5db92
…e website (open-component-model#2231) <!-- markdownlint-disable MD041 --> #### What this PR does / why we need it Refactor the website to remove some duplication and formalize the actions. #### Which issue(s) this PR fixes Fixes open-component-model/ocm-project#1003 #### Testing ##### How to test the changes <!-- Required files to test the changes: .ocmconfig ```yaml type: generic.config.ocm.software/v1 configurations: - type: credentials.config.ocm.software repositories: - repository: type: DockerConfig/v1 dockerConfigFile: "~/.docker/config.json" ``` Commands that test the change: ```bash ocm get cv xxx ocm transfer xxx ``` --> ##### Verification - [ ] I have tested the changes locally by running `ocm` --------- Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
…e website (open-component-model#2231) <!-- markdownlint-disable MD041 --> #### What this PR does / why we need it Refactor the website to remove some duplication and formalize the actions. #### Which issue(s) this PR fixes Fixes open-component-model/ocm-project#1003 #### Testing ##### How to test the changes <!-- Required files to test the changes: .ocmconfig ```yaml type: generic.config.ocm.software/v1 configurations: - type: credentials.config.ocm.software repositories: - repository: type: DockerConfig/v1 dockerConfigFile: "~/.docker/config.json" ``` Commands that test the change: ```bash ocm get cv xxx ocm transfer xxx ``` --> ##### Verification - [ ] I have tested the changes locally by running `ocm` --------- Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com> Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
What this PR does / why we need it
Refactor the website to remove some duplication and formalize the actions.
Which issue(s) this PR fixes
Fixes open-component-model/ocm-project#1003
Testing
How to test the changes
Verification
ocm