Skip to content

Conversation

@praytoo
Copy link
Member

@praytoo praytoo commented Aug 18, 2025

Fixes #8201

What changes did you make?

  • Added context parameter to check-team-membership.js
  • Replaced hardcoded org with context.repo.owner
  • Removed obsolete comment
  • Updated verify-pr.js and issue-trigger.yml
  • The issue mentioned updating post-to-skills-issue.js, but that file no longer exists in the repo. I searched the repo and updated all existing calls to checkTeamMembership and isMemberOfTeam to use the new context parameter.

Why did you make the changes (we will use this info to test)?

  • I made these changes to refactor the check-team-membership.js utility so that it no longer uses a hardcoded org (hackforla). Instead, it now uses context.repo.owner, which makes the code more flexible and accurate across different repos.
  • I also updated all calls to isMemberOfTeam and checkTeamMembership to include the new context parameter, ensuring consistency and avoiding errors.
  • The issue also mentioned post-to-skills-issue.js, but that file no longer exists in the repo. I verified by searching the codebase, and I updated all other existing calls instead.

CodeQL Alerts

After the PR has been submitted and the resulting GitHub actions/checks have been completed, developers should check the PR for CodeQL alert annotations.

Check the PR's comments. If present on your PR, the CodeQL alert looks similar as shown

Screenshot 2024-10-28 154514

Please let us know that you have checked for CodeQL alerts. Please do not dismiss alerts.

  • I have checked this PR for CodeQL alerts and none were found.
  • I found CodeQL alert(s), and (select one):
    • I have resolved the CodeQL alert(s) as noted
    • I believe the CodeQL alert(s) is a false positive (Merge Team will evaluate)
    • I have followed the Instructions below, but I am still stuck (Merge Team will evaluate)
Instructions for resolving CodeQL alerts

If CodeQL alert/annotations appear, refer to How to Resolve CodeQL alerts.

In general, CodeQL alerts should be resolved prior to PR reviews and merging

Screenshots of Proposed Changes To The Website (if any, please do not include screenshots of code changes)

No visual changes to the website

@github-actions
Copy link

Want to review this pull request? Take a look at this documentation for a step by step guide!


From your project repository, check out a new branch and test the changes.

git checkout -b praytoo-add-context-to-check-team-membership gh-pages
git pull https://github.com/praytoo/website.git add-context-to-check-team-membership

@github-actions github-actions bot added role: back end/devOps Tasks for back-end developers Complexity: Medium Feature: Refactor GHA Refactoring GitHub actions to fit latest architectural norms size: 3pt Can be done in 13-18 hours labels Aug 18, 2025
@DDVVPP DDVVPP self-requested a review August 21, 2025 00:03
@DDVVPP
Copy link
Member

DDVVPP commented Aug 21, 2025

Review ETA: 6PM 08/22/25
Availability: 9AM-6PM M-F

@DDVVPP
Copy link
Member

DDVVPP commented Aug 21, 2025

  • The PR is done with the correct branch
  • There is a linked issue
  • The PR title accurately describes the issue
  • Clear and through PR description

Thanks @praytoo ! A couple of comments:

  • For some reason I don't see any of your changes in your branch or in this PR... have you pushed up all of your changes?
  • It would be really nice to see the action items in the issue checked off so that it's clear that these items have been completed!

Thank you!

@praytoo
Copy link
Member Author

praytoo commented Aug 21, 2025

@DDVVPP hello thank you for your feedback i've gone ahead and checked off the action items on the list like you suggested...and can you see if the changes are showing up on your end now? i believe i updated the pr to reflect the changes. thanks again!

@caz002 caz002 self-requested a review August 22, 2025 14:18
@caz002
Copy link
Member

caz002 commented Aug 22, 2025

Review ETA: 08/22/25
Availability: After 7PM on Weekdays

Copy link
Member

@caz002 caz002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your hard work on this issue @praytoo ! I have some changes to request, but afterwards I can approve your issue.

Things Done Well

  • PR description accurately describes changes and why they were made
  • Code does not trigger any QL alerts

Changes to Make

  • I agree with DDVVPP in that I can't seem to see all the changes that you made. Only check-team-member.js is showing up in the "Files changed" tab on the pull request. Do you mind double checking again if you pushed all of your changes for verify-pr.js and issue-trigger.yml?
  • In check-team-membership.js, I noticed you removed some of the lines and parameters in the commented block in the beginning. I think the instructions in the issue are to only modify/add the requested lines and leave the rest as-is.
  • In check-team-membership.js, I think part of line 5 may have been accidentally deleted, and should be "Need read:org permission to use this function. Lack of permission will result in a 403 error."

@github-project-automation github-project-automation bot moved this from PR Needs review to PRs being reviewed in P: HfLA Website: Project Board Aug 22, 2025
@DDVVPP
Copy link
Member

DDVVPP commented Aug 23, 2025

Hi @praytoo!
Following up on my previous comment, and agreeing with caz002, that some items seem to have perhaps been accidentally deleted in check-team-member.js, and the requested changes in the issue from the 4th checkbox onwards seem to be missing. Happy to approve once these updates have been made! Thank you!

@praytoo praytoo requested a review from caz002 August 24, 2025 19:38
Copy link
Member

@t-will-gillis t-will-gillis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @praytoo This looks great! The branches are correct, you are linked to the original issue, you are describing what was done and why, you checked for CodeQL alerts, and you note that there are no visual changes. The context object is added to the files currently using check-team-membership.js and you made the edits requested by the issue.

One change is needed, and this isn't something you missed- it is because I misled you when I wrote the original issue.

  • In the file check-team-membership.js, please replace the line for "org" and use instead:
    org: context.repo.owner,
    

I realized that context.repo.org would cause an error because the context.repo object only has an owner property, so org would cause an error. The replacement should work. My bad.

Except for the change, I tested this in my repo and the workflows appear to be working correctly. Thanks for working on this!

@praytoo praytoo requested a review from t-will-gillis August 25, 2025 14:06
@praytoo
Copy link
Member Author

praytoo commented Aug 25, 2025

hello @caz002 @DDVVPP @t-will-gillis thank you all for your valuable feedback i've gone ahead and applied all of those corrections and requested a re-review.

Copy link
Member

@caz002 caz002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making all of the changes @praytoo ! The pull request correctly modifies the files requested, and the description clearly describes the changes made. I approve this pull request.

Copy link
Member

@DDVVPP DDVVPP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for all the changes @praytoo !
I'm approving these changes, but I do have one more question about a change in the check-team-membership.js file. The items in lines 7, 10, and 12 are missing the dashes, and I'm just curious about why those were elimated!
Thanks again!

Copy link
Member

@t-will-gillis t-will-gillis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @praytoo Thank you for making the change- everything looks great!

I am Approving also, and I will merge this.

@DDVVPP I saw your note about the comments and removing the '-'. I can go either way about the dashes, however, I am also thinking that the comments after * @param {String} team ... are extraneous, and using JSDoc there should only be a simple, concise description of the function as the first line (before * @param {octokit} ...
@praytoo @DDVVPP @caz002, any thoughts about this? If needed, we can catch this in a new issue.

@github-project-automation github-project-automation bot moved this from PRs being reviewed to PRs ✅ waiting for merge team in P: HfLA Website: Project Board Aug 27, 2025
@t-will-gillis t-will-gillis merged commit d11a995 into hackforla:gh-pages Aug 27, 2025
7 checks passed
@praytoo
Copy link
Member Author

praytoo commented Aug 27, 2025

I deleted the extraneous lines before but was corrected by @caz002 to keep those in about the "-" I didn't think it mattered because the "*" were there to bullet point the lines anyway @DDVVPP lmk what you think @t-will-gillis thanks everyone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complexity: Medium Feature: Refactor GHA Refactoring GitHub actions to fit latest architectural norms role: back end/devOps Tasks for back-end developers size: 3pt Can be done in 13-18 hours

Projects

Development

Successfully merging this pull request may close these issues.

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

4 participants