Skip to content

Invalid PR branch when used in repos with a leading dot #32

Closed
@jezdez

Description

@jezdez

🐞 Describe the bug

When trying to use the action from a repo whose name starts with a dot like .github (community health files), it fails with git errors when it tries to create the PR branch:

Error: Error: Command failed: git checkout -b "repo-sync/.github/default"
fatal: 'repo-sync/.github/default' is not a valid branch name.

📚 To Reproduce

Use the action in a repo whose name wouldn't be a valid Git branch.

💡 Expected behavior

Invalid characters in names should be filtered out.

🖼️ Screenshots

If applicable, add screenshots to help explain your problem.

⚙️ Environment

  • Action version: v.1.5.0

📋 Additional context

Alternatively it would be great to be able to specify the name of the branch, or the branch suffix.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfeature requestIdea for a new featurewaiting for responseWaiting for a response from the author

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions