Skip to content

Commit

Permalink
use diff format for PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
radhermit committed Nov 12, 2024
1 parent 3d8a4a9 commit 7fe574b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkgcruft-action
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ set +e
echo -e "\n\nNo differences from target branch: ${GIT_BASE_BRANCH}" >> "${diff_output}"
fi
cat "${diff_output}"
gh pr comment ${GH_PR} -F "${diff_output}"

# use diff format for PR comments
pr=$(mktemp)
echo "```diff" > "${pr}"
cat "${diff_output}" >> "${pr}"
echo "```" > "${pr}"
gh pr comment ${GH_PR} -F "${pr}"
fi
elif [[ ${GIT_BRANCH} != ${GIT_DEFAULT_BRANCH} ]]; then
# default branch to non-default branch diff
Expand Down

0 comments on commit 7fe574b

Please sign in to comment.