Skip to content

Conversation

@tdilauro
Copy link
Contributor

Description

Inverts the condition and results of a the fetch depth calculation in the publish workflow so that a release will use fetch depth 1 and a push will use 0, as expected.

Motivation and Context

Before the change, when the github.event_name == 'push' matched, the result was 0, which is falsy. That triggered the || 1, giving a result of 1. So, the result would always be 1, regardless of the value of github.event_name.

After the change if github.event_name is 'release', we'll get a truthy value (1), so we'll stop at the ||. Otherwise, we'll fall through and return 0, which is the value that we need for a 'push' event.

How Has This Been Tested?

This will be tested once it is merged.

Checklist:

  • N/A - I have updated the documentation accordingly.
  • All new and existing tests passed.

@tdilauro tdilauro merged commit 78d0042 into main Jan 21, 2026
1 check passed
@tdilauro tdilauro deleted the bugfix/fix-publish-workflow-fetch-depth branch January 21, 2026 13:52
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.

3 participants