Skip to content

Commit

Permalink
Remove caret as well
Browse files Browse the repository at this point in the history
  • Loading branch information
ukupat committed Feb 26, 2024
1 parent c05fdbf commit d4eee0f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35939,7 +35939,7 @@ ${links}`;
exports.run = run;
async function getBranchName(path) {
const branchName = await (0, bash_1.exec)(`git -C ${path} name-rev --name-only HEAD`);
return branchName.replace('remotes/origin/', '').replace(/~.*$/, '');
return branchName.replace('remotes/origin/', '').replace(/(~|\^).*$/, '');
}
async function getBehind(path, commitHash) {
const behind = await (0, bash_1.exec)(`git -C ${path} rev-list --count HEAD..origin/main`);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@remato/submodule-status-commenter",
"version": "2.0.1",
"version": "2.0.2",
"license": "MIT",
"description": "GitHub action to comment submodules current branch and state to the PR",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ${links}`
async function getBranchName(path: string) {
const branchName = await exec(`git -C ${path} name-rev --name-only HEAD`)

return branchName.replace('remotes/origin/', '').replace(/~.*$/, '')
return branchName.replace('remotes/origin/', '').replace(/(~|\^).*$/, '')
}

async function getBehind(path: string, commitHash: string) {
Expand Down

0 comments on commit d4eee0f

Please sign in to comment.