Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
102b501
feat: expose interpreter files-to-run on PyRuntimeInfo (#3795)
jsun-splunk Jun 17, 2026
5c32fa9
chore: prepare 2.1 release (#3829)
rickeylev Jun 18, 2026
98b769e
chore: generate release changelog from news entries (#3827)
rickeylev Jun 19, 2026
105f654
fix(coverage): skip lcov report when no data was collected (#3832)
maxbirkner Jun 19, 2026
fe24f8c
fix(pypi): respect empty envsubst expansion in experimental_index_url…
kriscfoster Jun 19, 2026
a6541b5
refactor(pypi): don't use Python to patch wheels (#3808)
aignas Jun 19, 2026
de0405a
feat(py_info): expose VenvSymlinkEntry and VenvSymlinkKind as public …
rickeylev Jun 20, 2026
694cc06
doc: merge news into generated changelog (#3836)
rickeylev Jun 20, 2026
ca86984
ci: enable bazel-diff (#3838)
rickeylev Jun 20, 2026
b16ce73
fix: run bazel-diff in cquery mode under bazelci (#3839)
rickeylev Jun 21, 2026
e9ecdba
ci: disable bazel-diff due to platform compatibility conflicts (#3840)
rickeylev Jun 21, 2026
01903fc
chore: warn on implicit __init__.py creation (#3841)
rickeylev Jun 21, 2026
1a15c3b
fix(bootstrap): use retry loop for win32 version lookup in site init …
rickeylev Jun 22, 2026
dd53218
fix(rules): disambiguate slash target venv outputs (#3845)
gleyba Jun 24, 2026
4b19581
chore: automate releases (#3833)
rickeylev Jun 24, 2026
913201d
build(deps): bump actions/checkout from 6 to 7 (#3843)
dependabot[bot] Jun 24, 2026
0384676
chore: remove accidentally committed release automation plan (#3846)
rickeylev Jun 24, 2026
63f77d3
feat: unified pypi hub repository (#3837)
rickeylev Jun 25, 2026
12680c5
feat(pypi): support importing uv.lock file (#3785)
aignas Jun 25, 2026
ee53e46
chore: add agent rule to base new branches on upstream/main (#3849)
rickeylev Jun 26, 2026
9ed7641
build(ci): consolidate PR guardrails and block draft files (#3859)
rickeylev Jun 28, 2026
de6ca1b
refactor: use gazelle for bzl_library management (#3852)
rickeylev Jun 28, 2026
959a103
fix(ci): use --repo flag in gh pr diff to avoid checkout (#3861)
rickeylev Jun 28, 2026
d37c649
feat: stop using chmod on Bazel 8.6+ (#3855)
aignas Jun 28, 2026
20db956
ci: make pr-metadata-check run on PR body edit (#3862)
rickeylev Jun 28, 2026
367190a
chore(pypi): cleanup unused code (#3864)
aignas Jun 29, 2026
097f6a1
chore(release): correct version tagging and improve promotion flow (#…
rickeylev Jun 29, 2026
9734b11
chore(release): add dry-run to release tool prepare command (#3869)
rickeylev Jun 30, 2026
8a825aa
chore(release): reuse existing PRs and avoid early exit in prep tool …
rickeylev Jun 30, 2026
9af23e5
chore(release): use force push and clean up git helpers in prep tool …
rickeylev Jun 30, 2026
ee0acbd
Prepare release v2.2.0 (#3874)
github-actions[bot] Jun 30, 2026
098379f
chore(release): fix release label consistency in workflows and templa…
rickeylev Jun 30, 2026
fbb2ccf
fix: avoid stage1 bootstrap stdlib shadowing (#3854)
gleyba Jul 1, 2026
865ed25
build(deps): bump bazel-contrib/publish-to-bcr/.github/workflows/publ…
dependabot[bot] Jul 1, 2026
3ab60b5
chore(release): support custom remote in create-release-branch and re…
rickeylev Jul 1, 2026
2241f8b
chore(release): refactor create-rc and handle existing remote release…
rickeylev Jul 1, 2026
dc0d977
chore(release): various fixes to release tool and workflows (#3880)
rickeylev Jul 1, 2026
30a0583
feat(pypi): add pip.dep to declare abstract pypi dependencies (#3850)
rickeylev Jul 1, 2026
cc799f1
chore(release): refactor process-backports and various release tool f…
rickeylev Jul 2, 2026
839deaf
chore(release): factor code, make testable, clarify workflow names (#…
rickeylev Jul 2, 2026
6570a9e
chore(release): pass missing --remote argument to release workflows (…
rickeylev Jul 2, 2026
e433644
chore(release): enable execution in process-backports workflow (#3884)
rickeylev Jul 2, 2026
e51d822
chore(release): release automation fixes and refactoring (#3885)
rickeylev Jul 2, 2026
8629003
fix: use locale-neutral Windows ACL for build data (#3887)
alex-the-third Jul 2, 2026
08025e1
feat(py_test): add opt-in safeguard against accidental no-op tests (#…
thirtyseven Jul 3, 2026
7968ac9
feat: enable pyproject.toml as single source of truth for Python vers…
golithe Jul 3, 2026
8396c28
Fix release tool links and improve workflow robustness (#3888)
rickeylev Jul 3, 2026
f3fa8da
build(release): support triggering release workflows via comments (#3…
rickeylev Jul 3, 2026
b2d1bf0
chore(release): allow comments to trigger actions, update releasing d…
rickeylev Jul 3, 2026
1f87784
chore(release): grant write permissions to on_issue_comment workflow …
rickeylev Jul 3, 2026
e3c8867
chore(release): add pull-requests: write permission to on_issue_comme…
rickeylev Jul 3, 2026
12ce31b
chore(release): auto-add RC tasks to checklist in create-rc (#3894)
rickeylev Jul 3, 2026
d77d5a4
fix(release): secure workflows against shell injection (#3895)
rickeylev Jul 3, 2026
1d99f70
fix: run executable zip action with execution Python to better suppor…
dzbarsky Jul 3, 2026
f1db067
chore(release): process backports as part of creating RC (#3896)
rickeylev Jul 3, 2026
5fe64d8
chore(release): automate backport processing on PR merge, and have ad…
rickeylev Jul 4, 2026
0896b47
chore(release): fix promote_rc arguments and align comments (#3898)
rickeylev Jul 4, 2026
5650cc8
chore(release): fix promote-rc command and update workflow args (#3899)
rickeylev Jul 4, 2026
dcbdf1b
chore(release): make promote_rc workflow call publish_release workflo…
rickeylev Jul 4, 2026
52c51be
docs: sync 2.2 changelog and news to main (#3901)
rickeylev Jul 5, 2026
bcaf08a
chore(release): sync changelog and version markers to main during bac…
rickeylev Jul 6, 2026
b5d754e
chore: remove stale process-backports-before-rc news file (#3904)
rickeylev Jul 6, 2026
89eba16
chore(release): fix invalid workflow file syntax (#3908)
rickeylev Jul 6, 2026
b443ec7
build(deps): bump astral-sh/ruff-action from 4.0.0 to 4.1.0 (#3910)
dependabot[bot] Jul 7, 2026
00922ad
fix(pip): parse the index_url from uv.lock file (#3906)
aignas Jul 9, 2026
fc18dc1
chore: automated code review using antigravity (#3905)
rickeylev Jul 9, 2026
84d313b
fix: add explicit `data` attribute to `compile_pip_requirements` and …
granatam Jul 9, 2026
966329b
chore(pr-review): trigger automated review workflow on issue comments…
rickeylev Jul 11, 2026
cf152cd
chore(reviewbot): fix antigravity_review execution and configuration …
rickeylev Jul 11, 2026
a31feb9
fix(sphinxdocs): invalidate cache on branch change (#3917)
kaycebasques Jul 11, 2026
5bdec9f
refactor: use centralized NOT_ACTUALLY_PUBLIC across internal targets…
rickeylev Jul 12, 2026
19ffd21
fix: make executable implicit defaults public so other modules can us…
13steinj Jul 12, 2026
68d0878
chore(reviewbot): expand multi-model cascade with fallback endpoints …
rickeylev Jul 12, 2026
84f3c78
empty impl
rickeylev Sep 23, 2025
6fe2b19
basic attr builder usage
rickeylev Sep 23, 2025
6bab54a
add stub tests
rickeylev Sep 23, 2025
0dd6053
vibe coded py_extension impl. looks roughly valid, but untested
rickeylev Sep 23, 2025
3e75f74
making more vibe coded progress
rickeylev Sep 24, 2025
3e8240c
gave up vibe coding. confidence isn't correctness.
rickeylev Sep 24, 2025
ee792e5
try cc_shared_library impl
rickeylev Oct 16, 2025
4679c0a
feat: updates to the py_extension rule for building C extensions (#3851)
rsartor-cmd Jun 26, 2026
192a290
Don't leave a trailing slash for the root package.
rsartor-cmd Jun 26, 2026
c7438f2
Remove duplicate assignment.
rsartor-cmd Jun 26, 2026
f09a3d8
Remove typical C-style integer suffixes before parsing.
rsartor-cmd Jun 26, 2026
ce3d4a5
Fix check for filename.
rsartor-cmd Jun 26, 2026
c41871d
Remove unnecessary guard.
rsartor-cmd Jun 26, 2026
d26c7e2
Re-format docstring.
rsartor-cmd Jun 26, 2026
709a15c
Get the platform from the constraints.
rsartor-cmd Jun 29, 2026
9cecca3
Adjust formatting syntax.
rsartor-cmd Jun 29, 2026
fb5bb51
Change the default value.
rsartor-cmd Jun 29, 2026
95d8a95
Add more test cases for py_limited_api.
rsartor-cmd Jun 29, 2026
2ec69e3
Use RunfilesBuilder instead of manual.
rsartor-cmd Jun 29, 2026
603644d
Add abi_tag to PyCcToolchainInfo.
rsartor-cmd Jun 30, 2026
3d50da2
Use the PyCcToolchainInfo to derive the filename instead of the runti…
rsartor-cmd Jun 30, 2026
85390f7
Remove the fallback. Determine platform tag solely from constraints.
rsartor-cmd Jun 30, 2026
0ef9854
Remove the version compatibility check, as it has performance implica…
rsartor-cmd Jun 30, 2026
f2a12f3
Fix header filename.
rsartor-cmd Jun 30, 2026
c440311
Update python/private/cc/py_extension_rule.bzl
rsartor-cmd Jun 30, 2026
03efdac
ruff
rsartor-cmd Jun 30, 2026
8860b34
Derive the values for the _constraints attr programmatically, instead…
rsartor-cmd Jun 30, 2026
0b5a811
Take glibc-vs-musl into account, so we get the right platform and name.
rsartor-cmd Jun 30, 2026
e93b38f
Clean up as per the linter.
rsartor-cmd Jun 30, 2026
2e1e6ae
Remove print()s per buildifier.
rsartor-cmd Jun 30, 2026
3f2d3a3
Remove unused variable (buildifier).
rsartor-cmd Jun 30, 2026
0925c77
Sort keys [buildifier]
rsartor-cmd Jun 30, 2026
6131100
Remove print()s per buildifier.
rsartor-cmd Jun 30, 2026
a11e200
Remove unused load().
rsartor-cmd Jun 30, 2026
79eb5b1
Call out unused parameters [buildifier]
rsartor-cmd Jun 30, 2026
84195ab
Add some basic tests of different dependency situations, so we can co…
rsartor-cmd Jul 6, 2026
fa9d9a9
Replace the custom compiling and linking logic with internal cc_libra…
rsartor-cmd Jul 6, 2026
9f87991
Add missing files.
rsartor-cmd Jul 6, 2026
a83b44a
Add a data argument to the macro.
rsartor-cmd Jul 6, 2026
92f8eb2
Add missing file
rsartor-cmd Jul 7, 2026
7a209c6
Add a couple more examples for PyInit_* defined in dependency targets.
rsartor-cmd Jul 7, 2026
0d9b6b6
Add missing files
rsartor-cmd Jul 7, 2026
5367dea
Expand the analysis tests with more details assertions.
rsartor-cmd Jul 7, 2026
3423e5f
Re-format files
rsartor-cmd Jul 7, 2026
5e9dd8f
Address buildifier and buildifier-lint warnings.
rsartor-cmd Jul 7, 2026
baa5a80
Use text instead of code file for data.
rsartor-cmd Jul 9, 2026
390f838
Ignore unusual edge case.
rsartor-cmd Jul 9, 2026
3870d72
Restore missing file.
rsartor-cmd Jul 9, 2026
3ff2f69
Remove the CcSharedLibraryInfo provider for now.
rsartor-cmd Jul 10, 2026
f88f4ea
Calculate the platform tag from the constraints directly, instead of …
rsartor-cmd Jul 10, 2026
328daa5
Remove unused load()
rsartor-cmd Jul 13, 2026
e7e8d76
Fix tests.
rsartor-cmd Jul 14, 2026
710e9ad
Include free-threading 't' flag in the abi_tag, if the interpreter is…
rsartor-cmd Jul 14, 2026
eb50ca2
Calculate the platform tag and include it as part of the toolchain info.
rsartor-cmd Jul 14, 2026
d8057b4
Pass the right set of additional kwargs to the internal generated tar…
rsartor-cmd Jul 14, 2026
acf55b4
Adjust import logic to account for package names.
rsartor-cmd Jul 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .agents/rules/bzl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
trigger: glob
description: Starlark / Bazel .bzl file coding style rules
globs: *.bzl
---

# Starlark Rules

* Use triple-quoted strings for multi-line rule doc args.
* Don't use backslash line continuation in rule doc args.
10 changes: 10 additions & 0 deletions .agents/rules/github_actions_workflows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: github-actions-workflows
trigger: glob
globs: [".github/workflows/*.yml", ".github/workflows/*.yaml", ".github/*.yaml"]
---

# GitHub Actions Workflows Rule

* When creating files in `.github/workflows/` (such as `.yml` or `.yaml`
files), always use the latest version of the referenced GitHub Actions.
8 changes: 8 additions & 0 deletions .agents/rules/when-to-use-copyright.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
trigger: always_on
---

# When to Use Copyright

Unless directed by the user otherwise, do not add Bazel copyright to new or
existing files.
18 changes: 18 additions & 0 deletions .agents/rules/workspace.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
trigger: always_on
---

# Workspace Rules

To avoid confusion from using outdated code states, when starting a new
conversation/session or when first starting a new branch or worktree, unless
explicitly instructed otherwise, ensure the latest upstream code is used as the
basis:
* Fetch `upstream/main` (`git fetch upstream main`).
* Base any new branch or worktree upon `upstream/main` (e.g.,
`git checkout -b <branch> upstream/main`).
* Run the workspace helper script to configure upstream tracking and safe
pushing:
```bash
.agents/scripts/setup_triangle_branch.sh <branch>
```
25 changes: 25 additions & 0 deletions .agents/scripts/setup_triangle_branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
# Helper script to set up upstream tracking for fork-and-PR workflow.
set -e

# Detect current branch if not provided as argument
BRANCH_NAME="${1:-$(git symbolic-ref --short HEAD)}"

if [ -z "$BRANCH_NAME" ]; then
echo "Error: Could not detect current branch name." >&2
exit 1
fi

echo "Setting up upstream tracking for branch: $BRANCH_NAME"

# 1. Set the pull/fetch behavior to track the canonical repo's main branch
git config --local "branch.${BRANCH_NAME}.remote" upstream
git config --local "branch.${BRANCH_NAME}.merge" refs/heads/main

# 2. Override the destination remote for pushing
git config --local "branch.${BRANCH_NAME}.pushRemote" origin

# 3. Defend against global push.default settings (ensure it pushes to current branch name)
git config --local push.default current

echo "Successfully configured upstream/main tracking and origin pushRemote for $BRANCH_NAME!"
56 changes: 56 additions & 0 deletions .agents/skills/rule-creator/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
name: rule-creator
description: Create and format agent rules with proper front matter in the workspace
---

Use this skill when you need to create a new rule for the agent in the
workspace.

### Rule File Location

All workspace-specific rules must be created as individual Markdown files under
the `.agents/rules/` directory:
```
.agents/rules/<rule-name>.md
```

### Rule Format

Every rule file must start with a YAML front matter block defining the trigger
condition, followed by the rule content in Markdown.

```yaml
---
trigger: <trigger-condition>
---

# <Rule Title>

<Rule description and directives...>
```

#### Trigger Conditions
* `always_on`: The rule is always active and must be followed for all tasks.
* Custom triggers: You can specify other trigger conditions if the rule only
applies in certain contexts.

### Formatting Guidelines
* **Line Wrapping:** Always wrap all text in the rule file (including the
title and description) to **80 columns** to ensure readability and
compatibility.
* **Clarity:** Write clear, actionable directives.

### Example

To create a rule that prevents adding copyrights:

```markdown
---
trigger: always_on
---

# No Copyrights Rule

Unless directed by the user otherwise, do not add Bazel copyright to new or
existing files.
```
8 changes: 8 additions & 0 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ buildifier:
bazel: 7.x
skip_in_bazel_downstream_pipeline: "Bazel 7 required"
.reusable_config: &reusable_config
# USE_BAZEL_DIFF is disabled because target_compatible_with is used heavily,
# but BazelCI's bazel-diff integration errors when handling them.
# environment:
# USE_BAZEL_DIFF: "1"
build_targets:
- "--"
- "..."
Expand Down Expand Up @@ -80,6 +84,9 @@ buildifier:
coverage_targets: ["..."]
.coverage_targets_example_bzlmod_build_file_generation: &coverage_targets_example_bzlmod_build_file_generation
coverage_targets: ["//:bzlmod_build_file_generation_test"]
.coverage_targets_bootstrap: &coverage_targets_bootstrap
coverage_targets:
- //tests/bootstrap_impls:stdlib_shadowing_system_python_test
.coverage_targets_example_multi_python: &coverage_targets_example_multi_python
coverage_targets:
- //tests:my_lib_3_10_test
Expand Down Expand Up @@ -212,6 +219,7 @@ tasks:
bazel: 7.x
ubuntu:
<<: *reusable_config
<<: *coverage_targets_bootstrap
name: "Default: Ubuntu, Bazel {bazel}"
platform: ubuntu2204
bazel: ${{ bazel }}
Expand Down
2 changes: 2 additions & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ tests/integration/compile_pip_requirements/bazel-compile_pip_requirements
tests/integration/local_toolchains/bazel-local_toolchains
tests/integration/py_cc_toolchain_registered/bazel-py_cc_toolchain_registered
tests/integration/toolchain_target_settings/bazel-module_under_test
tests/integration/unified_pypi/bazel-unified_pypi
tests/integration/uv_lock/bazel-uv_lock
tests/integration/validate_test_main/bazel-module_under_test
3 changes: 3 additions & 0 deletions .bazelrc.deleted_packages
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ common --deleted_packages=examples/bzlmod/entry_points/tests
common --deleted_packages=examples/bzlmod/libs/my_lib
common --deleted_packages=examples/bzlmod/other_module
common --deleted_packages=examples/bzlmod/other_module/other_module/pkg
common --deleted_packages=examples/bzlmod/other_module/other_module/rule_builder
common --deleted_packages=examples/bzlmod/patches
common --deleted_packages=examples/bzlmod/runfiles
common --deleted_packages=examples/bzlmod/tests
Expand Down Expand Up @@ -40,7 +41,9 @@ common --deleted_packages=tests/integration/pip_parse_isolated
common --deleted_packages=tests/integration/py_cc_toolchain_registered
common --deleted_packages=tests/integration/runtime_manifests
common --deleted_packages=tests/integration/toolchain_target_settings
common --deleted_packages=tests/integration/unified_pypi
common --deleted_packages=tests/integration/uv_lock
common --deleted_packages=tests/integration/validate_test_main
common --deleted_packages=tests/modules/another_module
common --deleted_packages=tests/modules/other
common --deleted_packages=tests/modules/other/nspkg_delta
Expand Down
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ tools/publish/*.txt linguist-generated=true
tests/uv/lock/testdata/requirements.txt text eol=lf
python/private/runtimes_manifest_workspace.bzl text eol=lf
python/private/runtimes_manifest.txt text eol=lf

*.bat text eol=crlf
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/release_tracking_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Release Tracking Issue
about: Checklist for tracking a new release of rules_python.
title: 'Release <version>'
labels: ['type: release']
---
# Release tasks
- [ ] Prepare Release | status=awaiting-preparation
- [ ] Create Release branch
- [ ] Tag RC0
- [ ] Tag Final

## Backports

To request a backport, add it to the checklist below and process it. See [RELEASING.md: How to add backports](https://github.com/bazel-contrib/rules_python/blob/main/RELEASING.md#how-to-add-backports) for details.

---

To manually control the release flow, see the [RELEASING.md: Manual Editing](https://github.com/bazel-contrib/rules_python/blob/main/RELEASING.md#manual-editing-of-tracking-issue) section.

<details>
<summary><b>Available Commands</b></summary>

Comment commands:
- `/prepare`: Determines version, creates tracking issue and preparation PR.
- `/create-rc`: Tags and publishes a new release candidate (RC).
- `/process-backports`: Cherry-picks pending backports.
- `/add-backports <PRs>`: Adds PRs to the backports and processes backports.
- `/promote`: Promotes the latest RC to final release.

See [RELEASING.md](https://github.com/bazel-contrib/rules_python/blob/main/RELEASING.md) for details on how to use them.
</details>
79 changes: 79 additions & 0 deletions .github/workflows/automated_pr_review.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Automated Code Review

# TODO: Eventually, use pull_request_target instead of pull_request.
# pull_request_target runs in the base branch context and has access
# to secrets (like GEMINI_API_KEY) even for fork PRs.
# Using pull_request for now during setup/testing.
on:
issue_comment:
types: [created]

permissions:
contents: read
pull-requests: read

jobs:
# Always runs so the workflow run exits cleanly without a "No jobs ran" error
# when the review job's if-condition evaluates to false.
noop:
runs-on: ubuntu-latest
steps:
- name: Workflow trigger check
run: echo "Workflow triggered successfully."

review:
runs-on: ubuntu-latest
# Trigger only if it is a regular comment on a pull request, the comment body has a line
# starting with "/review", and the commenter is a maintainer (OWNER, MEMBER, or COLLABORATOR).
if: >
github.event_name == 'issue_comment' && github.event.issue.pull_request != null &&
(startsWith(github.event.comment.body, '/review') ||
contains(github.event.comment.body, '\n/review') ||
contains(github.event.comment.body, '\r\n/review')) &&
contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association)
steps:
- name: Checkout PR Branch
uses: actions/checkout@v7
with:
# Note: In GHA, during an issue_comment event on a PR, github.event.pull_request is null
# and the PR number is placed inside github.event.issue.number (because every PR is an issue).
# Therefore, github.event.issue.number is the PR number when checking out refs/pull/<number>/head.
ref: refs/pull/${{ github.event.pull_request.number || github.event.issue.number }}/head
persist-credentials: false

- name: Fetch Base Branch and Negotiate Minimal Diff History
env:
PR_COMMITS: ${{ github.event.pull_request.commits }}
run: |
# 1. Fetch the tip of main
git fetch origin main:refs/remotes/origin/main --depth=1

# 2. Check if we already have the merge base (common ancestor)
if ! git merge-base origin/main HEAD >/dev/null 2>&1; then
# If we know the exact number of commits in the PR, deepen by (PR_COMMITS + 10)
if [ -n "$PR_COMMITS" ] && [ "$PR_COMMITS" != "null" ]; then
git fetch --deepen="$((PR_COMMITS + 10))"
fi
# 3. If it's an issue_comment event (where PR_COMMITS is null) or still shallow, unshallow/deepen
if ! git merge-base origin/main HEAD >/dev/null 2>&1; then
git fetch --unshallow || git fetch --deepen=50
fi
fi

- name: Checkout Reviewbot (Base Branch)
uses: actions/checkout@v7
with:
sparse-checkout: |
tools/private/reviewbot
path: reviewbot

- name: Install uv
uses: astral-sh/setup-uv@v8.3.0

- name: Run Antigravity Review
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
uv run reviewbot/tools/private/reviewbot/antigravity_review.py \
--prompt reviewbot/tools/private/reviewbot/prompt.txt
20 changes: 0 additions & 20 deletions .github/workflows/check_do_not_merge_label.yml

This file was deleted.

3 changes: 1 addition & 2 deletions .github/workflows/check_version_markers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ grep_exit_code=0
# Exclude CONTRIBUTING.md, RELEASING.md because they document how to use these strings.
grep --exclude=CONTRIBUTING.md \
--exclude=RELEASING.md \
--exclude=release.py \
--exclude=release_test.py \
--exclude-dir=.* \
--exclude-dir=release \
VERSION_NEXT_ -r || grep_exit_code=$?

if [[ $grep_exit_code -eq 0 ]]; then
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Checkout the code
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- uses: jpetrucciani/mypy-check@master
with:
path: 'python/runfiles'
Expand All @@ -31,13 +31,13 @@ jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/ruff-action@v4.0.0
- uses: actions/checkout@v7
- uses: astral-sh/ruff-action@v4.1.0
with:
# Keep in sync with .pre-commit-config.yaml
version: 0.15.14
args: check --extend-exclude testdata
- uses: astral-sh/ruff-action@v4.0.0
- uses: astral-sh/ruff-action@v4.1.0
with:
version: 0.15.14
args: format --check --exclude testdata
Loading
Loading