website icon indicating copy to clipboard operation
website copied to clipboard

Add "context" variable to `check-team-membership.js` and remove obsolete comment

Open t-will-gillis opened this issue 7 months ago • 1 comments

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:
    - 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.  
    
    with:
    - 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.

t-will-gillis avatar Jun 23 '25 19:06 t-will-gillis

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 :)

HackforLABot avatar Jun 23 '25 19:06 HackforLABot

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 :)

HackforLABot avatar Aug 17 '25 21:08 HackforLABot

i. Availability: Monday ii. ETA: Monday

praytoo avatar Aug 17 '25 22:08 praytoo