Skip to content

fix(release): Use GitHub org membership for version calculation - #72

Merged
mateo-di merged 2 commits into
carto/mainfrom
fix/version-calc-org-membership
Jan 26, 2026
Merged

fix(release): Use GitHub org membership for version calculation#72
mateo-di merged 2 commits into
carto/mainfrom
fix/version-calc-org-membership

Conversation

@mateo-di

Copy link
Copy Markdown
Collaborator

Summary

The version calculation script was filtering commits by author email domain (@carto.com, @cartodb.com), but some team members (like Jose) use personal emails for git commits.

Changes:

  • Use GitHub API to fetch CartoDB org members dynamically
  • Filter commits by GitHub username instead of email domain
  • Fixed conventional commit regex to handle scopes like fix(azure):

Before: Commits from josemaria.vilaplana@gmail.com were ignored
After: All commits from CartoDB GitHub org members are counted

Test plan

Tested locally:

$ ./.github/scripts/calculate_carto_version.sh "v1.79.1-carto.1.0.20" "1.79.1"
  [OTHER] f75530c Handles missing tool call fields
  [PATCH] c080b46 fix: add explicit output instructions to Slack changelog prompt
  [PATCH] d279721 fix(oci): Add tool calling support for OCI Gemini streaming
  [PATCH] 017c557 fix(oci): Add tool calling support for OCI Gemini streaming
  [PATCH] e56322f fix(databricks): Handle empty delta in GPT-5 streaming responses
  [PATCH] cbdbef6 fix(azure): Strip operation suffixes from deployment URLs to prevent 404 errors

New version: v1.79.1-carto.1.0.26
  • Merge and trigger a release to verify it works in CI

Checklist

  • Script tested locally
  • Handles pagination for org members
  • Fallback if API call fails

The version calculation was filtering commits by author email domain
(@carto.com, @cartodb.com), but some team members use personal emails.

Changes:
- Use GitHub API to fetch CartoDB org members
- Filter commits by GitHub username instead of email
- Fixed conventional commit regex to handle scopes: fix(scope):

This ensures all CartoDB org member commits are counted regardless
of what email they use for git commits.
@mateo-di

Copy link
Copy Markdown
Collaborator Author

/gemini review

@mateo-di mateo-di self-assigned this Jan 26, 2026
The default GITHUB_TOKEN doesn't have read:org permission needed
to fetch organization members list. Use X_GITHUB_SUPERCARTOFANTE
PAT which has the required scope.
@mateo-di
mateo-di marked this pull request as ready for review January 26, 2026 15:21
@mateo-di
mateo-di merged commit 3785bc5 into carto/main Jan 26, 2026
3 of 4 checks passed
mateo-di added a commit that referenced this pull request Jan 29, 2026
Update CARTO file detection to use GitHub API org membership check,
matching the approach in calculate_carto_version.sh (PR #72).

Changes:
- Resolver: Fetch CartoDB org members via `gh api orgs/CartoDB/members`
- Resolver: Check commit authors against org member list
- CI Fixer: Update docs to reference "CartoDB GitHub org members"
- Docs: Update CARTO_CLAUDE.md with org membership reference

This is more reliable than email domain matching because:
- GitHub usernames are authoritative
- Works for users with non-CARTO emails
- Consistent with version calculator logic
mateo-di added a commit that referenced this pull request Jan 29, 2026
* feat: Implement CARTO-First resolution strategy for upstream syncs

Add CARTO-FIRST conflict resolution priority that mandates preserving
CARTO customizations made by CartoDB org members during upstream syncs.

Key changes:
- Resolver: Add pre-analysis step to identify CARTO-modified files
- Resolver: Update prompt with CARTO-FIRST priority table (6 priorities)
- Resolver: Add known CARTO customizations list (Azure, Snowflake, etc.)
- CI Fixer: Add FORBIDDEN ACTIONS (never revert CARTO code)
- CI Fixer: Add REQUIRED ACTIONS (fix tests, not CARTO code)
- Docs: Update CARTO_CLAUDE.md with new resolution priorities

The key insight is using `git log` to identify files with commits from
@carto.com or @cartodb.com authors, then prioritizing those files.

[sc-XXXXX]

* fix: Use GitHub org membership check instead of email domains

Update CARTO file detection to use GitHub API org membership check,
matching the approach in calculate_carto_version.sh (PR #72).

Changes:
- Resolver: Fetch CartoDB org members via `gh api orgs/CartoDB/members`
- Resolver: Check commit authors against org member list
- CI Fixer: Update docs to reference "CartoDB GitHub org members"
- Docs: Update CARTO_CLAUDE.md with org membership reference

This is more reliable than email domain matching because:
- GitHub usernames are authoritative
- Works for users with non-CARTO emails
- Consistent with version calculator logic

* feat: Build rich CARTO context from ALL merged PRs for conflict resolution

Replace simple PR listing with intelligent context building:

- Fetch ALL merged PRs to carto/main (up to 1000, no arbitrary limit)
- For each CARTO-modified conflicted file, show:
  - Which PRs modified it
  - PR title (what the change does)
  - Author and lines changed (+/-)
  - Summary from PR description (first 150 chars)
- Provide full PR reference table sorted by recency

Example context for Claude:
```
### `litellm/llms/azure/chat/gpt_transformation.py`
**2 CARTO PR(s) modified this file:**
  - PR #70: fix(azure): Strip operation suffixes from deployment URLs
    Author: @josemaria-vilaplana | +189/-1 lines
  - PR #61: fix: Azure Responses API URL construction
    Author: @josemaria-vilaplana | +77/-3 lines
```

This gives Claude full understanding of WHY each file was modified,
enabling smarter conflict resolution decisions.
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