This repository was archived by the owner on Jul 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Switch `Action.labels` from an object to a list of labels Since there are now many labels, this makes the test files smaller, and also the labels are much easier to read. Also, the code is a bit simpler (modulo the `as const` thing). - Very minor caveat: the order of labels in the result is sometimes different now. - Very minor bonus: test 44402 has the only difference, which is due to a very minor fix. Previously, if the labels were `{X: true}`, then the `execute-pr-actions` code would only touch that. There's a bit in `compute-pr-actions` that returns `labels: ["Edits Infrastructure"]`, which previously made it add that label but leave all others, whereas now other (known) labels are removed. * In preparation for the timeline change: - Replace `stalenessInDays` with `lastActivityDate` (so staleness is computed later). - Remove unused `reopenedDate`, `lastCommentDate`. * Also: - Switch from the `ApprovalFlags` bitmap to a `ApproverKind[]` with a matching classification of each review. - Add `needsAuthorAction`. - Add a convenient `post` function to make comment-posting code more readable. - Add a `:passport_control:` to the reply for premature merge requests. - Reindent and refactor `execute-pr-actions` to make it more functional. - Slightly clearer definitions for `earliestDate`, `latestDate`. - Switch `import * as Comment` -> `comment`.
orta
reviewed
Nov 24, 2020
"lastPushDate": "2020-01-03T21:02:41.000Z", | ||
"reopenedDate": "2019-10-18T22:52:06.000Z", | ||
"lastCommentDate": "2020-05-12T15:13:19.000Z", | ||
"lastActivityDate": "2020-05-12T15:13:19.000Z", | ||
"maintainerBlessed": false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great
orta
reviewed
Nov 24, 2020
@@ -51,7 +51,7 @@ | |||
"variables": { | |||
"input": { | |||
"subjectId": "MDExOlB1bGxSZXF1ZXN0NTAwNjg4ODM0", | |||
"body": "Hi @mgol, I can't [accept a merge request](https://github.com/DefinitelyTyped/DefinitelyTyped#make-a-pull-request) until the PR has a green CI and was appropriately reviewed. I will let you know once that happens.\n\nThanks, and happy typing!\n<!--typescript_bot_wait-for-merge-offer-06d8d67-->" | |||
"body": ":passport_control: Hi @mgol,\n\nI can't [accept a merge request](https://github.com/DefinitelyTyped/DefinitelyTyped#make-a-pull-request) until the PR has a green CI and was appropriately reviewed. I will let you know once that happens.\n\nThanks, and happy typing!\n<!--typescript_bot_wait-for-merge-offer-06d8d67-->" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cute
orta
reviewed
Nov 24, 2020
return who === "maintainers" && blessed && !noOtherOwners ? "owners" | ||
: who === "owners" && noOtherOwners ? "maintainers" | ||
return who === "maintainer" && blessed && !noOtherOwners ? "owner" | ||
: who === "owner" && noOtherOwners ? "maintainer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call on the plural -> singular, feels better
orta
approved these changes
Nov 24, 2020
Nice wrk 👍 |
Thanks! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Switch
Action.labels
from an object to a list of labelsSince there are now many labels, this makes the test files smaller,
and also the labels are much easier to read. Also, the code is a bit
simpler (modulo the
as const
thing).Very minor caveat: the order of labels in the result is sometimes
different now.
Very minor bonus: test 44402 has the only difference, which is due
to a very minor fix. Previously, if the labels were
{X: true}
,then the
execute-pr-actions
code would only touch that. There's abit in
compute-pr-actions
that returnslabels: ["Edits Infrastructure"]
, which previously made it add that label but leaveall others, whereas now other (known) labels are removed.
In preparation for the timeline change:
Replace
stalenessInDays
withlastActivityDate
(so staleness iscomputed later).
Remove unused
reopenedDate
,lastCommentDate
.Also:
Switch from the
ApprovalFlags
bitmap to aApproverKind[]
with amatching classification of each review.
Add
needsAuthorAction
.Add a convenient
post
function to make comment-posting code morereadable.
Add a
:passport_control:
to the reply for premature mergerequests.
Reindent and refactor
execute-pr-actions
to make it more functional.Slightly clearer definitions for
earliestDate
,latestDate
.Switch
import * as Comment
->comment
.