Skip to content

Commit 057defa

Browse files
committed
change for adding branch
1 parent e2451b1 commit 057defa

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

bin/helpers/helper.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,13 @@ exports.getGitMetaData = () => {
127127
console.log("branch", commit["branch"]);
128128
});
129129

130-
// if(info["branch"] == null){
131-
// gitLastCommit.
132-
// }
133130
try {
134131
info["author"] = info["author"] || `${commit["author"]["name"].replace(/[]+/g, '')} <${commit["author"]["email"].replace(/[]+/g, '')}>`;
135132
info["authorDate"] = info["authorDate"] || commit["authoredOn"];
136133
info["committer"] = info["committer"] || `${commit["committer"]["name"].replace(/[]+/g, '')} <${commit["committer"]["email"].replace(/[]+/g, '')}>`;
137134
info["committerDate"] = info["committerDate"] || commit["committedOn"];
138135
info["commitMessage"] = info["commitMessage"] || commit["subject"];
136+
info["branch"] = info["branch"] || commit["branch"];
139137

140138
const { remote } = await pGitconfig(info.commonGitDir);
141139
const remotes = Object.keys(remote).map(remoteName => ({name: remoteName, url: remote[remoteName]['url']}));

0 commit comments

Comments
 (0)