Skip to content

[Infra] Replace Danger with Python script for changelog checks #8470

Open
rlazo wants to merge 7 commits into
mainfrom
rl.danger.removal
Open

[Infra] Replace Danger with Python script for changelog checks #8470
rlazo wants to merge 7 commits into
mainfrom
rl.danger.removal

Conversation

@rlazo

@rlazo rlazo commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Replace the Ruby-based Danger changelog verification setup with a custom Python script (ci/changelog_check.py).

  • Update: .github/workflows/changelog.yml to run actions/setup-python with Python 3.12 instead of Ruby setup and
    Bundler steps.
  • Grant: pull-requests: write and issues: write permissions in the GitHub Actions workflow to enable PR comment management.
  • Add: ci/changelog_check.py to check for changelog updates when SDK source files are modified, with support for PR comments via the GitHub API and skipping options (no-changelog label or NO_RELEASE_CHANGE description).
  • Remove: Danger files including Dangerfile, Gemfile, Gemfile.lock, and setup_bundler.sh.

rlazo added 2 commits July 22, 2026 20:24
Replace the Ruby-based Danger changelog verification setup with a custom Python script (`ci/changelog_check.py`).

* Update: `.github/workflows/changelog.yml` to run
`actions/setup-python` with Python 3.12 instead of Ruby setup and
Bundler steps.
* Grant: `pull-requests: write` and `issues: write` permissions in the
GitHub Actions workflow to enable PR comment management.
* Add: `ci/changelog_check.py` to check for changelog updates when SDK
source files are modified, with support for PR comments via the GitHub
API and skipping options (`no-changelog` label or `NO_RELEASE_CHANGE`
description).
* Remove: Danger files including `Dangerfile`, `Gemfile`,
`Gemfile.lock`, and `setup_bundler.sh`.
@gemini-code-assist

Copy link
Copy Markdown
Contributor
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

@github-actions

Copy link
Copy Markdown
Contributor

📝 PRs merging into main branch

Our main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released.

@wiz-9635d3485b

wiz-9635d3485b Bot commented Jul 23, 2026

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 3 Medium
Software Management Finding Software Management Findings -
Total 3 Medium

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

@rlazo

rlazo commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request replaces the Ruby-based Danger changelog check with a Python script (ci/changelog_check.py) and removes the old Ruby configuration files. The review feedback suggests several improvements: querying the GitHub API directly to avoid failures with shallow clones in GitHub Actions, removing a break statement to ensure all stale warning comments are cleaned up, and explicitly specifying 'utf-8' encoding when decoding HTTP responses.

Comment thread ci/changelog_check.py
Comment thread ci/changelog_check.py Outdated
Comment thread ci/changelog_check.py Outdated
rlazo and others added 5 commits July 23, 2026 09:31
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Enhance `ci/changelog_check.py` to retrieve modified files using the
GitHub API in GitHub Actions environments, avoiding shallow clone
limitations. Added a fallback to `git diff` against `origin/main` or
`main`. Also updated the script's comment signature and cleaned up
trailing whitespace.
Remove the break statement in delete_comment_if_exists to ensure all
existing bot comments are deleted rather than stopping after the first
match.
Refactored `get_modified_files` in `ci/changelog_check.py` to remove
an unneeded outer try block in the git diff fallback mechanism and
removed a redundant error message output prior to returning an empty
list.
@rlazo
rlazo marked this pull request as ready for review July 23, 2026 13:49
@rlazo
rlazo requested review from VinayGuthal and milaGGL July 23, 2026 19:48
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.

1 participant