Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

Commit caecd39

Browse files
committed
Simplify
1 parent 81085d1 commit caecd39

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

src/_tests/fixtures/58764/mutations.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@
88
}
99
}
1010
},
11+
{
12+
"mutation": "mutation ($input: RemoveLabelsFromLabelableInput!) {\n removeLabelsFromLabelable(input: $input) {\n __typename\n }\n}\n",
13+
"variables": {
14+
"input": {
15+
"labelIds": [
16+
"MDU6TGFiZWwyMDk2NzQ1NzQx"
17+
],
18+
"labelableId": "PR_kwDOAFz6BM4yvxmj"
19+
}
20+
}
21+
},
1122
{
1223
"mutation": "mutation ($input: MoveProjectCardInput!) {\n moveProjectCard(input: $input) {\n __typename\n }\n}\n",
1324
"variables": {

src/_tests/fixtures/58764/result.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
"Critical package",
55
"Edits Owners",
66
"Edits multiple packages",
7-
"Untested Change",
8-
"Where is GH Actions?"
7+
"Untested Change"
98
],
109
"responseComments": [
1110
{

src/comments.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ export const StalenessExplanations: { [k: string]: string } = {
151151

152152
// Comments to post for the staleness timeline (the tag is computed in `makeStaleness`)
153153
export const StalenessComment = (author: string, ownersToPing: string[], expires: string) => {
154-
if (author === "github-actions") return {};
155154
const ownerPing = ownersToPing.map(o => "@"+o).join(", ");
156155
return {
157156
// --Unmerged--

src/compute-pr-actions.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,10 @@ export function process(prInfo: BotResult,
274274
}
275275

276276
// Some step should override actions.projectColumn, the default "Other" indicates a problem
277+
if (info.author === "github-actions") {
278+
actions.projectColumn = "Needs Maintainer Action";
279+
return actions;
280+
}
277281

278282
// First-timers are blocked from CI runs until approved, this case is for infra edits (require a maintainer)
279283
if (info.ciResult === "action_required") {
@@ -335,15 +339,11 @@ export function process(prInfo: BotResult,
335339
// Has it: got no DT tests but is approved by DT modules and basically blocked by the DT maintainers - and it has been over 3 days?
336340
// Send a message reminding them that they can un-block themselves by adding tests.
337341
if (!info.hasTests && !info.hasMultiplePackages && info.approvedBy.includes("owner") && !info.editsInfra
338-
&& info.approverKind === "maintainer" && (info.staleness?.days ?? 0) > 3 && info.author !== "github-actions") {
342+
&& info.approverKind === "maintainer" && (info.staleness?.days ?? 0) > 3) {
339343
post(Comments.RemindPeopleTheyCanUnblockPR(info.author, info.approvedReviews.map(r => r.reviewer),
340344
info.ciResult === "pass", headCommitAbbrOid));
341345
}
342346

343-
if (info.author === "github-actions") {
344-
actions.projectColumn = "Needs Maintainer Action";
345-
}
346-
347347
// Timeline-related actions
348348
info.staleness?.doTimelineActions(actions);
349349

0 commit comments

Comments
 (0)