-
-
Notifications
You must be signed in to change notification settings - Fork 122
Closed
Labels
type: bugVerified problems that need to be worked onVerified problems that need to be worked on
Description
There doesn't seem to be any way to pass a --message
that has multiple word to the Git tag command. For example this attempt:
- name: "Commit changes"
uses: EndBug/add-and-commit@v7
with:
add: 'CHANGELOG.md'
message: 'Release 1.0.0'
tag: "v1.0.0 --annotate --message 'Release 1.0.0'"
Fails with:
2021-04-13T10:51:08.1831581Z > Tagging commit...
2021-04-13T10:51:08.1889446Z ##[error]Error: fatal: Failed to resolve '1.0.0'' as a valid ref.
2021-04-13T10:51:08.1904561Z ##[error]Error: fatal: Failed to resolve '1.0.0'' as a valid ref.
2021-04-13T10:51:08.1908826Z > Pushing commit to repo...
and this:
- name: "Commit changes"
uses: EndBug/add-and-commit@v7
with:
add: 'CHANGELOG.md'
message: 'Release 1.0.0'
tag: 'v1.0.0 --annotate --message "Release 1.0.0"'
results in the tag message being literally "Release 1.0.0"
.
I tried all kinds of YAML quoting, but the problem is really this function:
Lines 41 to 43 in f4b07e6
export function matchGitArgs(string: string) { | |
return string.match(/(?:[^\s"]+|"[^"]*")+/g) || [] | |
} |
There is no way to pass arguments to that so that it would keep the Release 1.0.0
as one string with no extra quotes around it:
Metadata
Metadata
Assignees
Labels
type: bugVerified problems that need to be worked onVerified problems that need to be worked on