Skip to content
Open
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
b2830e2
Update activity-trigger.yml line 25
xnealcarson Oct 3, 2025
e458fc4
Add files via upload
xnealcarson Oct 11, 2025
7217292
Update post-to-skills-issue.js
xnealcarson Oct 11, 2025
1ac174c
Update post-to-skills-issue.js
xnealcarson Oct 11, 2025
7dbcad2
Add files via upload
xnealcarson Oct 11, 2025
0c0a75f
Rename skillsIssueNums-8-22.json to skills-directory.json
xnealcarson Oct 11, 2025
02cbaf3
Update post-to-skills-issue.js
xnealcarson Oct 11, 2025
b1b2957
Created skills-directory.js
xnealcarson Oct 11, 2025
397308f
Merge branch 'hackforla:gh-pages' into TEST-for-skillsactivity-GHA
xnealcarson Oct 12, 2025
0e57320
Update activity-trigger.yml: changed line 25 back to original state
xnealcarson Oct 13, 2025
23c0730
Update post-to-skills-issue.js changed lines of code edited for testi…
xnealcarson Oct 13, 2025
37aa0fe
Merge branch 'hackforla:gh-pages' into enhance-gha-skillsactivity-8316
xnealcarson Oct 18, 2025
ba56356
Update post-to-skills-issue.js line 55
xnealcarson Oct 18, 2025
ba6a687
Deleted github-actions/utils/_data/skillsIssueNums-8-22.csv
xnealcarson Oct 18, 2025
459b847
Update post-to-skills-issue.js to reflect ryanfkeller's requested cha…
xnealcarson Oct 26, 2025
38f2c6a
Merge branch 'hackforla:gh-pages' into enhance-gha-skillsactivity-8316
xnealcarson Nov 2, 2025
e4174a7
Update skills-directory.json to reflect latest skills directory updat…
xnealcarson Nov 2, 2025
104fb5c
Update post-to-skills-issue.js lines 54-58 to reflect third requested…
xnealcarson Nov 2, 2025
77ed1a1
Merge branch 'hackforla:gh-pages' into enhance-gha-skillsactivity-8316
xnealcarson Nov 11, 2025
2716d2b
Merge branch 'hackforla:gh-pages' into enhance-gha-skillsactivity-8316
xnealcarson Nov 14, 2025
d16a0a8
Update skills-directory.js updated lookupSkillsDirectory and updateSk…
xnealcarson Nov 14, 2025
5e1f55f
Merge branch 'hackforla:gh-pages' into enhance-gha-skillsactivity-8316
xnealcarson Nov 22, 2025
9e6524d
Merge branch 'hackforla:gh-pages' into enhance-gha-skillsactivity-8316
xnealcarson Nov 24, 2025
33924db
Update skills-directory.js
xnealcarson Nov 24, 2025
7383d6c
Update post-to-skills-issue.js
xnealcarson Nov 24, 2025
a57eac9
Merge branch 'hackforla:gh-pages' into enhance-gha-skillsactivity-8316
xnealcarson Dec 6, 2025
0814cd4
Update activity-trigger.yml line 25 for testing changes made to PR #8370
xnealcarson Dec 6, 2025
d5450d5
Update post-to-skills-issue.js
xnealcarson Dec 6, 2025
9e5a8be
Update post-to-skills-issue.js
xnealcarson Dec 6, 2025
fcfdafc
Merge branch 'hackforla:gh-pages' into enhance-gha-skillsactivity-8316
xnealcarson Dec 9, 2025
58074a5
Update post-to-skills-issue.js
xnealcarson Dec 10, 2025
4ba5279
Update post-to-skills-issue.js
xnealcarson Dec 12, 2025
b74bae2
Merge branch 'hackforla:gh-pages' into enhance-gha-skillsactivity-8316
xnealcarson Dec 12, 2025
fa4e10b
Update post-to-skills-issue.js
xnealcarson Dec 12, 2025
0b632cd
Update skills-directory.js
xnealcarson Dec 12, 2025
d094b96
Merge branch 'hackforla:gh-pages' into enhance-gha-skillsactivity-8316
xnealcarson Dec 16, 2025
c3d296d
Update post-to-skills-issue.js: fixed syntax error for (!skillsInfo) …
xnealcarson Dec 16, 2025
0780650
Update post-to-skills-issue.js: syntax error fix
xnealcarson Dec 16, 2025
ee0d837
Update skills-directory.js: syntax fix for `updateSkillsDirectory` fu…
xnealcarson Dec 16, 2025
7e4702e
Merge branch 'hackforla:gh-pages' into enhance-gha-skillsactivity-8316
xnealcarson Feb 1, 2026
06a89ec
Update skills-directory.json
xnealcarson Feb 1, 2026
3e2e6df
Update activity-trigger.yml
xnealcarson Feb 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 24 additions & 7 deletions github-actions/activity-trigger/post-to-skills-issue.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
const checkTeamMembership = require('../utils/check-team-membership');
const statusFieldIds = require('../utils/_data/status-field-ids');
const mutateIssueStatus = require('../utils/mutate-issue-status');
const { lookupSkillsDirectory, updateSkillsDirectory } = require('../utils/skills-directory');

// `complexity0` refers `Complexity: Prework` label
const SKILLS_LABEL = retrieveLabelDirectory("complexity0");
Expand Down Expand Up @@ -33,13 +34,29 @@
console.log(`eventActor is undefined (likely a bot). Cannot post message...`);
return;
}

// Step 1: Try local directory lookup first
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick but would be nice to have this indent on this comment match the code block

let skillsInfo = lookupSkillsDirectory(eventActor);

if (!skillsInfo) {
console.log(`No cached Skills Issue found for ${eventActor}, querying GitHub...`);

// Step 2: Fallback to GitHub API
skillsInfo = await querySkillsIssue(github, context, eventActor, SKILLS_LABEL);

// Step 3: Save result to local directory if found
if (skillsInfo && skillsInfo.issueNum) {
updateSkillsDirectory(eventActor, skillsInfo);
}
}


// Get eventActor's Skills Issue number, nodeId, current statusId (all null if no Skills Issue found)
const skillsInfo = await querySkillsIssue(github, context, eventActor, SKILLS_LABEL);
const skillsIssueNum = skillsInfo.issueNum;
const skillsIssueNodeId = skillsInfo.issueId;
const skillsStatusId = skillsInfo.statusId;
const isArchived = skillsInfo.isArchived;
const skillsInfo = await querySkillsIssue(github, context, eventActor, SKILLS_LABEL);
const skillsIssueNum = skillsInfo.issueNum;
const skillsIssueNodeId = skillsInfo.issueId;
const skillsStatusId = skillsInfo.statusId;
const isArchived = skillsInfo.isArchived;

// Return immediately if Skills Issue not found
if (!skillsIssueNum) {
Expand Down Expand Up @@ -97,7 +114,7 @@
if (!(message.includes('closed') || message.includes('assigned') || isArchived)) {

// If eventActor is team member, open issue and move to "In progress"
const isActiveMember = await checkTeamMembership(github, context, eventActor, TEAM);
const isActiveMember = await checkTeamMembership(github, context, eventActor, TEAM);

if (isActiveMember) {
try {
Expand All @@ -121,4 +138,4 @@

}

module.exports = postToSkillsIssue;
module.exports = postToSkillsIssue;
Loading
Loading