Skip to content

Commit

Permalink
do not care about merge_commit
Browse files Browse the repository at this point in the history
  • Loading branch information
danking committed Dec 12, 2024
1 parent 58b5911 commit 40619dd
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions scripts/commit-json.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ author_name=$(git log -1 --pretty=format:'%an' $GITHUB_SHA)
committer_email=$(git log -1 --pretty=format:'%ce' $GITHUB_SHA)
committer_name=$(git log -1 --pretty=format:'%cn' $GITHUB_SHA)

merge_commit_id=$(git rev-parse HEAD)
merge_commit_title=$(git log -1 --pretty=%B | head -n 1)
merge_commit_timestamp=$(git log -1 --format=%cd --date=iso-strict)

tree_id=$(git rev-parse --verify ${GITHUB_SHA}^{tree})
repo_url=$(git config --get remote.origin.url | sed 's/[email protected]:/https:\/\/github.com\//' | sed 's/.git$//')

Expand All @@ -34,10 +30,5 @@ jq --compact-output '.' <<EOF
"timestamp": "$commit_timestamp",
"tree_id": "$tree_id",
"url": "$repo_url/commit/$commit_id",
"merge_commit": {
"id": "$commit_id",
"message": "$commit_title",
"timestamp": "$commit_timestamp"
}
}
EOF

0 comments on commit 40619dd

Please sign in to comment.