Skip to content

Commit

Permalink
Merge pull request #752 from finos/595-unable-to-push-a-new-branch-to…
Browse files Browse the repository at this point in the history
…-an-empty-repository

fix: set parent to zero commit SHA if no parent exists on push (#595)
  • Loading branch information
JamieSlome authored Oct 21, 2024
2 parents 3ae282b + 9f7b1ea commit 5114131
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/proxy/processors/push-action/parsePush.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@ const getCommitData = (contents) => {
.trim();
console.log({ tree });

const parent = parts
.find((t) => t.split(' ')[0] === 'parent')
.replace('parent', '')
.trim();
const parentValue = parts.find((t) => t.split(' ')[0] === 'parent');
console.log({ parentValue });

const parent = parentValue
? parentValue.replace('parent', '').trim()
: '0000000000000000000000000000000000000000';
console.log({ parent });

const author = parts
Expand Down

0 comments on commit 5114131

Please sign in to comment.