Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release tooling: Fix patch preparation not cancelling when no patches available #25942

Merged
merged 2 commits into from
Feb 9, 2024

Conversation

JReinhold
Copy link
Contributor

@JReinhold JReinhold commented Feb 7, 2024

What I did

Changed the logic for checking if any PRs are available to patch. GitHub for some reason thinks '0' == null, so the previous condition would always be false. This caused patch preparation to always be done, even when no patching was needed, eg. see this current state of the empty prepared patch PR:

image

After every patch release the workflow would fail because it would result in opening an empty PR, eg. this run: https://github.com/storybookjs/storybook/actions/runs/7803855460/job/21284534067

Now we instead pass in 'true' when no patches or 'false' when there are patches. This is still compatible with the "no output" scenario, which would not be true and thus not cancel. There won't be an output until this PR is patches back to main, which I'll manually do afterwards.

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

I tested this manually in the following run: https://github.com/storybookjs/storybook/actions/runs/7815398511/job/21318658549

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>

@JReinhold JReinhold added build Internal-facing build tooling & test updates ci:docs Run the CI jobs for documentation checks only. labels Feb 7, 2024
@JReinhold JReinhold self-assigned this Feb 7, 2024
@JReinhold JReinhold merged commit 903317b into next Feb 9, 2024
31 of 37 checks passed
@JReinhold JReinhold deleted the jeppe/fix-gh-patch-preparation branch February 9, 2024 09:35
JReinhold added a commit that referenced this pull request Feb 9, 2024
…tion

Release tooling: Fix patch preparation not cancelling when no patches available

(cherry picked from commit 903317b)
@github-actions github-actions bot mentioned this pull request Feb 9, 2024
17 tasks
@github-actions github-actions bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Internal-facing build tooling & test updates ci:docs Run the CI jobs for documentation checks only. empathy patch:done Patch/release PRs already cherry-picked to main/release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants