Skip to content

Conversation

@MintsInc
Copy link
Member

@MintsInc MintsInc commented Sep 22, 2025

Context

The reusable pre-commit workflows across all client repositories were failing when called from the datadog-api-spec repository due to a cross-repository SHA mismatch issue. The workflows were using github.event.pull_request.base.sha and github.event.pull_request.head.sha which refer to commits in the spec repository, but the workflows check out the client repository. This caused pre-commit to fail because these commit SHAs don't exist in the client repository.

This fix is essential for:

  • Cross-repository CI: Enables spec repository to validate generated client code using reusable workflows
  • MergeQueue compatibility: Required for the centralized CI management approach
  • Semantic correctness: Pre-commit should check files changed in the branch, not arbitrary commit ranges from another repository

Changes

Modified Files

  • .github/workflows/reusable-pre-commit.yml: Added merge-base commit range determination

Tests

This will be tested by referencing this version of the workflow in a spec PR.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@MintsInc MintsInc changed the title fix the reusable precommit so it runs on the correct commit sha fix the reusable precommit so it runs on the correct commit sha Sep 22, 2025
@MintsInc MintsInc marked this pull request as ready for review September 22, 2025 11:33
@MintsInc MintsInc requested review from a team as code owners September 22, 2025 11:33
@MintsInc MintsInc force-pushed the ulysse.mavrocordatos/fix-reusable-pre-commit branch from 8d58bfa to b3f5d8d Compare September 22, 2025 14:09
   so it runs on the correct commit sha
@MintsInc MintsInc force-pushed the ulysse.mavrocordatos/fix-reusable-pre-commit branch from b3f5d8d to 1842867 Compare September 24, 2025 11:39
@MintsInc MintsInc merged commit 3edc49a into master Sep 24, 2025
13 checks passed
@MintsInc MintsInc deleted the ulysse.mavrocordatos/fix-reusable-pre-commit branch September 24, 2025 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants