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
Simplify pr workflow to require 2 approvals on all PR's (#74)
Simplify pr workflow to require 2 approvals on all PR's
## Call Outs
All PR's will need 2 approvals from the commitee for this check to pass.
A more intelligent approach is on the way, but till then all PR's will
need 2 approvals.
This is done to prevent sneak attacks where someone gets approval for
non-std related changes, and after approval, they make changes to the
std files.
// Reuse the same workflow everytime there's a new review submitted
136
-
// instead of creating new workflows. Better efficiency and readability
137
-
// as the number of workflows is kept to a minimal number
138
-
if (checkRuns.data.total_count > 0) {
139
-
await github.rest.checks.update({
140
-
owner,
141
-
repo,
142
-
check_run_id: checkRuns.data.check_runs[0].id,
143
-
status: 'completed',
144
-
conclusion,
145
-
output
146
-
});
147
-
} else {
148
-
await github.rest.checks.create({
149
-
owner,
150
-
repo,
151
-
name: checkName,
152
-
head_sha: pr.data.head.sha,
153
-
status: 'completed',
154
-
conclusion,
155
-
output
156
-
});
157
-
}
158
-
159
98
if (conclusion === 'failure') {
160
99
core.setFailed(`PR needs at least ${requiredApprovals} total approvals and 2 required approvals. Current approvals: ${approvers.size}, Required approvals: ${requiredApprovals}`);
0 commit comments