[OPIK-5374] [GHA] fix: skip empty PRs in peter-evans/create-pull-request workflows#5995
Merged
JetoPistola merged 1 commit intomainfrom Apr 6, 2026
Conversation
Contributor
Author
|
Later --cached (--staging) Closing for now Update:
The git diff is enough, --quiet to avoid verbose diff, only care in logic for 0/1 |
…est workflows Add git diff guard to span_cost_upload_daily.yml and sdks_generate_openapi_spec_and_fern_code.yml to prevent creating empty PRs when upstream data hasn't changed. Removes --allow-empty from git commit and gates commit + PR creation on has_changes check. sync_provider_models.yml already had this guard and needed no changes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3f0f3a9 to
0b71aed
Compare
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
Two GitHub Actions workflows (
span_cost_upload_daily.ymlandsdks_generate_openapi_spec_and_fern_code.yml) usedgit commit --allow-emptyand unconditionally ranpeter-evans/create-pull-request, creating empty PRs (no diff) when upstream data hadn't changed. This adds agit diff --quietguard — matching the pattern already used insync_provider_models.yml— to skip commit and PR creation when there are no actual changes.Change checklist
Issues
AI-WATERMARK
AI-WATERMARK: yes
Testing
sync_provider_models.yml(already guarded) was left unchangedhas_changes == 'true'pr_url != ''Documentation
N/A