chore(github-actions): Add GitHub Action to raise alert if Python/Groovy docs are changed asynchronously#7809
Conversation
No docs changes detected for 3224574 |
|
|
||
| - name: Get changed files | ||
| id: changed-files | ||
| uses: tj-actions/changed-files@v45 |
There was a problem hiding this comment.
This is an old version, and v45 was actually compromised: https://semgrep.dev/blog/2025/popular-github-action-tj-actionschanged-files-is-compromised/
Tag it with an actual commit, like 22103cc46bda19c2b464ffe86db46df6922fd323 instead, or do this inline in the action.
There was a problem hiding this comment.
I made a change and apparently didn't push the commit. Updated.
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions check intended to prevent Python and Groovy documentation from drifting out of sync by failing PRs where one doc tree changes without the other, with opt-out labels for language-specific changes.
Changes:
- Introduces a new
Docs Sync Checkworkflow that runs on PRs touchingdocs/python/**ordocs/groovy/**. - Adds a Bash script to detect changed doc files and enforce the sync rule, with label-based bypasses (
NoPythonDocsChangesNeeded,NoGroovyDocsChangesNeeded).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/docs-sync-check.yml | New PR check workflow that gathers changed doc files and runs a sync-validation script. |
| .github/scripts/check-docs-sync.sh | Implements the sync-validation logic and label-based bypass behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
|
||
| - name: Get changed files | ||
| id: changed-files | ||
| # v46.0.7 - pinned to SHA for security |
There was a problem hiding this comment.
This looks like the wrong version? I don't see it.
I just spent a few weeks getting Core Python and Groovy docs back into sync. It's easy to make a small update to either Python or Groovy, and forget to make corresponding updates on the other side. This PR creates a check that raises an alert if docs/python/whatever is updated, but docs/groovy/whatever is not (and vice versa). There are new Github labels for NoPythonDocsChangesNeeded and NoGroovyDocsChangesNeeded for the cases where changes are language-specific.