You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FINERACT-2436: Add github action to enforce one commit per user in a PR
- added github action to check that one commit per user standard is enforced.
- also checks for whether user has git email properly configured to one registered in github.
commits=$(gh api "repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/commits") || { echo "::error::GitHub API request failed"; exit 1; }
26
+
27
+
if echo "$commits" | jq -e '.[] | select(.author == null)' > /dev/null; then
28
+
echo "null_authors=true" >> $GITHUB_OUTPUT
29
+
echo "::error::Some commits have a git email that is not linked to a GitHub account. Please ensure your git email matches one of your GitHub Account emails."
$'**One Commit Per User Check Failed**\n\nSome committers have a git email that does not match their GitHub account. Please ensure your git email matches one of your GitHub Account emails.'
51
+
fi
52
+
53
+
54
+
if [ "${{ steps.check.outputs.multiple_commits }}" == "true" ]; then
0 commit comments