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
// Fail closed if PR exceeds max single-page limits (100 commits)
69
+
if (commitsConnection.pageInfo.hasNextPage || commitsConnection.totalCount > 100) {
70
+
core.setFailed(`PR block: Pull Request contains too many commits (${commitsConnection.totalCount}). Maximum supported limit for a automated verification run is 100 commits.`);
71
+
return;
72
+
}
62
73
63
74
// 2. Identify unsigned or validation-failing commits
const commentBody = `${commentIdentifier}\n.⚠️ **Unsigned Commits Detected**\n\nThe following commits in this Pull Request are missing a verified cryptographic signature:\n\n${commitList}\n\nPlease sign your commits to comply with <a href="https://metoffice.github.io/simulation-systems/WorkingPractices/gh_authorisation.html#verified-commits">project guidelines</a>.`;
90
+
const commentBody = `${commentIdentifier}\n⚠️ **Unsigned Commits Detected**\n\nThe following commits in this Pull Request are missing a verified cryptographic signature:\n\n${commitList}\n\nPlease sign your commits to comply with <a href="https://metoffice.github.io/simulation-systems/WorkingPractices/gh_authorisation.html#verified-commits">project guidelines</a>.`;
79
91
80
92
if (existingComment) {
81
93
// Update the old comment with the refreshed list of unsigned commits
@@ -96,7 +108,8 @@ jobs:
96
108
}
97
109
98
110
// Force the CI status check to fail outright
99
-
core.setFailed("❌ PR block: One or more commits do not have a verified signature.");
111
+
core.setFailed("PR block: One or more commits do not have a verified signature.");
112
+
return;
100
113
101
114
} else {
102
115
// All commits are signed! Clear old warning comment if it exists
@@ -108,5 +121,5 @@ jobs:
108
121
});
109
122
console.log("::notice::Clean state achieved: Deleted the old signature warning comment.");
110
123
}
111
-
console.log("::success::All commits are properly signed.");
124
+
console.log("::notice::All commits are properly signed.");
0 commit comments