Skip to content

Commit

Permalink
use commit range in PR header
Browse files Browse the repository at this point in the history
  • Loading branch information
radhermit committed Nov 29, 2024
1 parent d17777f commit 5362225
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkgcruft-action
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ set +e
# determine diff header
header=$(mktemp)
if [[ -s ${diff} ]]; then
echo "Differences from target branch: ${GIT_BASE_BRANCH}" >> "${header}"
echo "Differences from: ${GIT_BASE_BRANCH}..${GIT_COMMIT}" >> "${header}"
else
echo "No differences from target branch: ${GIT_BASE_BRANCH}" >> "${header}"
echo "No differences from: ${GIT_BASE_BRANCH}..${GIT_COMMIT}" >> "${header}"
fi

# output info
Expand All @@ -66,7 +66,6 @@ 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 5362225

Please sign in to comment.