Skip to content

Updated path in README sync automation#398

Open
mikeromard wants to merge 2 commits into
mainfrom
chore/update-docs-path-in-readme-sync
Open

Updated path in README sync automation#398
mikeromard wants to merge 2 commits into
mainfrom
chore/update-docs-path-in-readme-sync

Conversation

@mikeromard

@mikeromard mikeromard commented May 21, 2026

Copy link
Copy Markdown

Description

This PR is to update the README sync automation to account for the new paths introduced in the user-docs repo with the new site architecture. The source file is moving from docs/developer-tools/snyk-ide-plugins-and-extensions/eclipse-plugin/README.md to developer-tools/snyk-ide-plugins-and-extensions/eclipse-plugin/README.md on May 28.

Checklist

Screenshots / GIFs

Visuals that may help the reviewer. Please add screenshots for any UI change. GIFs are most welcome!

@snyk-io

snyk-io Bot commented May 21, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@CLAassistant

CLAassistant commented May 21, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.

❌ basti-snyk
❌ mikeromard
You have signed the CLA already but the status is still pending? Let us recheck it.

@mikeromard
mikeromard marked this pull request as ready for review May 22, 2026 12:10
@mikeromard
mikeromard requested a review from a team as a code owner May 22, 2026 12:10
@snyk-pr-review-bot

This comment has been minimized.

@snyk-pr-review-bot

Copy link
Copy Markdown

PR Reviewer Guide 🔍

🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Incorrect Path Depth 🟠 [major]

The sed search pattern ../../../.gitbook/assets/ is incorrect for the new directory structure. According to the PR description, the file moved from docs/developer-tools/snyk-ide-plugins-and-extensions/eclipse-plugin/README.md to developer-tools/snyk-ide-plugins-and-extensions/eclipse-plugin/README.md. This move reduces the directory depth by one level. If the assets are now in developer-tools/.gitbook/assets/ (as implied by the replacement URL), the relative path in the source markdown is now ../../.gitbook/assets/. The current regex will fail to find any matches, causing image links in the synchronized README to remain as relative paths that won't resolve on GitHub.

-e "s|../../../.gitbook/assets/|https://github.com/snyk/user-docs/raw/HEAD/developer-tools/.gitbook/assets/|g" \
📚 Repository Context Analyzed

This review considered 4 relevant code sections from 4 files (average relevance: 0.72)

@bastiandoetsch

Copy link
Copy Markdown

AI Review: snyk-eclipse-plugin #398 — Updated path in README sync automation (re-review)

Verdict: approved — no Critical blockers.

Change 1 (line 55): SOURCE_PATH double-docs fix

./docs/docs/developer-tools/..../docs/developer-tools/... — clearly correct. The repo is cloned as docs/, so docs/docs/ was a bug. Confirmed the target file exists at developer-tools/snyk-ide-plugins-and-extensions/eclipse-plugin/README.md in user-docs.

Change 2 (line 22): asset URL rewrite path

docs/.gitbook/assets/developer-tools/.gitbook/assets/ — internally consistent with the new SOURCE_PATH (three ../ from the eclipse-plugin README resolves to developer-tools/.gitbook/assets/). The README currently has no image references, so this sed is a no-op today. When images are added, they should live under developer-tools/.gitbook/assets/ for the URL to be correct.

Suggestions (pre-existing, not introduced by this PR)

  • No explicit permissions: block on the workflow. Minimum needed: contents: write, pull-requests: write.
  • Unquoted $SOURCE_PATH, $DESTINATION_REPOSITORY, $DESTINATION_BRANCH in shell steps — defensive quoting is good hygiene.

Verified Correct

  • No injection surface: both changed values are static strings.
  • No secrets introduced.
  • CI green. Snyk SCA/Code: pre-existing findings not introduced by this PR. — AI review

@bastiandoetsch bastiandoetsch 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.

SOURCE_PATH double-docs fix is correct. Sed path consistent with new SOURCE_PATH; README has no images so sed is currently a no-op. — AI review

cp $SOURCE_PATH ./$DESTINATION_REPOSITORY/$FILE_TO_COMMIT
sed -i \
-e "s|../../../.gitbook/assets/|https://github.com/snyk/user-docs/raw/HEAD/docs/.gitbook/assets/|g" \
-e "s|../../../.gitbook/assets/|https://github.com/snyk/user-docs/raw/HEAD/developer-tools/.gitbook/assets/|g" \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ Suggestion · non-blocking

The replacement URL here is correct — I verified against snyk/user-docs@HEAD: .../raw/HEAD/developer-tools/.gitbook/assets/ returns 200 while the repo-root variant (.../raw/HEAD/.gitbook/assets/) is 404. Assets genuinely live under developer-tools/.

But the match pattern on the left (../../../.gitbook/assets/, three ../) wasn't adjusted for the same relocation. Now that SOURCE_PATH drops the extra docs/ level, the synced README sits at developer-tools/snyk-ide-plugins-and-extensions/eclipse-plugin/README.md, so a relative asset link from it resolves at ../../.gitbook/assets/ (two ../, matching the sibling docs in that directory). The three-../ prefix no longer matches, so this rewrite will silently no-op.

No impact today — the current README contains zero .gitbook/assets image references, so sed finds nothing either way. But if an image is ever added (siblings already have them), the link will 404 on github.com. Consider dropping one ../s|../../.gitbook/assets/|...|g.

Note: this readme-sync.yml is copied across the other IDE plugin repos (per the header comment); the same two-line correction likely applies there too.

— AI review

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.

4 participants