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

  • datadog-api-client-typescript/.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:34
@MintsInc MintsInc requested review from a team as code owners September 22, 2025 11:34
@MintsInc MintsInc force-pushed the ulysse.mavrocordatos/fix-reusable-pre-commit branch from 7391eec to 0ea4a6b Compare September 22, 2025 14:12
   so it runs on the correct commit sha
@MintsInc MintsInc force-pushed the ulysse.mavrocordatos/fix-reusable-pre-commit branch from 0ea4a6b to 4f0f177 Compare September 24, 2025 11:42
@MintsInc MintsInc merged commit 6251385 into master Sep 24, 2025
12 checks passed
@MintsInc MintsInc deleted the ulysse.mavrocordatos/fix-reusable-pre-commit branch September 24, 2025 11:53
github-actions bot pushed a commit that referenced this pull request Sep 24, 2025
so it runs on the correct commit sha 6251385
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.

2 participants