Skip to content

Commit

Permalink
feat(github-actions): skip angular-robot in postapproval action
Browse files Browse the repository at this point in the history
The Angular Robot is used for Renovate, and when Renovate pushes a small
update / or rebases upon conflicts, we should not need another explicit
review.

All actions performed by the `angular-robot` are managed by Googlers, so
this account should be able to skip the post approval checks.
  • Loading branch information
devversion committed Jul 11, 2022
1 parent 30d0711 commit 7b43ff7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions github-actions/post-approval-changes/lib/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ const googlers = [
'zarend',
];

const googleOwnedRobots = ['angular-robot'];

async function main() {
let installationClient: Octokit | null = null;

Expand All @@ -57,6 +59,10 @@ async function runPostApprovalChangesAction(client: Octokit): Promise<void> {
return;
}

if (googleOwnedRobots.includes(pr.user.login)) {
core.info('PR author is a robot owned by Google. Post approval changes are allowed.');
}

console.debug(`Requested Reviewers: ${pr.requested_reviewers.join(', ')}`);
console.debug(`Requested Teams: ${pr.requested_teams.join(', ')}`);

Expand Down
4 changes: 4 additions & 0 deletions github-actions/post-approval-changes/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25955,6 +25955,7 @@ var googlers = [
"wagnermaciel",
"zarend"
];
var googleOwnedRobots = ["angular-robot"];
async function main() {
let installationClient = null;
try {
Expand All @@ -25977,6 +25978,9 @@ async function runPostApprovalChangesAction(client) {
core.info("PR author is a googler, skipping as post approval changes are allowed.");
return;
}
if (googleOwnedRobots.includes(pr.user.login)) {
core.info("PR author is a robot owned by Google. Post approval changes are allowed.");
}
console.debug(`Requested Reviewers: ${pr.requested_reviewers.join(", ")}`);
console.debug(`Requested Teams: ${pr.requested_teams.join(", ")}`);
if ([...pr.requested_reviewers, ...pr.requested_teams].length > 0) {
Expand Down

0 comments on commit 7b43ff7

Please sign in to comment.