Skip to content

Commit

Permalink
add short git commit hash to PR comment
Browse files Browse the repository at this point in the history
Fixes #11.
  • Loading branch information
radhermit committed Nov 18, 2024
1 parent 5329d45 commit 4727dfa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ runs:
shell: bash
run: |
echo "REPO=${{ inputs.repo }}" >> $GITHUB_ENV
echo "GIT_COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "GIT_DEFAULT_BRANCH=${{ github.event.repository.default_branch }}" >> $GITHUB_ENV
echo "GH_PR=${{ github.event.number }}" >> $GITHUB_ENV
echo "GIT_BASE_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV
Expand Down
1 change: 1 addition & 0 deletions pkgcruft-action
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ set +e
# add PR comment using diff format
pr=$(mktemp)
echo '```diff' >> "${pr}"
echo "Commit: ${GIT_COMMIT}" >> "${pr}"
cat "${header}" >> "${pr}"
cat "${diff}" >> "${pr}"
echo '```' >> "${pr}"
Expand Down

0 comments on commit 4727dfa

Please sign in to comment.