-
-
Notifications
You must be signed in to change notification settings - Fork 846
Augment "Schedule Monthly" open issues assigned to non-team members #8175
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
t-will-gillis
merged 12 commits into
hackforla:gh-pages
from
t-will-gillis:augment-schedule-monthly-8174
Jun 28, 2025
Merged
Changes from 9 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
967f5f3
initial commit
t-will-gillis 464918d
Addition of `nonTeamWIthOpen`
t-will-gillis 2b4cc18
separate Skills Issue list from inactiveWithOpenSkills
t-will-gillis 24bd67c
Split out inactiveSkillsIssue, ref to getOpenAssignedIssues
t-will-gillis eb067e3
Update get-open-assigned-issues.js
t-will-gillis 474cf5f
insert a missing semi-colon
t-will-gillis 38f1c92
add check for unique values inActiveMemberOpenIssue
t-will-gillis 2b05e40
Update trim-inactive-members.js, `removeInactiveMembers()`
t-will-gillis 1b2f179
Update trim-inactive-members.js
t-will-gillis 6f10f49
Update trim-inactive-members.js
t-will-gillis 6effe6f
Update get-contributors-data.js
t-will-gillis f5b4c7d
delete unused parameter cannotRemoveYet
t-will-gillis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| /** | ||
| * Function to get all repo issues that either are not assigned to a currentTeam member, or are assigned to | ||
| * inactive members so that leadership can be made aware that the issue does not have an active team member assigned. | ||
| * @param {Object} currentTeam - currentTeam members (optional) | ||
| * @param {Object} inactiveMemberOpenIssue - inactive team members assigned to an open issue (optional) | ||
| * @return {Object} nonTeamMemberOpenIssue - non-team members assigned to open issues | ||
| * @return {Object} inactiveMemberOpenIssue - inactive team members, all assignments to open issues | ||
| */ | ||
| async function getOpenAssignedIssues(github, context, currentTeam = {}, inactiveMemberOpenIssue = {}) { | ||
| let nonTeamMemberOpenIssue = {}; | ||
| let pageNum = 1; | ||
| let result = []; | ||
|
|
||
| // Since Github only allows to fetch max 100 items per request, we need to 'flip' pages | ||
| while (true) { | ||
| // Fetch 100 items per each page (`pageNum`) | ||
| // https://docs.github.com/en/rest/issues/issues?apiVersion=2022-11-28#list-repository-issues | ||
| const openIssues = await github.request('GET /repos/{owner}/{repo}/issues', { | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| assignee: '*', | ||
| per_page: 100, | ||
| page: pageNum | ||
| }); | ||
|
|
||
| // If the API call returns an empty array, break out of loop- there is no additional data. | ||
| // Else if data is returned, push it to `result` and increase the page number (`pageNum`) | ||
| if (!openIssues.data.length) { | ||
| break; | ||
| } else { | ||
| result = result.concat(openIssues.data); | ||
| pageNum++; | ||
| } | ||
| } | ||
|
|
||
| // Loop through each result individually | ||
| for (const contributorInfo of result) { | ||
| let assignee = contributorInfo.assignee.login; | ||
| let issueNum = contributorInfo.number; | ||
| // Check if assignee is not a currentTeam member, then find their other open issues | ||
| // Else if assignee is on the inactiveMember list, find all of their open issues | ||
| if (!(assignee in currentTeam)) { | ||
| (nonTeamMemberOpenIssue[assignee] ??= []).push(issueNum); | ||
| } else if (assignee in inactiveMemberOpenIssue && !inactiveMemberOpenIssue[assignee].includes(issueNum)) { | ||
| inactiveMemberOpenIssue[assignee].push(issueNum); | ||
| } | ||
| } | ||
|
|
||
| return [nonTeamMemberOpenIssue, inactiveMemberOpenIssue]; | ||
| } | ||
|
|
||
| module.exports = getOpenAssignedIssues; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.