Skip to content

bump-cask-pr: fix branch name for versions with colon #8731

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

Merged

Conversation

SeekingMeaning
Copy link
Contributor

@SeekingMeaning SeekingMeaning commented Sep 15, 2020

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Sometimes cask versions include a comma and a colon. However, colons are not allowed in Git branch names, so this PR adds a fix for brew bump-cask-pr by replacing the colon with another comma. (Originally, I used a semicolon but this doesn't work well with the Terminal shell as it sees it as the end of a command if it's not placed in quotes)

Sorry, something went wrong.

@SeekingMeaning SeekingMeaning added the cask Homebrew Cask label Sep 15, 2020
@SeekingMeaning SeekingMeaning force-pushed the bump-cask-pr/version-with-colon branch from ab9c62b to cb4d423 Compare September 15, 2020 17:44
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Suggestion based on more typical branch names but don't feel strongly.

@@ -193,7 +193,7 @@ def bump_cask_pr
sourcefile_path: cask.sourcefile_path,
old_contents: old_contents,
origin_branch: origin_branch,
branch_name: "bump-#{cask.token}-#{new_version}",
branch_name: "bump-#{cask.token}-#{new_version.tr(":", ",")}",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
branch_name: "bump-#{cask.token}-#{new_version.tr(":", ",")}",
branch_name: "bump-#{cask.token}-#{new_version.tr(":", "-")}",

Verified

This commit was signed with the committer’s verified signature.
dawidd6 Dawid Dziurla
Replace commas and colons with hyphens
@SeekingMeaning SeekingMeaning force-pushed the bump-cask-pr/version-with-colon branch from cb4d423 to 584c839 Compare September 15, 2020 18:17
@SeekingMeaning SeekingMeaning merged commit 16f936a into Homebrew:master Sep 15, 2020
@SeekingMeaning SeekingMeaning deleted the bump-cask-pr/version-with-colon branch September 15, 2020 19:04
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Dec 11, 2020
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Dec 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cask Homebrew Cask outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants