Skip to content

chore(github-actions): Add GitHub Action to raise alert if Python/Groovy docs are changed asynchronously#7809

Merged
elijahpetty merged 5 commits intodeephaven:mainfrom
elijahpetty:diffcheck-action
Mar 26, 2026
Merged

chore(github-actions): Add GitHub Action to raise alert if Python/Groovy docs are changed asynchronously#7809
elijahpetty merged 5 commits intodeephaven:mainfrom
elijahpetty:diffcheck-action

Conversation

@elijahpetty
Copy link
Contributor

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.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 19, 2026

No docs changes detected for 3224574

@elijahpetty elijahpetty changed the title Add GitHub Action to raise alert if Python/Groovy docs are changed asynchronously chore(github-actions): Add GitHub Action to raise alert if Python/Groovy docs are changed asynchronously Mar 19, 2026

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Member

Choose a reason for hiding this comment

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

@elijahpetty why was this mark resolved?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made a change and apparently didn't push the commit. Updated.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 Check workflow that runs on PRs touching docs/python/** or docs/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>
@elijahpetty elijahpetty requested a review from mofojed March 25, 2026 18:33
@elijahpetty elijahpetty requested a review from mofojed March 26, 2026 16:04
mofojed
mofojed previously approved these changes Mar 26, 2026

- name: Get changed files
id: changed-files
# v46.0.7 - pinned to SHA for security
Copy link
Member

Choose a reason for hiding this comment

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

This looks like the wrong version? I don't see it.

@elijahpetty elijahpetty requested a review from devinrsmith March 26, 2026 21:15
@elijahpetty elijahpetty enabled auto-merge (squash) March 26, 2026 21:37
@elijahpetty elijahpetty merged commit 8e80692 into deephaven:main Mar 26, 2026
23 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants