wearerequired / lint-action

✨ GitHub Action for detecting and auto-fixing lint errors
MIT License
555 stars 130 forks source link

Support unconventional branch names #637

Closed klippx closed 6 months ago

klippx commented 1 year ago

Problem

Renovate github action creates PRs with branch names containing parentheses.

When this action runs on such a branch, this happens:

Setting Git user information
Adding auth information to Git remote URL
Fetching remote branch "renovate/devdependencies-(non-major)"
/bin/sh: 1: Syntax error: "(" unexpected
Error: Command failed: git fetch --no-tags --depth=1 origin renovate/devdependencies-(non-major)
/bin/sh: 1: Syntax error: "(" unexpected

Solution

Escape the string containing branch name so they can be checked out.