Add "context" variable to `check-team-membership.js` and remove obsolete comment
Overview
We need to update check-team-membership.js so that it is consistent with the rest of the code, and we also need to remove obsolete comments in the same file.
Action Items
In check-team-membership.js,
- [ ] Add 'context' variable after 'github' in
isMemberOfTeam() - [ ] Change from
org: 'hackforla',to:org: context.repo.org, - [ ] Add
* @param {Object} context - context object from actions/github-script - [ ] Replace:
with:- Need read:org permission to use this function, the least permissive token which contains this is the TEAMS token. Lack of permission will result in a 403 error.- Need read:org permission to use this function. Lack of permission will result in a 403 error.
In verify-pr.js,
- [ ] Change from current to:
const isMember = await isMemberOfTeam(github, context, prAuthor, 'website-write');
In issue-trigger.yml,
-
[ ] In Step "Check Team Membership", change from current to:
return script(github, context, username, team) -
[ ] Test "issue trigger" and "verify pr" to demonstrate that the function works as intended.
Resources/Instructions
REPLACE THIS TEXT - Provide links to resources or instructions that may help with this issue. This can include files to be worked on, external sites with solutions, documentation, etc.
Hi @t-will-gillis, thank you for taking up this issue! Hfla appreciates you :)
Do let fellow developers know about your:- i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?) ii. ETA: (When do you expect this issue to be completed?)
You're awesome!
P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)
Hi @praytoo, thank you for taking up this issue! Hfla appreciates you :)
Do let fellow developers know about your:- i. Availability: (When are you available to work on the issue/answer questions other programmers might have about your issue?) ii. ETA: (When do you expect this issue to be completed?)
You're awesome!
P.S. - You may not take up another issue until this issue gets merged (or closed). Thanks again :)
i. Availability: Monday ii. ETA: Monday