Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Enhanced Skills Activity GHA to use Skills Directory#8370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
xnealcarson wants to merge18 commits intohackforla:gh-pages
base:gh-pages
Choose a base branch
Loading
fromxnealcarson:enhance-gha-skillsactivity-8316

Conversation

@xnealcarson
Copy link
Member

@xnealcarsonxnealcarson commentedOct 13, 2025
edited
Loading

Fixes#8316

What changes did you make?

  • added most recentskillsIssueNums.csv to thegithub-actions/utils/_data folder, and converted the directory to JSON format (skills-directory.json).
  • Created a new module inutils that looks up in the directory and return the information (skills-directory.js).
  • added import module topost-to-skills.js for the skills directory
  • Refactored code inpost-to-skills-issue.js to search the newly added skills directory before deferring to thequerySkillsIssue() GitHub API, if necessary, upon which new info found usingquerySkillsIssue() will be saved to the skills directory
  • Tested changes by creating fake skills issue on my repo's project board (Skills Issue: Developer: Xavier Neal-Carson (Test) xnealcarson/website#17) and then creating subsequent test issue to ensure proper function of Skills Activity tracking (Test Issue for Refactored Skills Activity GHA xnealcarson/website#18)

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

  • We needed to reduce the number of unnecessary GitHub API calls that the "Member Activity Trigger" workflow makes when posting to a user's Skills Issue by providing a user directory. New info found

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 toHow 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

NOTE TO REVIEWERS

If you would like to test these changes for yourself:

  • Make sure yourHACKFORLA_GRAPHQL_TOKEN is active
    • Change the default branch of your repo to a test branch
    • Change line inactivity.trigger.yml to refer to your own repo.
    • Add a Skills Issue in your name to your project and assign it to yourself. Take note of the issue number and add it below.
    • The automation uses GraphQL queries to locate each user's Skills Issue and the bot comment. HfLA's project, status, and field ids are hard-coded in the filegithub-actions/utils/_data/status-field-ids.js, so you will need to tell the bot the number of your repo's Skills Issue by making the following edits:
      • Inpost-to-skills-issue.js, change:
                const isActiveMember = await checkTeamMembership(github, context, eventActor, TEAM);
        to:
                // const isActiveMember = await checkTeamMembership(github, context, eventActor, TEAM);        const isActiveMember = true;
      • Change lines 39-44 inpost-to-skills-issue.js to:
          // Get eventActor's Skills Issue number, nodeId, current statusId (all null if no Skills Issue found)  // const skillsInfo = await querySkillsIssue(github, context, username, SKILLS_LABEL); const skillsIssueNum = _the number of the skills issue you created_ ;   const skillsIssueNodeId = null; const skillsStatusId = null; const isArchived = false;

@github-actions
Copy link

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


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

git checkout -b xnealcarson-enhance-gha-skillsactivity-8316 gh-pagesgit pull https://github.com/xnealcarson/website.git enhance-gha-skillsactivity-8316

@github-actionsgithub-actionsbot added role: back end/devOpsTasks for back-end developers Complexity: Large Feature: Refactor GHARefactoring GitHub actions to fit latest architectural norms size: 8ptCan be done in 31-48 hours Lang: GHAGitHub Actions Skill: enhance labelsOct 13, 2025
@ryanfkeller
Copy link
Member

Hi@xnealcarson, I'll give this a review as well! ETA 10/17, generally able to be available 1-5p weekdays.

@ryanfkeller
Copy link
Member

ryanfkeller commentedOct 15, 2025
edited by xnealcarson
Loading

Hey@xnealcarson, thanks for taking this issue! It looks like you're on the right track, and also great job on the PR description -- it made it easy to understand what you've done here.

I noticed a couple things in my review:

  • Inpost-to-skills.js, I think you have some old code on line 55 that creates a syntax error on trying to re-define skillsInfo (and if it ran would result in an unneeded re-query for the skills issue). That line can probably just be deleted. Nitpick but the extra indentation on the following lines could probably also be removed.
  • Inpost-to-skills.js, I can see that we are using a query to search for the "activity comment" even when we got the issue number from the local JSON. Since I believe the JSON includes the comment ID under the "id" category, you should be able to just read/patch that comment directly and skip the search if there is a JSON entry. The query/search you have should definitely still be a fallback for when you don't have the issue info saved locally.
  • Since we do save the "activity comment" id in theskills-directory.json, we'll want to make sure to update that JSON with the ID when we have to create a new "activity comment".
  • We may not want to save theskillsIssueNums-*.csv in the_data directory, since it isn't used directly and with this flow in action, I expect the .json should be the source of truth.
  • (Edited, I missed some things in your description in my original comment, sorry!) Instead of changing thepost-to-skills-issue.js to bypass isActiveMember and skillsInfo collection, would it be possible to instead modify our local copy of the_data sources so the full script flow is tested? We probably also want the test case of the skills issue not existing in_data as well so the query is executed. If you have examples of that, could you share the workflow run link?

Again, really nice work! Looking forward to seeing the next rev 🚀

Copy link
Member

@ryanfkellerryanfkeller left a comment

Choose a reason for hiding this comment

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

Looking good, but a few things I think need attention! See my comment above.

@github-project-automationgithub-project-automationbot moved this fromPR Needs review toPRs being reviewed inP: HfLA Website: Project BoardOct 15, 2025
@t-will-gillis
Copy link
Member

Hey@xnealcarson Great work on this so far!!! Thanks for being patient.

I am still looking through things but have a couple comments:

  • I uploaded a new fileskillsIssueNums-10-19.csv that might be easier to work with than the previous one. It has what should be the correct nodeId for each issue number, and the commentId is clearer now.
  • I was looking at theupdate-directory.js file- I don't think it is pulling up the info correctly, maybe use .filter sim to this:
    const result = directory.filter(entry => entry.username === eventActor); andreturn result ?
  • Since the .csv won't provide theskillsStatusId orisArchived info, and since thequerySkillsIssue() won't find a comment id, adding in some default values like this will be helpful later on:
    const skillsIssueNum = skillsInfo.issueNum; const skillsIssueNodeId = skillsInfo.issueId; const skillsStatusId = skillsInfo?.statusId || 'unknown'; const isArchived = skillsInfo?.isArchived || false; const commentFoundId = skillsInfo?.commentId || null;   // not used currently console.log(`skillsIssueNum: ${skillsIssueNum}, skillsIssueNodeId: ${skillsIssueNodeId}, skillsStatusId: ${skillsStatusId}, isArchived: ${isArchived}`);  // only for debugging
    This should (I believe) let the code run after line 116 +/-
  • This code above defines thecommentFoundId - which is thecomment_id where the bot is adding it's comments.
  • A warning however: when I was first looking at this ER I assumed that the comment id was all we needed to know to update the comment, but I am thinking now that this does not help us a lot because even though we have thecomment_id we need to retrieve thebody of the comment before we canPATCH it. That is not at all helpful to you I know. If you and/or Ryan have ideas..?

Otherwise, I'm still looking at this but hopefully these comments and@ryanfkeller 's are helpful! Great job again!

@DDVVPP
Copy link
Member

Hi@xnealcarson! Just checking in on the status of the PR. It looks like you made some recent changes - just a reminder to click on the 'Re-request review' icon next to the reviewers name (on the top right panel) if it's ready for review.


constskillsStatusId=skillsInfo?.statusId||'unknown';
constisArchived=skillsInfo?.isArchived||false;
constcommentFoundId=skillsInfo?.commentId||null;// not used currently

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused variable commentFoundId.
@xnealcarson
Copy link
MemberAuthor

Thanks for the check-in@DDVVPP. I just picked up last night where I left off, after getting a bit sidetracked this past week. I really let time get ahead of me.

I'm about wrapped up with requested changes, save for a couple things, so I am not quite ready to send out those re-requests. I will check in again with another status update (hopefully the last!) tomorrow after 3pm PST. So sorry for the delay and thank your for your patience@ryanfkeller and@t-will-gillis.

@xnealcarson
Copy link
MemberAuthor

Ran into some issues working on the last of each of your requested changes, which I Slack'd@t-will-gillis about. He aims to assist me with those tomorrow, so I will give another follow-up then once I've received his feedback!

@t-will-gillis
Copy link
Member

Hey@xnealcarson Thanks and sorry for mixing up the function names. As I mentioned in Slack, the file I meant isutils/skills-directory.js and the function islookupSkillsDirectory(). What I was meaning to say is that from what I can tell, returndirectory[eventActor] is returning a null and that you would need to lookup the directory info a different way- usingfind() (I said.filter() but find is more appropriate).

I threw manyconsole.log() s into the function to show what is happening:

functionlookupSkillsDirectory(eventActor){constdirectory=loadDirectory();console.log(``);console.log(`At lookupSkillsDirectory() in skills-directory.js :`);console.log(`eventActor:${eventActor}`);console.log(`directory[eventActor]:${directory[eventActor]}`);console.log(``);constresult=directory.find(entry=>entry.eventActor===eventActor);if(result){console.log(`result:${JSON.stringify(result)}`);console.log(`result["issueNum"]:${result["issueNum"]}`);// just to verify}console.log(``);console.log(`return 'result' rather than 'directory[eventActor]`);console.log(``);// return directory[eventActor] || null;returnresult||null;

If you sub these temporary log messages in, I thinkresult is what you are looking for, and something similar would also be true forupdateSkillsDirectory().

Thanks again for sticking with this!

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

Reviewers

@ryanfkellerryanfkellerryanfkeller requested changes

@t-will-gillist-will-gillisAwaiting requested review from t-will-gillis

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Labels

Complexity: LargeFeature: Refactor GHARefactoring GitHub actions to fit latest architectural normsLang: GHAGitHub Actionsrole: back end/devOpsTasks for back-end developerssize: 8ptCan be done in 31-48 hoursSkill: enhance

Projects

Status: PRs being reviewed

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Enhance GHA: "Skills Activity" use Skills Issue directory

4 participants

@xnealcarson@ryanfkeller@t-will-gillis@DDVVPP

[8]ページ先頭

©2009-2025 Movatter.jp