feat(reviewersInTeams): using teams to add reviews#125
Open
itomtom wants to merge 1 commit intokentaro-m:masterfrom
Open
feat(reviewersInTeams): using teams to add reviews#125itomtom wants to merge 1 commit intokentaro-m:masterfrom
itomtom wants to merge 1 commit intokentaro-m:masterfrom
Conversation
Owner
|
Hi, @itomtom! Thanks for adding a new feature. I have reviewed it. This change needs the scope of https://github.com/kentaro-m/auto-assign/blob/master/app.yml#L105 members: readAlso, I have checked your changes in my local environment and failed unit tests. I think I need to update the new version of the Probot. diff --git a/package.json b/package.json
index 5cfa772..dd01781 100644
--- a/package.json
+++ b/package.json
@@ -39,7 +39,7 @@
"@types/lodash": "^4.14.119",
"@types/node": "^10.12.18",
"lodash": "^4.17.15",
- "probot": "^9.6.3",
+ "probot": "^9.11.3",
"typescript": "^3.7.2"
},
"devDependencies": {I have not done a detailed review yet, so I will continue to check it. |
* Using GitHub teams you can specify reviewers to be added to Pull Request * GitHub team's slug name is used under the label reviewersInTeams to extract the members in the team Fixes kentaro-m#123
a63a68d to
d7e792b
Compare
|
Is this PR stale? |
Author
|
I'm just waiting for further reviews as I made an update push on 21st April. |
Owner
|
Hi, @itomtom. Building these codes and running unit tests are failed in my environment (Node.js v12.18.3). ~/workspace/github.com/kentaro-m/auto-assign ttruong/feat/reviewersInTeams 19s
❯ npm run build
> auto-assign@1.0.0 build /Users/kentarom/workspace/github.com/kentaro-m/auto-assign
> tsc -p tsconfig.json
src/handler.ts:27:34 - error TS2339: Property 'listMembersInOrg' does not exist on type '{ addMember: { (params?: (RequestOptions & TeamsAddMemberParams) | undefined): Promise<Response<TeamsAddMemberResponse>>; endpoint: Endpoint; }; ... 32 more ...; updateDiscussionComment: { ...; }; }'.
27 await context.github.teams.listMembersInOrg({
~~~~~~~~~~~~~~~~
src/handler.ts:57:36 - error TS2339: Property 'listMembersLegacy' does not exist on type '{ addMember: { (params?: (RequestOptions & TeamsAddMemberParams) | undefined): Promise<Response<TeamsAddMemberResponse>>; endpoint: Endpoint; }; ... 32 more ...; updateDiscussionComment: { ...; }; }'.
57 await context.github.teams.listMembersLegacy({
~~~~~~~~~~~~~~~~~
Found 2 errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! auto-assign@1.0.0 build: `tsc -p tsconfig.json`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the auto-assign@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/kentarom/.npm/_logs/2020-08-14T16_09_27_437Z-debug.log
~/workspace/github.com/kentaro-m/auto-assign ttruong/feat/reviewersInTeams
❯ npm test
> auto-assign@1.0.0 test /Users/kentarom/workspace/github.com/kentaro-m/auto-assign
> jest
PASS test/util.test.ts
FAIL test/handler.test.ts
● Test suite failed to run
TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
test/handler.test.ts:943:50 - error TS2345: Argument of type '"listMembersLegacy"' is not assignable to parameter of type '"create" | "get" | "list" | "listForAuthenticatedUser" | "update" | "addMember" | "addOrUpdateMembership" | "addOrUpdateProject" | "addOrUpdateRepo" | "checkManagesRepo" | ... 23 more ... | "updateDiscussionComment"'.
943 const spy = jest.spyOn(context.github.teams, 'listMembersLegacy')
~~~~~~~~~~~~~~~~~~~
Test Suites: 1 failed, 1 passed, 2 total
Tests: 15 passed, 15 total
Snapshots: 0 total
Time: 2.387s, estimated 3s
Ran all test suites.
npm ERR! Test failed. See above for more details. |
Coxpools
approved these changes
Mar 6, 2022
| const addAssigneesSpy = jest.spyOn(context.github.issues, 'addAssignees') | ||
| const createReviewRequestSpy = jest.spyOn( | ||
| const addAssigneesSpy: any = jest.spyOn(context.github.issues, 'addAssignees') | ||
| const createReviewRequestSpy: any = jest.spyOn( |
| const spy = jest.spyOn(context.github.issues, 'addAssignees') | ||
| const spy: any = jest.spyOn(context.github.issues, 'addAssignees') | ||
|
|
||
| await handlePullRequest(context) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Request
extract the members in the team
Fixes #123