Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

feat: Add run_for_branch option#8

Merged
mydea merged 2 commits intomasterfrom
runForBranch
Feb 20, 2023
Merged

feat: Add run_for_branch option#8
mydea merged 2 commits intomasterfrom
runForBranch

Conversation

@mydea
Copy link
Copy Markdown
Member

@mydea mydea commented Feb 17, 2023

We want to run size limit on release branches, in order to include this information in the github release (see https://github.com/getsentry/size-limit-release). In order to make this happen, we need to be able to trigger size limit on non-default branches as well.

This allows to pass a new optional run_for_branch boolean option. If this is set to true, it will run as it currently does for the default branch. If this is not set, it will keep doing what it does right now.

We want to be able to run the action on release branches as well.
This adds a new option` run_for_branch` which can be set to overwrite the default `isMainBranch` detection.

When this is set to `'true'`, it will run size limit for the given branch without any comparison. Set it to unset or `''` to revert to the default main branch detection.
@mydea mydea self-assigned this Feb 17, 2023
mydea added a commit to getsentry/sentry-javascript that referenced this pull request Feb 17, 2023
Based on getsentry/size-limit-action#8, this ensures we can actually run size-limit on release branches, which currently fails.
mydea added a commit to getsentry/sentry-javascript that referenced this pull request Feb 17, 2023
Based on getsentry/size-limit-action#8, this ensures we can actually run size-limit on release branches, which currently fails.
Copy link
Copy Markdown
Member

@billyvg billyvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me

@mydea mydea merged commit ef0a56c into master Feb 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants