-
-
Notifications
You must be signed in to change notification settings - Fork 850
Open
Labels
Complexity: LargeFeature: Refactor GHARefactoring GitHub actions to fit latest architectural normsRefactoring GitHub actions to fit latest architectural normsLang: GHAGitHub ActionsGitHub ActionsSkill: enhancerole: back end/devOpsTasks for back-end developersTasks for back-end developerssize: 8ptCan be done in 31-48 hoursCan be done in 31-48 hours
Description
Overview
We need 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.
Action Items
- Locate the most recent skillsIssueNums.csv file on the Google Drive. Note that it lists each member's GitHub handle, Skills Issue number, Node Id (used with GraphQL), id used with (REST API) and other info.
- Now review
github-actions/activity-trigger/post-to-skills-issue.js. Note that the workflow uses a GraphQLquerySkillsIssue()to search for a user's (i.e.eventActor) Skills Issue, and then REST API callsgithub.request('GET...)and(PATCH...)to search for the "Activity History" comment, and then update it with the new info. - Instead, we need the workflow to first search the previously mentioned file to retrieve the user's Skills Issue number and the id that will be used for patching, and if these are found- skip the other queries.
- If not found, the workflow should perform the searches and save this information to the file.
There are many ways this could be done, but however this is done the functions should follow the same architecture HfLA is already using. Some suggestions: - Save the Skills Issue directory to the
github-actions/utils/_datafolder, and convert the directory to a JSON. - Create a new module in
utilsthat will lookup in the directory and return the information. - Might want to pull the previously mentioned searches out of
post-to-skills-issue.jsand into a module that also will update the directory when needed.
Resources/Instructions
- GitHub GraphQL Explorer
- GitHub GraphQL API
- Refer to The "Hack for LA's GitHub Actions" Wiki guide needs additional explanation #6537 (comment), especially Tips 6, 7, and 8, if you have not already created you personal environment for testing.
- How to Test GitHub Actions
- Additional Notes for GitHub Actions
Metadata
Metadata
Assignees
Labels
Complexity: LargeFeature: Refactor GHARefactoring GitHub actions to fit latest architectural normsRefactoring GitHub actions to fit latest architectural normsLang: GHAGitHub ActionsGitHub ActionsSkill: enhancerole: back end/devOpsTasks for back-end developersTasks for back-end developerssize: 8ptCan be done in 31-48 hoursCan be done in 31-48 hours
Type
Projects
Status
In progress (actively working)