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

feat: make custom branch patterns more useful #271

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

nornagon
Copy link
Member

@nornagon nornagon commented Jan 4, 2024

This improves the existing support for the SUPPORTED_BRANCH_PATTERN
configuration variable.

  1. The configured pattern is now consistently used everywhere we check
    branches. Previously there were a few places that hardcoded a check for
    Electron's branch pattern.
  2. We now use the regex's groups to determine branch ordering, instead of
    always splitting by -.
  3. Numeric groups are sorted numerically, otherwise groups are sorted
    lexically. This allows non-numeric branch patterns.
  4. Documented the environment variables that control this behavior.
  5. Changed a couple of error messages that referenced the default branch
    pattern to be more generic.
  6. Added some tests for branch matching.

@nornagon nornagon requested a review from a team as a code owner January 4, 2024 20:31
Copy link
Contributor

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

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

LGTM

@jkleinsc jkleinsc merged commit 87d47fd into electron:main Jan 5, 2024
3 checks passed
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.

2 participants