From 6266a5f882d10327a844abd6feeb4a16cc01d7e9 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Fri, 19 Apr 2024 20:00:00 -0700 Subject: [PATCH 01/62] fix broken image in CONTRIBUTING.md file (#6582) --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0a28b1f656..c9b159fdca 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -643,7 +643,7 @@ You can also sync your fork directly on GitHub by clicking "Sync Fork" at the ri
Click here to see how to sync the fork on GitHub - +
From 9fe8e0e3a09e3f06317e7a173cb16dd92b637dee Mon Sep 17 00:00:00 2001 From: ajb176 Date: Fri, 31 May 2024 00:41:04 +0530 Subject: [PATCH 02/62] Add Instructions --- .github/workflows/pr-instructions.yml | 41 ++ _data/external/github-data.json | 651 ++++++++++++++------------ _projects/ems-triage-tracker.md | 1 + _projects/food-oasis.md | 1 + pages/sitemap.html | 2 +- 5 files changed, 394 insertions(+), 302 deletions(-) diff --git a/.github/workflows/pr-instructions.yml b/.github/workflows/pr-instructions.yml index 15a585de64..78a4d4b55c 100644 --- a/.github/workflows/pr-instructions.yml +++ b/.github/workflows/pr-instructions.yml @@ -5,6 +5,8 @@ on: branches: - 'gh-pages' - 'feature-homepage-launch' + #Uncomment the next line for testing: + #- 'verify-pr-author-3906' jobs: Add-Pull-Request-Instructions: @@ -34,3 +36,42 @@ jobs: with: name: adding-pr-instructions-artifact path: addingPrInstructions/artifact/ + + #Instructions for testing the Check-Team-Membership action: + #1) Delete the '#' on line 9 to uncomment the testing branch + #2) Replace the token on line 51 with a user-generated token (Instructions will be linked in PR) + #3) Change the owner assignment on lines 65 and 71 from 'hackforla' to your own github handle. + #4) For testing the success condition: Test the action excluding step #5 + #5) For testing the fail condition: Change the username assignment from 'prAuthor' in line 56 to a random string that doesn't accidentally spell out the handle of someone on the website-write team + Check-Team-Membership: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v7 + with: + github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} + script: | + const prAuthor = context.payload.sender.login; + const prNumber = context.payload.number; + try { + const getMembershipStatus = await github.rest.teams.getMembershipForUserInOrg({ + org: 'hackforla', + team_slug: 'website-write', + username: prAuthor + }); + console.log('Successfully verified!') + } catch (verificationError) { + if (verificationError.status==404) { + await github.request('PATCH /repos/{owner}/{repo}/pulls/{pull_number}', { + owner : 'hackforla', + repo : 'website', + pull_number : prNumber, + state : 'closed' + }); + await github.request('POST /repos/{owner}/{repo}/issues/{issue_number}/comments', { + owner : 'hackforla', + repo : 'website', + issue_number : prNumber, + body : 'You must be a member of the HFLA website team in order to create pull requests. Please see our page on how to join us as a member at HFLA: https://www.hackforla.org/getting-started. If you have been though onboarding, and feel this message in error, please message us in the #hfla-site team slack channel with the link to this PR.' + }); + } + } \ No newline at end of file diff --git a/_data/external/github-data.json b/_data/external/github-data.json index d065f18e89..08617c74db 100644 --- a/_data/external/github-data.json +++ b/_data/external/github-data.json @@ -1,5 +1,5 @@ [ - "Tue May 28 2024 11:04:56 GMT+0000 (Coordinated Universal Time)", + "Wed May 29 2024 11:05:16 GMT+0000 (Coordinated Universal Time)", { "id": 76137532, "name": "webapp", @@ -1764,7 +1764,7 @@ "github_url": "https://github.com/HackforLABot", "avatar_url": "https://avatars.githubusercontent.com/u/64623632?v=4", "gravatar_id": "", - "contributions": 2500 + "contributions": 2501 }, { "id": 37763229, @@ -1935,30 +1935,30 @@ "contributions": 15 }, { - "id": 67438372, - "github_url": "https://github.com/erikaBell", - "avatar_url": "https://avatars.githubusercontent.com/u/67438372?v=4", + "id": 79426767, + "github_url": "https://github.com/IsaacDesigns", + "avatar_url": "https://avatars.githubusercontent.com/u/79426767?v=4", "gravatar_id": "", "contributions": 12 }, { - "id": 55627107, - "github_url": "https://github.com/Sihemgourou", - "avatar_url": "https://avatars.githubusercontent.com/u/55627107?v=4", + "id": 5314153, + "github_url": "https://github.com/roslynwythe", + "avatar_url": "https://avatars.githubusercontent.com/u/5314153?v=4", "gravatar_id": "", "contributions": 12 }, { - "id": 5314153, - "github_url": "https://github.com/roslynwythe", - "avatar_url": "https://avatars.githubusercontent.com/u/5314153?v=4", + "id": 55627107, + "github_url": "https://github.com/Sihemgourou", + "avatar_url": "https://avatars.githubusercontent.com/u/55627107?v=4", "gravatar_id": "", "contributions": 12 }, { - "id": 79426767, - "github_url": "https://github.com/IsaacDesigns", - "avatar_url": "https://avatars.githubusercontent.com/u/79426767?v=4", + "id": 67438372, + "github_url": "https://github.com/erikaBell", + "avatar_url": "https://avatars.githubusercontent.com/u/67438372?v=4", "gravatar_id": "", "contributions": 12 }, @@ -2012,9 +2012,9 @@ "contributions": 9 }, { - "id": 62186905, - "github_url": "https://github.com/blakes24", - "avatar_url": "https://avatars.githubusercontent.com/u/62186905?v=4", + "id": 26785124, + "github_url": "https://github.com/stu562", + "avatar_url": "https://avatars.githubusercontent.com/u/26785124?v=4", "gravatar_id": "", "contributions": 9 }, @@ -2026,23 +2026,23 @@ "contributions": 9 }, { - "id": 26785124, - "github_url": "https://github.com/stu562", - "avatar_url": "https://avatars.githubusercontent.com/u/26785124?v=4", + "id": 62186905, + "github_url": "https://github.com/blakes24", + "avatar_url": "https://avatars.githubusercontent.com/u/62186905?v=4", "gravatar_id": "", "contributions": 9 }, { - "id": 89806097, - "github_url": "https://github.com/lindseyindev", - "avatar_url": "https://avatars.githubusercontent.com/u/89806097?v=4", + "id": 66761308, + "github_url": "https://github.com/arpitapandya", + "avatar_url": "https://avatars.githubusercontent.com/u/66761308?v=4", "gravatar_id": "", "contributions": 8 }, { - "id": 42159475, - "github_url": "https://github.com/danyc23", - "avatar_url": "https://avatars.githubusercontent.com/u/42159475?v=4", + "id": 42260999, + "github_url": "https://github.com/kevinreber", + "avatar_url": "https://avatars.githubusercontent.com/u/42260999?v=4", "gravatar_id": "", "contributions": 8 }, @@ -2054,51 +2054,51 @@ "contributions": 8 }, { - "id": 42260999, - "github_url": "https://github.com/kevinreber", - "avatar_url": "https://avatars.githubusercontent.com/u/42260999?v=4", + "id": 42159475, + "github_url": "https://github.com/danyc23", + "avatar_url": "https://avatars.githubusercontent.com/u/42159475?v=4", "gravatar_id": "", "contributions": 8 }, { - "id": 66761308, - "github_url": "https://github.com/arpitapandya", - "avatar_url": "https://avatars.githubusercontent.com/u/66761308?v=4", + "id": 89806097, + "github_url": "https://github.com/lindseyindev", + "avatar_url": "https://avatars.githubusercontent.com/u/89806097?v=4", "gravatar_id": "", "contributions": 8 }, { - "id": 76148970, - "github_url": "https://github.com/Zhu-Joseph", - "avatar_url": "https://avatars.githubusercontent.com/u/76148970?v=4", + "id": 67162265, + "github_url": "https://github.com/blulady", + "avatar_url": "https://avatars.githubusercontent.com/u/67162265?v=4", "gravatar_id": "", "contributions": 7 }, { - "id": 40401149, - "github_url": "https://github.com/arghmatey", - "avatar_url": "https://avatars.githubusercontent.com/u/40401149?v=4", + "id": 73561520, + "github_url": "https://github.com/MattPereira", + "avatar_url": "https://avatars.githubusercontent.com/u/73561520?v=4", "gravatar_id": "", "contributions": 7 }, { - "id": 119828225, - "github_url": "https://github.com/sornekian", - "avatar_url": "https://avatars.githubusercontent.com/u/119828225?v=4", + "id": 122488603, + "github_url": "https://github.com/Thinking-Panda", + "avatar_url": "https://avatars.githubusercontent.com/u/122488603?v=4", "gravatar_id": "", "contributions": 7 }, { - "id": 122488603, - "github_url": "https://github.com/Thinking-Panda", - "avatar_url": "https://avatars.githubusercontent.com/u/122488603?v=4", + "id": 119828225, + "github_url": "https://github.com/sornekian", + "avatar_url": "https://avatars.githubusercontent.com/u/119828225?v=4", "gravatar_id": "", "contributions": 7 }, { - "id": 93944737, - "github_url": "https://github.com/jch1013", - "avatar_url": "https://avatars.githubusercontent.com/u/93944737?v=4", + "id": 83096266, + "github_url": "https://github.com/bphan002", + "avatar_url": "https://avatars.githubusercontent.com/u/83096266?v=4", "gravatar_id": "", "contributions": 7 }, @@ -2110,51 +2110,51 @@ "contributions": 7 }, { - "id": 83096266, - "github_url": "https://github.com/bphan002", - "avatar_url": "https://avatars.githubusercontent.com/u/83096266?v=4", + "id": 76270077, + "github_url": "https://github.com/JackCasica", + "avatar_url": "https://avatars.githubusercontent.com/u/76270077?v=4", "gravatar_id": "", "contributions": 7 }, { - "id": 67162265, - "github_url": "https://github.com/blulady", - "avatar_url": "https://avatars.githubusercontent.com/u/67162265?v=4", + "id": 93944737, + "github_url": "https://github.com/jch1013", + "avatar_url": "https://avatars.githubusercontent.com/u/93944737?v=4", "gravatar_id": "", "contributions": 7 }, { - "id": 73561520, - "github_url": "https://github.com/MattPereira", - "avatar_url": "https://avatars.githubusercontent.com/u/73561520?v=4", + "id": 76148970, + "github_url": "https://github.com/Zhu-Joseph", + "avatar_url": "https://avatars.githubusercontent.com/u/76148970?v=4", "gravatar_id": "", "contributions": 7 }, { - "id": 15069166, - "github_url": "https://github.com/aadilahmed", - "avatar_url": "https://avatars.githubusercontent.com/u/15069166?v=4", + "id": 40401149, + "github_url": "https://github.com/arghmatey", + "avatar_url": "https://avatars.githubusercontent.com/u/40401149?v=4", "gravatar_id": "", - "contributions": 6 + "contributions": 7 }, { - "id": 99565771, - "github_url": "https://github.com/aidanwsimmons", - "avatar_url": "https://avatars.githubusercontent.com/u/99565771?v=4", + "id": 4952258, + "github_url": "https://github.com/jphamtv", + "avatar_url": "https://avatars.githubusercontent.com/u/4952258?v=4", "gravatar_id": "", "contributions": 6 }, { - "id": 9537526, - "github_url": "https://github.com/angelenelm", - "avatar_url": "https://avatars.githubusercontent.com/u/9537526?v=4", + "id": 9373317, + "github_url": "https://github.com/glenflorendo", + "avatar_url": "https://avatars.githubusercontent.com/u/9373317?v=4", "gravatar_id": "", "contributions": 6 }, { - "id": 26665132, - "github_url": "https://github.com/awlFCCamp", - "avatar_url": "https://avatars.githubusercontent.com/u/26665132?v=4", + "id": 49097867, + "github_url": "https://github.com/robertnjenga", + "avatar_url": "https://avatars.githubusercontent.com/u/49097867?v=4", "gravatar_id": "", "contributions": 6 }, @@ -2166,58 +2166,58 @@ "contributions": 6 }, { - "id": 49097867, - "github_url": "https://github.com/robertnjenga", - "avatar_url": "https://avatars.githubusercontent.com/u/49097867?v=4", + "id": 26665132, + "github_url": "https://github.com/awlFCCamp", + "avatar_url": "https://avatars.githubusercontent.com/u/26665132?v=4", "gravatar_id": "", "contributions": 6 }, { - "id": 9373317, - "github_url": "https://github.com/glenflorendo", - "avatar_url": "https://avatars.githubusercontent.com/u/9373317?v=4", + "id": 9537526, + "github_url": "https://github.com/angelenelm", + "avatar_url": "https://avatars.githubusercontent.com/u/9537526?v=4", "gravatar_id": "", "contributions": 6 }, { - "id": 4952258, - "github_url": "https://github.com/jphamtv", - "avatar_url": "https://avatars.githubusercontent.com/u/4952258?v=4", + "id": 99565771, + "github_url": "https://github.com/aidanwsimmons", + "avatar_url": "https://avatars.githubusercontent.com/u/99565771?v=4", "gravatar_id": "", "contributions": 6 }, { - "id": 73868258, - "github_url": "https://github.com/agosmou", - "avatar_url": "https://avatars.githubusercontent.com/u/73868258?v=4", + "id": 75542938, + "github_url": "https://github.com/sydneywalcoff", + "avatar_url": "https://avatars.githubusercontent.com/u/75542938?v=4", "gravatar_id": "", "contributions": 6 }, { - "id": 28831668, - "github_url": "https://github.com/aalieu", - "avatar_url": "https://avatars.githubusercontent.com/u/28831668?v=4", + "id": 25173636, + "github_url": "https://github.com/nelsonuprety1", + "avatar_url": "https://avatars.githubusercontent.com/u/25173636?v=4", "gravatar_id": "", "contributions": 6 }, { - "id": 85038929, - "github_url": "https://github.com/Carlos-A-P", - "avatar_url": "https://avatars.githubusercontent.com/u/85038929?v=4", + "id": 78521256, + "github_url": "https://github.com/luisitocanlas", + "avatar_url": "https://avatars.githubusercontent.com/u/78521256?v=4", "gravatar_id": "", "contributions": 6 }, { - "id": 78108711, - "github_url": "https://github.com/sanchece", - "avatar_url": "https://avatars.githubusercontent.com/u/78108711?v=4", + "id": 38971729, + "github_url": "https://github.com/KazushiR", + "avatar_url": "https://avatars.githubusercontent.com/u/38971729?v=4", "gravatar_id": "", "contributions": 6 }, { - "id": 61027932, - "github_url": "https://github.com/christinaor", - "avatar_url": "https://avatars.githubusercontent.com/u/61027932?v=4", + "id": 54752231, + "github_url": "https://github.com/hannahlivnat", + "avatar_url": "https://avatars.githubusercontent.com/u/54752231?v=4", "gravatar_id": "", "contributions": 6 }, @@ -2229,44 +2229,44 @@ "contributions": 6 }, { - "id": 54752231, - "github_url": "https://github.com/hannahlivnat", - "avatar_url": "https://avatars.githubusercontent.com/u/54752231?v=4", + "id": 61027932, + "github_url": "https://github.com/christinaor", + "avatar_url": "https://avatars.githubusercontent.com/u/61027932?v=4", "gravatar_id": "", "contributions": 6 }, { - "id": 75542938, - "github_url": "https://github.com/sydneywalcoff", - "avatar_url": "https://avatars.githubusercontent.com/u/75542938?v=4", + "id": 15069166, + "github_url": "https://github.com/aadilahmed", + "avatar_url": "https://avatars.githubusercontent.com/u/15069166?v=4", "gravatar_id": "", "contributions": 6 }, { - "id": 76270077, - "github_url": "https://github.com/JackCasica", - "avatar_url": "https://avatars.githubusercontent.com/u/76270077?v=4", + "id": 78108711, + "github_url": "https://github.com/sanchece", + "avatar_url": "https://avatars.githubusercontent.com/u/78108711?v=4", "gravatar_id": "", "contributions": 6 }, { - "id": 38971729, - "github_url": "https://github.com/KazushiR", - "avatar_url": "https://avatars.githubusercontent.com/u/38971729?v=4", + "id": 85038929, + "github_url": "https://github.com/Carlos-A-P", + "avatar_url": "https://avatars.githubusercontent.com/u/85038929?v=4", "gravatar_id": "", "contributions": 6 }, { - "id": 78521256, - "github_url": "https://github.com/luisitocanlas", - "avatar_url": "https://avatars.githubusercontent.com/u/78521256?v=4", + "id": 28831668, + "github_url": "https://github.com/aalieu", + "avatar_url": "https://avatars.githubusercontent.com/u/28831668?v=4", "gravatar_id": "", "contributions": 6 }, { - "id": 25173636, - "github_url": "https://github.com/nelsonuprety1", - "avatar_url": "https://avatars.githubusercontent.com/u/25173636?v=4", + "id": 73868258, + "github_url": "https://github.com/agosmou", + "avatar_url": "https://avatars.githubusercontent.com/u/73868258?v=4", "gravatar_id": "", "contributions": 6 }, @@ -4925,7 +4925,7 @@ "github_url": "https://github.com/apps/github-actions", "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", "gravatar_id": "", - "contributions": 14453 + "contributions": 14466 }, { "id": 37763229, @@ -4939,14 +4939,14 @@ "github_url": "https://github.com/JessicaLucindaCheng", "avatar_url": "https://avatars.githubusercontent.com/u/31293603?v=4", "gravatar_id": "", - "contributions": 2841 + "contributions": 2844 }, { "id": 5314153, "github_url": "https://github.com/roslynwythe", "avatar_url": "https://avatars.githubusercontent.com/u/5314153?v=4", "gravatar_id": "", - "contributions": 1751 + "contributions": 1754 }, { "id": 843538, @@ -4960,7 +4960,7 @@ "github_url": "https://github.com/t-will-gillis", "avatar_url": "https://avatars.githubusercontent.com/u/40799239?v=4", "gravatar_id": "", - "contributions": 748 + "contributions": 750 }, { "id": 88953806, @@ -5100,7 +5100,7 @@ "github_url": "https://github.com/Thinking-Panda", "avatar_url": "https://avatars.githubusercontent.com/u/122488603?v=4", "gravatar_id": "", - "contributions": 144 + "contributions": 147 }, { "id": 76500899, @@ -5597,7 +5597,7 @@ "github_url": "https://github.com/pdimaano", "avatar_url": "https://avatars.githubusercontent.com/u/80801555?v=4", "gravatar_id": "", - "contributions": 42 + "contributions": 43 }, { "id": 100561599, @@ -7881,6 +7881,13 @@ "gravatar_id": "", "contributions": 8 }, + { + "id": 85697744, + "github_url": "https://github.com/vanessasinam", + "avatar_url": "https://avatars.githubusercontent.com/u/85697744?v=4", + "gravatar_id": "", + "contributions": 8 + }, { "id": 91310284, "github_url": "https://github.com/nitin-pandita", @@ -7951,6 +7958,13 @@ "gravatar_id": "", "contributions": 8 }, + { + "id": 5141427, + "github_url": "https://github.com/jchue", + "avatar_url": "https://avatars.githubusercontent.com/u/5141427?v=4", + "gravatar_id": "", + "contributions": 7 + }, { "id": 5412677, "github_url": "https://github.com/benrempel", @@ -8182,13 +8196,6 @@ "gravatar_id": "", "contributions": 6 }, - { - "id": 5141427, - "github_url": "https://github.com/jchue", - "avatar_url": "https://avatars.githubusercontent.com/u/5141427?v=4", - "gravatar_id": "", - "contributions": 6 - }, { "id": 8877530, "github_url": "https://github.com/brandonjturner", @@ -8329,13 +8336,6 @@ "gravatar_id": "", "contributions": 6 }, - { - "id": 85697744, - "github_url": "https://github.com/vanessasinam", - "avatar_url": "https://avatars.githubusercontent.com/u/85697744?v=4", - "gravatar_id": "", - "contributions": 6 - }, { "id": 86503503, "github_url": "https://github.com/JasonUranta", @@ -9267,6 +9267,13 @@ "gravatar_id": "", "contributions": 3 }, + { + "id": 102435078, + "github_url": "https://github.com/terrencejihoonjung", + "avatar_url": "https://avatars.githubusercontent.com/u/102435078?v=4", + "gravatar_id": "", + "contributions": 3 + }, { "id": 103794936, "github_url": "https://github.com/Hsan2022", @@ -9813,13 +9820,6 @@ "gravatar_id": "", "contributions": 2 }, - { - "id": 102435078, - "github_url": "https://github.com/terrencejihoonjung", - "avatar_url": "https://avatars.githubusercontent.com/u/102435078?v=4", - "gravatar_id": "", - "contributions": 2 - }, { "id": 104569186, "github_url": "https://github.com/SuyashOP-2", @@ -9841,6 +9841,13 @@ "gravatar_id": "", "contributions": 2 }, + { + "id": 109082527, + "github_url": "https://github.com/andyphancode", + "avatar_url": "https://avatars.githubusercontent.com/u/109082527?v=4", + "gravatar_id": "", + "contributions": 2 + }, { "id": 109938379, "github_url": "https://github.com/anilstha1", @@ -10912,6 +10919,13 @@ "gravatar_id": "", "contributions": 1 }, + { + "id": 135405041, + "github_url": "https://github.com/aidenjlee4321", + "avatar_url": "https://avatars.githubusercontent.com/u/135405041?v=4", + "gravatar_id": "", + "contributions": 1 + }, { "id": 137220240, "github_url": "https://github.com/amandaputney", @@ -10932,6 +10946,13 @@ "avatar_url": "https://avatars.githubusercontent.com/u/158859383?v=4", "gravatar_id": "", "contributions": 1 + }, + { + "id": 168019558, + "github_url": "https://github.com/harith-aaron", + "avatar_url": "https://avatars.githubusercontent.com/u/168019558?v=4", + "gravatar_id": "", + "contributions": 1 } ] }, @@ -10942,7 +10963,7 @@ "github_url": "https://github.com/apps/github-actions", "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", "gravatar_id": "", - "contributions": 14453 + "contributions": 14466 }, { "id": 37763229, @@ -10956,21 +10977,21 @@ "github_url": "https://github.com/JessicaLucindaCheng", "avatar_url": "https://avatars.githubusercontent.com/u/31293603?v=4", "gravatar_id": "", - "contributions": 2919 + "contributions": 2922 }, { "id": 64623632, "github_url": "https://github.com/HackforLABot", "avatar_url": "https://avatars.githubusercontent.com/u/64623632?v=4", "gravatar_id": "", - "contributions": 2514 + "contributions": 2515 }, { "id": 5314153, "github_url": "https://github.com/roslynwythe", "avatar_url": "https://avatars.githubusercontent.com/u/5314153?v=4", "gravatar_id": "", - "contributions": 1763 + "contributions": 1766 }, { "id": 843538, @@ -10984,7 +11005,7 @@ "github_url": "https://github.com/t-will-gillis", "avatar_url": "https://avatars.githubusercontent.com/u/40799239?v=4", "gravatar_id": "", - "contributions": 790 + "contributions": 792 }, { "id": 88953806, @@ -11119,6 +11140,13 @@ "gravatar_id": "", "contributions": 170 }, + { + "id": 122488603, + "github_url": "https://github.com/Thinking-Panda", + "avatar_url": "https://avatars.githubusercontent.com/u/122488603?v=4", + "gravatar_id": "", + "contributions": 154 + }, { "id": 81400670, "github_url": "https://github.com/mademarc", @@ -11126,13 +11154,6 @@ "gravatar_id": "", "contributions": 153 }, - { - "id": 122488603, - "github_url": "https://github.com/Thinking-Panda", - "avatar_url": "https://avatars.githubusercontent.com/u/122488603?v=4", - "gravatar_id": "", - "contributions": 151 - }, { "id": 76500899, "github_url": "https://github.com/gaylem", @@ -11609,6 +11630,13 @@ "gravatar_id": "", "contributions": 49 }, + { + "id": 80801555, + "github_url": "https://github.com/pdimaano", + "avatar_url": "https://avatars.githubusercontent.com/u/80801555?v=4", + "gravatar_id": "", + "contributions": 48 + }, { "id": 49097867, "github_url": "https://github.com/robertnjenga", @@ -11630,13 +11658,6 @@ "gravatar_id": "", "contributions": 47 }, - { - "id": 80801555, - "github_url": "https://github.com/pdimaano", - "avatar_url": "https://avatars.githubusercontent.com/u/80801555?v=4", - "gravatar_id": "", - "contributions": 47 - }, { "id": 106561238, "github_url": "https://github.com/KyleA99", @@ -11721,6 +11742,13 @@ "gravatar_id": "", "contributions": 43 }, + { + "id": 76270077, + "github_url": "https://github.com/JackCasica", + "avatar_url": "https://avatars.githubusercontent.com/u/76270077?v=4", + "gravatar_id": "", + "contributions": 43 + }, { "id": 92761207, "github_url": "https://github.com/gstemmann", @@ -11742,13 +11770,6 @@ "gravatar_id": "", "contributions": 43 }, - { - "id": 76270077, - "github_url": "https://github.com/JackCasica", - "avatar_url": "https://avatars.githubusercontent.com/u/76270077?v=4", - "gravatar_id": "", - "contributions": 42 - }, { "id": 100561599, "github_url": "https://github.com/phuonguvan", @@ -14059,6 +14080,13 @@ "gravatar_id": "", "contributions": 8 }, + { + "id": 5141427, + "github_url": "https://github.com/jchue", + "avatar_url": "https://avatars.githubusercontent.com/u/5141427?v=4", + "gravatar_id": "", + "contributions": 8 + }, { "id": 10263119, "github_url": "https://github.com/DonaldBrower", @@ -14192,6 +14220,13 @@ "gravatar_id": "", "contributions": 8 }, + { + "id": 85697744, + "github_url": "https://github.com/vanessasinam", + "avatar_url": "https://avatars.githubusercontent.com/u/85697744?v=4", + "gravatar_id": "", + "contributions": 8 + }, { "id": 91310284, "github_url": "https://github.com/nitin-pandita", @@ -14262,13 +14297,6 @@ "gravatar_id": "", "contributions": 7 }, - { - "id": 5141427, - "github_url": "https://github.com/jchue", - "avatar_url": "https://avatars.githubusercontent.com/u/5141427?v=4", - "gravatar_id": "", - "contributions": 7 - }, { "id": 5606931, "github_url": "https://github.com/eselkin", @@ -14633,13 +14661,6 @@ "gravatar_id": "", "contributions": 6 }, - { - "id": 85697744, - "github_url": "https://github.com/vanessasinam", - "avatar_url": "https://avatars.githubusercontent.com/u/85697744?v=4", - "gravatar_id": "", - "contributions": 6 - }, { "id": 88693627, "github_url": "https://github.com/kevindphan", @@ -15417,6 +15438,13 @@ "gravatar_id": "", "contributions": 3 }, + { + "id": 102435078, + "github_url": "https://github.com/terrencejihoonjung", + "avatar_url": "https://avatars.githubusercontent.com/u/102435078?v=4", + "gravatar_id": "", + "contributions": 3 + }, { "id": 103794936, "github_url": "https://github.com/Hsan2022", @@ -15900,13 +15928,6 @@ "gravatar_id": "", "contributions": 2 }, - { - "id": 102435078, - "github_url": "https://github.com/terrencejihoonjung", - "avatar_url": "https://avatars.githubusercontent.com/u/102435078?v=4", - "gravatar_id": "", - "contributions": 2 - }, { "id": 104569186, "github_url": "https://github.com/SuyashOP-2", @@ -15935,6 +15956,13 @@ "gravatar_id": "", "contributions": 2 }, + { + "id": 109082527, + "github_url": "https://github.com/andyphancode", + "avatar_url": "https://avatars.githubusercontent.com/u/109082527?v=4", + "gravatar_id": "", + "contributions": 2 + }, { "id": 109938379, "github_url": "https://github.com/anilstha1", @@ -16082,6 +16110,13 @@ "gravatar_id": "", "contributions": 2 }, + { + "id": 135405041, + "github_url": "https://github.com/aidenjlee4321", + "avatar_url": "https://avatars.githubusercontent.com/u/135405041?v=4", + "gravatar_id": "", + "contributions": 2 + }, { "id": 140572118, "github_url": "https://github.com/annaseulgi", @@ -16978,13 +17013,6 @@ "gravatar_id": "", "contributions": 1 }, - { - "id": 135405041, - "github_url": "https://github.com/aidenjlee4321", - "avatar_url": "https://avatars.githubusercontent.com/u/135405041?v=4", - "gravatar_id": "", - "contributions": 1 - }, { "id": 137220240, "github_url": "https://github.com/amandaputney", @@ -17005,6 +17033,13 @@ "avatar_url": "https://avatars.githubusercontent.com/u/158859383?v=4", "gravatar_id": "", "contributions": 1 + }, + { + "id": 168019558, + "github_url": "https://github.com/harith-aaron", + "avatar_url": "https://avatars.githubusercontent.com/u/168019558?v=4", + "gravatar_id": "", + "contributions": 1 } ] } @@ -20435,7 +20470,7 @@ "github_url": "https://github.com/ryanfchase", "avatar_url": "https://avatars.githubusercontent.com/u/6414668?v=4", "gravatar_id": "", - "contributions": 310 + "contributions": 321 }, { "id": 20729686, @@ -20472,6 +20507,13 @@ "gravatar_id": "", "contributions": 135 }, + { + "id": 143574036, + "github_url": "https://github.com/bberhane", + "avatar_url": "https://avatars.githubusercontent.com/u/143574036?v=4", + "gravatar_id": "", + "contributions": 134 + }, { "id": 1448719, "github_url": "https://github.com/edwinjue", @@ -20479,13 +20521,6 @@ "gravatar_id": "", "contributions": 129 }, - { - "id": 143574036, - "github_url": "https://github.com/bberhane", - "avatar_url": "https://avatars.githubusercontent.com/u/143574036?v=4", - "gravatar_id": "", - "contributions": 126 - }, { "id": 10199792, "github_url": "https://github.com/mattyweb", @@ -21237,7 +21272,7 @@ "github_url": "https://github.com/ryanfchase", "avatar_url": "https://avatars.githubusercontent.com/u/6414668?v=4", "gravatar_id": "", - "contributions": 328 + "contributions": 339 }, { "id": 6537426, @@ -21274,6 +21309,13 @@ "gravatar_id": "", "contributions": 162 }, + { + "id": 143574036, + "github_url": "https://github.com/bberhane", + "avatar_url": "https://avatars.githubusercontent.com/u/143574036?v=4", + "gravatar_id": "", + "contributions": 136 + }, { "id": 41898282, "github_url": "https://github.com/apps/github-actions", @@ -21281,13 +21323,6 @@ "gravatar_id": "", "contributions": 135 }, - { - "id": 143574036, - "github_url": "https://github.com/bberhane", - "avatar_url": "https://avatars.githubusercontent.com/u/143574036?v=4", - "gravatar_id": "", - "contributions": 128 - }, { "id": 20999589, "github_url": "https://github.com/johnr54321", @@ -22369,14 +22404,14 @@ "github_url": "https://github.com/Biuwa", "avatar_url": "https://avatars.githubusercontent.com/u/98936028?v=4", "gravatar_id": "", - "contributions": 569 + "contributions": 570 }, { "id": 37763229, "github_url": "https://github.com/ExperimentsInHonesty", "avatar_url": "https://avatars.githubusercontent.com/u/37763229?v=4", "gravatar_id": "", - "contributions": 525 + "contributions": 527 }, { "id": 49739276, @@ -22474,7 +22509,7 @@ "github_url": "https://github.com/Parisajf", "avatar_url": "https://avatars.githubusercontent.com/u/134427433?v=4", "gravatar_id": "", - "contributions": 53 + "contributions": 55 }, { "id": 69442669, @@ -22537,7 +22572,7 @@ "github_url": "https://github.com/yiranshan", "avatar_url": "https://avatars.githubusercontent.com/u/79798670?v=4", "gravatar_id": "", - "contributions": 25 + "contributions": 27 }, { "id": 53444509, @@ -22728,6 +22763,13 @@ "gravatar_id": "", "contributions": 7 }, + { + "id": 156871712, + "github_url": "https://github.com/marlenamellody", + "avatar_url": "https://avatars.githubusercontent.com/u/156871712?v=4", + "gravatar_id": "", + "contributions": 7 + }, { "id": 27145, "github_url": "https://github.com/joelparkerhenderson", @@ -22749,13 +22791,6 @@ "gravatar_id": "", "contributions": 6 }, - { - "id": 156871712, - "github_url": "https://github.com/marlenamellody", - "avatar_url": "https://avatars.githubusercontent.com/u/156871712?v=4", - "gravatar_id": "", - "contributions": 6 - }, { "id": 156873530, "github_url": "https://github.com/hanselnoriega", @@ -22959,6 +22994,13 @@ "gravatar_id": "", "contributions": 1 }, + { + "id": 17112345, + "github_url": "https://github.com/1x1rohaun", + "avatar_url": "https://avatars.githubusercontent.com/u/17112345?v=4", + "gravatar_id": "", + "contributions": 1 + }, { "id": 25173636, "github_url": "https://github.com/nelsonuprety1", @@ -23101,14 +23143,14 @@ "github_url": "https://github.com/Biuwa", "avatar_url": "https://avatars.githubusercontent.com/u/98936028?v=4", "gravatar_id": "", - "contributions": 569 + "contributions": 570 }, { "id": 37763229, "github_url": "https://github.com/ExperimentsInHonesty", "avatar_url": "https://avatars.githubusercontent.com/u/37763229?v=4", "gravatar_id": "", - "contributions": 538 + "contributions": 540 }, { "id": 1160105, @@ -23194,6 +23236,13 @@ "gravatar_id": "", "contributions": 59 }, + { + "id": 134427433, + "github_url": "https://github.com/Parisajf", + "avatar_url": "https://avatars.githubusercontent.com/u/134427433?v=4", + "gravatar_id": "", + "contributions": 59 + }, { "id": 20568596, "github_url": "https://github.com/seenaiype", @@ -23208,13 +23257,6 @@ "gravatar_id": "", "contributions": 57 }, - { - "id": 134427433, - "github_url": "https://github.com/Parisajf", - "avatar_url": "https://avatars.githubusercontent.com/u/134427433?v=4", - "gravatar_id": "", - "contributions": 57 - }, { "id": 31966100, "github_url": "https://github.com/Dsomers74", @@ -23325,7 +23367,7 @@ "github_url": "https://github.com/yiranshan", "avatar_url": "https://avatars.githubusercontent.com/u/79798670?v=4", "gravatar_id": "", - "contributions": 25 + "contributions": 27 }, { "id": 70343417, @@ -23502,6 +23544,13 @@ "gravatar_id": "", "contributions": 7 }, + { + "id": 156871712, + "github_url": "https://github.com/marlenamellody", + "avatar_url": "https://avatars.githubusercontent.com/u/156871712?v=4", + "gravatar_id": "", + "contributions": 7 + }, { "id": 27145, "github_url": "https://github.com/joelparkerhenderson", @@ -23516,13 +23565,6 @@ "gravatar_id": "", "contributions": 6 }, - { - "id": 156871712, - "github_url": "https://github.com/marlenamellody", - "avatar_url": "https://avatars.githubusercontent.com/u/156871712?v=4", - "gravatar_id": "", - "contributions": 6 - }, { "id": 156873530, "github_url": "https://github.com/hanselnoriega", @@ -23733,6 +23775,13 @@ "gravatar_id": "", "contributions": 1 }, + { + "id": 17112345, + "github_url": "https://github.com/1x1rohaun", + "avatar_url": "https://avatars.githubusercontent.com/u/17112345?v=4", + "gravatar_id": "", + "contributions": 1 + }, { "id": 32349001, "github_url": "https://github.com/akibrhast", @@ -27905,7 +27954,7 @@ "github_url": "https://github.com/apps/github-actions", "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", "gravatar_id": "", - "contributions": 228 + "contributions": 229 }, { "id": 57149590, @@ -27940,7 +27989,7 @@ "github_url": "https://github.com/sylvia-nam", "avatar_url": "https://avatars.githubusercontent.com/u/156871663?v=4", "gravatar_id": "", - "contributions": 104 + "contributions": 105 }, { "id": 46510558, @@ -28532,7 +28581,7 @@ "github_url": "https://github.com/apps/github-actions", "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", "gravatar_id": "", - "contributions": 228 + "contributions": 229 }, { "id": 57149590, @@ -28569,18 +28618,18 @@ "gravatar_id": "", "contributions": 142 }, - { - "id": 21321101, - "github_url": "https://github.com/davidwiese", - "avatar_url": "https://avatars.githubusercontent.com/u/21321101?v=4", - "gravatar_id": "", - "contributions": 104 - }, { "id": 156871663, "github_url": "https://github.com/sylvia-nam", "avatar_url": "https://avatars.githubusercontent.com/u/156871663?v=4", "gravatar_id": "", + "contributions": 105 + }, + { + "id": 21321101, + "github_url": "https://github.com/davidwiese", + "avatar_url": "https://avatars.githubusercontent.com/u/21321101?v=4", + "gravatar_id": "", "contributions": 104 }, { @@ -32962,7 +33011,7 @@ "github_url": "https://github.com/ExperimentsInHonesty", "avatar_url": "https://avatars.githubusercontent.com/u/37763229?v=4", "gravatar_id": "", - "contributions": 98 + "contributions": 100 }, { "id": 4141567, @@ -32990,7 +33039,7 @@ "github_url": "https://github.com/tylerthome", "avatar_url": "https://avatars.githubusercontent.com/u/9952154?v=4", "gravatar_id": "", - "contributions": 66 + "contributions": 79 }, { "id": 117793131, @@ -33097,6 +33146,13 @@ "gravatar_id": "", "contributions": 12 }, + { + "id": 56012982, + "github_url": "https://github.com/lasryariel", + "avatar_url": "https://avatars.githubusercontent.com/u/56012982?v=4", + "gravatar_id": "", + "contributions": 11 + }, { "id": 96758319, "github_url": "https://github.com/abiha1234", @@ -33139,13 +33195,6 @@ "gravatar_id": "", "contributions": 9 }, - { - "id": 56012982, - "github_url": "https://github.com/lasryariel", - "avatar_url": "https://avatars.githubusercontent.com/u/56012982?v=4", - "gravatar_id": "", - "contributions": 9 - }, { "id": 102125731, "github_url": "https://github.com/rpradheap", @@ -33421,7 +33470,7 @@ "github_url": "https://github.com/tylerthome", "avatar_url": "https://avatars.githubusercontent.com/u/9952154?v=4", "gravatar_id": "", - "contributions": 231 + "contributions": 244 }, { "id": 22138019, @@ -33477,7 +33526,7 @@ "github_url": "https://github.com/ExperimentsInHonesty", "avatar_url": "https://avatars.githubusercontent.com/u/37763229?v=4", "gravatar_id": "", - "contributions": 106 + "contributions": 108 }, { "id": 117793131, @@ -33640,6 +33689,13 @@ "gravatar_id": "", "contributions": 13 }, + { + "id": 56012982, + "github_url": "https://github.com/lasryariel", + "avatar_url": "https://avatars.githubusercontent.com/u/56012982?v=4", + "gravatar_id": "", + "contributions": 11 + }, { "id": 96758319, "github_url": "https://github.com/abiha1234", @@ -33661,13 +33717,6 @@ "gravatar_id": "", "contributions": 9 }, - { - "id": 56012982, - "github_url": "https://github.com/lasryariel", - "avatar_url": "https://avatars.githubusercontent.com/u/56012982?v=4", - "gravatar_id": "", - "contributions": 9 - }, { "id": 102125731, "github_url": "https://github.com/rpradheap", @@ -43412,7 +43461,7 @@ "github_url": "https://github.com/kcoronel", "avatar_url": "https://avatars.githubusercontent.com/u/38144130?v=4", "gravatar_id": "", - "contributions": 430 + "contributions": 436 }, { "id": 62368440, @@ -43580,7 +43629,7 @@ "github_url": "https://github.com/bennyv8", "avatar_url": "https://avatars.githubusercontent.com/u/62785232?v=4", "gravatar_id": "", - "contributions": 6 + "contributions": 7 }, { "id": 64109227, @@ -43736,6 +43785,13 @@ "gravatar_id": "", "contributions": 2 }, + { + "id": 148927139, + "github_url": "https://github.com/CarmenMM1", + "avatar_url": "https://avatars.githubusercontent.com/u/148927139?v=4", + "gravatar_id": "", + "contributions": 2 + }, { "id": 154822442, "github_url": "https://github.com/brendasdesign", @@ -43861,13 +43917,6 @@ "avatar_url": "https://avatars.githubusercontent.com/u/140571127?v=4", "gravatar_id": "", "contributions": 1 - }, - { - "id": 148927139, - "github_url": "https://github.com/CarmenMM1", - "avatar_url": "https://avatars.githubusercontent.com/u/148927139?v=4", - "gravatar_id": "", - "contributions": 1 } ] }, @@ -43885,7 +43934,7 @@ "github_url": "https://github.com/kcoronel", "avatar_url": "https://avatars.githubusercontent.com/u/38144130?v=4", "gravatar_id": "", - "contributions": 437 + "contributions": 443 }, { "id": 7094304, @@ -44046,7 +44095,7 @@ "github_url": "https://github.com/bennyv8", "avatar_url": "https://avatars.githubusercontent.com/u/62785232?v=4", "gravatar_id": "", - "contributions": 10 + "contributions": 11 }, { "id": 49699333, @@ -44223,6 +44272,13 @@ "gravatar_id": "", "contributions": 2 }, + { + "id": 148927139, + "github_url": "https://github.com/CarmenMM1", + "avatar_url": "https://avatars.githubusercontent.com/u/148927139?v=4", + "gravatar_id": "", + "contributions": 2 + }, { "id": 154822442, "github_url": "https://github.com/brendasdesign", @@ -44334,13 +44390,6 @@ "avatar_url": "https://avatars.githubusercontent.com/u/140571127?v=4", "gravatar_id": "", "contributions": 1 - }, - { - "id": 148927139, - "github_url": "https://github.com/CarmenMM1", - "avatar_url": "https://avatars.githubusercontent.com/u/148927139?v=4", - "gravatar_id": "", - "contributions": 1 } ] } @@ -46374,7 +46423,7 @@ "github_url": "https://github.com/pandanista", "avatar_url": "https://avatars.githubusercontent.com/u/57029070?v=4", "gravatar_id": "", - "contributions": 8 + "contributions": 9 }, { "id": 65616818, @@ -46434,14 +46483,14 @@ "github_url": "https://github.com/ExperimentsInHonesty", "avatar_url": "https://avatars.githubusercontent.com/u/37763229?v=4", "gravatar_id": "", - "contributions": 838 + "contributions": 839 }, { "id": 57029070, "github_url": "https://github.com/pandanista", "avatar_url": "https://avatars.githubusercontent.com/u/57029070?v=4", "gravatar_id": "", - "contributions": 655 + "contributions": 674 }, { "id": 75643389, @@ -46742,6 +46791,13 @@ "github_url": "https://github.com/SalomeM-UXD", "avatar_url": "https://avatars.githubusercontent.com/u/166466752?v=4", "gravatar_id": "", + "contributions": 8 + }, + { + "id": 127340786, + "github_url": "https://github.com/e-khlystova", + "avatar_url": "https://avatars.githubusercontent.com/u/127340786?v=4", + "gravatar_id": "", "contributions": 7 }, { @@ -46786,13 +46842,6 @@ "gravatar_id": "", "contributions": 5 }, - { - "id": 127340786, - "github_url": "https://github.com/e-khlystova", - "avatar_url": "https://avatars.githubusercontent.com/u/127340786?v=4", - "gravatar_id": "", - "contributions": 5 - }, { "id": 140203219, "github_url": "https://github.com/George48U", @@ -47040,14 +47089,14 @@ "github_url": "https://github.com/ExperimentsInHonesty", "avatar_url": "https://avatars.githubusercontent.com/u/37763229?v=4", "gravatar_id": "", - "contributions": 887 + "contributions": 888 }, { "id": 57029070, "github_url": "https://github.com/pandanista", "avatar_url": "https://avatars.githubusercontent.com/u/57029070?v=4", "gravatar_id": "", - "contributions": 663 + "contributions": 683 }, { "id": 75643389, @@ -47348,6 +47397,13 @@ "github_url": "https://github.com/SalomeM-UXD", "avatar_url": "https://avatars.githubusercontent.com/u/166466752?v=4", "gravatar_id": "", + "contributions": 8 + }, + { + "id": 127340786, + "github_url": "https://github.com/e-khlystova", + "avatar_url": "https://avatars.githubusercontent.com/u/127340786?v=4", + "gravatar_id": "", "contributions": 7 }, { @@ -47392,13 +47448,6 @@ "gravatar_id": "", "contributions": 5 }, - { - "id": 127340786, - "github_url": "https://github.com/e-khlystova", - "avatar_url": "https://avatars.githubusercontent.com/u/127340786?v=4", - "gravatar_id": "", - "contributions": 5 - }, { "id": 140203219, "github_url": "https://github.com/George48U", diff --git a/_projects/ems-triage-tracker.md b/_projects/ems-triage-tracker.md index 3c7525ff60..9cd1ab87d0 100644 --- a/_projects/ems-triage-tracker.md +++ b/_projects/ems-triage-tracker.md @@ -47,6 +47,7 @@ leadership: github: 'https://github.com/redmckiernan' picture: https://avatars.githubusercontent.com/redmckiernan - name: Selena Jiang + github-handle: role: UI Design, Life Saving Measures screen links: slack: 'https://hackforla.slack.com/team/UMYN9DVSB' diff --git a/_projects/food-oasis.md b/_projects/food-oasis.md index cf019d0399..57ee36d53c 100644 --- a/_projects/food-oasis.md +++ b/_projects/food-oasis.md @@ -13,6 +13,7 @@ leadership: github: "https://github.com/entrotech" picture: https://avatars.githubusercontent.com/entrotech - name: Hannah Zulueta + github-handle: role: Lead Developer links: slack: "https://hackforla.slack.com/team/U9SCMTNK0" diff --git a/pages/sitemap.html b/pages/sitemap.html index 698ad23524..b6cf3b2afc 100644 --- a/pages/sitemap.html +++ b/pages/sitemap.html @@ -48,7 +48,7 @@

Suggest Site Content

Help Us Add Sections to the Website

- +

We are looking for volunteers across all From 1602ec42573518c4fe5acd6026091e5e1e3d7019 Mon Sep 17 00:00:00 2001 From: ajb176 Date: Fri, 31 May 2024 18:54:04 +0530 Subject: [PATCH 03/62] Fix formatting --- .github/workflows/pr-instructions.yml | 10 +--------- _projects/civic-tech-structure.md | 1 + _projects/ems-triage-tracker.md | 1 + _projects/engage.md | 1 + 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pr-instructions.yml b/.github/workflows/pr-instructions.yml index 78a4d4b55c..88942981f7 100644 --- a/.github/workflows/pr-instructions.yml +++ b/.github/workflows/pr-instructions.yml @@ -5,9 +5,7 @@ on: branches: - 'gh-pages' - 'feature-homepage-launch' - #Uncomment the next line for testing: - #- 'verify-pr-author-3906' - + jobs: Add-Pull-Request-Instructions: runs-on: ubuntu-latest @@ -37,12 +35,6 @@ jobs: name: adding-pr-instructions-artifact path: addingPrInstructions/artifact/ - #Instructions for testing the Check-Team-Membership action: - #1) Delete the '#' on line 9 to uncomment the testing branch - #2) Replace the token on line 51 with a user-generated token (Instructions will be linked in PR) - #3) Change the owner assignment on lines 65 and 71 from 'hackforla' to your own github handle. - #4) For testing the success condition: Test the action excluding step #5 - #5) For testing the fail condition: Change the username assignment from 'prAuthor' in line 56 to a random string that doesn't accidentally spell out the handle of someone on the website-write team Check-Team-Membership: runs-on: ubuntu-latest steps: diff --git a/_projects/civic-tech-structure.md b/_projects/civic-tech-structure.md index ba9d3b9fab..73b2a2645f 100644 --- a/_projects/civic-tech-structure.md +++ b/_projects/civic-tech-structure.md @@ -18,6 +18,7 @@ leadership: github: "https://github.com/ExperimentsInHonesty" picture: https://avatars.githubusercontent.com/ExperimentsInHonesty - name: Olivia Chiong + github-handle: role: Director of Operations links: slack: "https://hackforla.slack.com/team/U01GJC7VC6" diff --git a/_projects/ems-triage-tracker.md b/_projects/ems-triage-tracker.md index 9cd1ab87d0..cd314cbc83 100644 --- a/_projects/ems-triage-tracker.md +++ b/_projects/ems-triage-tracker.md @@ -41,6 +41,7 @@ leadership: github: 'https://github.com/nekobox' picture: https://avatars.githubusercontent.com/nekobox - name: Conor McKiernan + github-handle: role: Logo Design and UX Strategy/Research links: slack: 'https://hackforla.slack.com/team/UNHNCALSE' diff --git a/_projects/engage.md b/_projects/engage.md index e1cab074c2..43906de5d1 100644 --- a/_projects/engage.md +++ b/_projects/engage.md @@ -7,6 +7,7 @@ alt: 'Engage' image-hero: /assets/images/projects/engage-hero.png leadership: - name: Bonnie Wolfe + github-handle: role: Agile Coach links: slack: 'https://hackforla.slack.com/team/UE1UG1YFP' From 1bb8ac49de9d5e896572498d3747e0dff48271af Mon Sep 17 00:00:00 2001 From: ajb176 Date: Fri, 31 May 2024 18:59:39 +0530 Subject: [PATCH 04/62] Fix formatting --- .github/workflows/pr-instructions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-instructions.yml b/.github/workflows/pr-instructions.yml index 88942981f7..aea53eeb29 100644 --- a/.github/workflows/pr-instructions.yml +++ b/.github/workflows/pr-instructions.yml @@ -5,7 +5,7 @@ on: branches: - 'gh-pages' - 'feature-homepage-launch' - + jobs: Add-Pull-Request-Instructions: runs-on: ubuntu-latest From a1b3b61f324234f01298be7296cd42ab7d9f5a90 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Sun, 2 Jun 2024 19:40:10 -0700 Subject: [PATCH 05/62] Implementing assigneeeInAdminOrMergeTeam and assigneeeInAdminOrMergeTeam functions --- .github/workflows/issue-trigger.yml | 5 +- .../multiple-issue-reminder.md | 6 ++ .../preliminary-update-comment.js | 97 +++++++++++++++++++ 3 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 github-actions/trigger-issue/add-preliminary-comment/multiple-issue-reminder.md diff --git a/.github/workflows/issue-trigger.yml b/.github/workflows/issue-trigger.yml index f2895c5586..deae02bbe8 100644 --- a/.github/workflows/issue-trigger.yml +++ b/.github/workflows/issue-trigger.yml @@ -18,7 +18,8 @@ jobs: with: project: Project Board column: ${{ env.COLUMN_NAME }} - repo-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} + # repo-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} + repo-token: ${{ secrets.MOAZ_BOT_PA_TOKEN }} Add-Missing-Labels-To-Issues: runs-on: ubuntu-latest @@ -71,6 +72,7 @@ jobs: uses: actions/github-script@v7 id: check-labels-prelim with: + github-token: ${{ secrets.MOAZ_BOT_PA_TOKEN }} script: | const script = require('./github-actions/trigger-issue/add-preliminary-comment/check-label-preliminary-update.js') const checklabels = script({g: github, c: context}) @@ -81,6 +83,7 @@ jobs: id: assigned-comment uses: actions/github-script@v7 with: + github-token: ${{ secrets.MOAZ_BOT_PA_TOKEN }} script: | const results = ${{ steps.check-labels-prelim.outputs.result }} const script = require('./github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js') diff --git a/github-actions/trigger-issue/add-preliminary-comment/multiple-issue-reminder.md b/github-actions/trigger-issue/add-preliminary-comment/multiple-issue-reminder.md new file mode 100644 index 0000000000..f05ab4820d --- /dev/null +++ b/github-actions/trigger-issue/add-preliminary-comment/multiple-issue-reminder.md @@ -0,0 +1,6 @@ + +Hello @${issueAssignee}, we appreciate you taking on this issue, however it looks like you're already working on another issue at this time. Please wait until your current issue is merged before taking on another issue. :) + +We are going to unassign you from this issue so you can focus on your current issue. + +Hfla appreciates you! :) \ No newline at end of file diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index 59eaa606f2..5f481862a2 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -6,6 +6,7 @@ const getTimeline = require('../../utils/get-timeline'); // Global variables var github var context +var assignee /** * @description - This function is the entry point into the javascript file, it formats the md file based on the result of the previous step and then posts it to the issue @@ -18,6 +19,10 @@ var context async function main({ g, c }, { shouldPost, issueNum }){ github = g context = c + assignee = context.actor + + console.log(assignee) + // If the previous action returns a false, stop here if(shouldPost === false){ console.log('No need to post comment.') @@ -31,6 +36,11 @@ async function main({ g, c }, { shouldPost, issueNum }){ await postComment(issueNum, instructions, github, context) } } + + const isAdminOrMerge = await assigneeeInAdminOrMergeTeam(); + const isAssignedToAnotherIssues = await assigneeeInAdminOrMergeTeam(); + + console.log(isAdminOrMerge, isAssignedToAnotherIssues); } /** @@ -98,5 +108,92 @@ async function makeComment(){ const commentWithIssueAssignee = formatComment(commentObject, fs) return commentWithIssueAssignee } + + + + +// Check if assignee is in the Admin or Merge Team +async function assigneeeInAdminOrMergeTeam() { + try { + + // Get the list of members in Admin Team + const websiteAdminsMembers = (await github.rest.teams.listMembersInOrg({ + team_slug: "website-merge", + org: "hackforla" + })).data.map(member => member.login); + + // Get the list of members in Merge Team + const websiteMergeMembers = (await github.rest.teams.listMembersInOrg({ + team_slug: "website-merge", + org: "hackforla" + })).data.map(member => member.login); + + // Return true if assignee is a member of the Admin or Merge Teams + if(websiteAdminsMembers.includes(assignee) || websiteMergeMembers.includes(assignee)) + return true; + + // Otherwise return false + return false; + + } catch (error) { + console.log(error); + } +} + +// Check whether developer is assigned to another issue +async function assignedToAnotherIssue() { + let issues = (await github.rest.issues.listForRepo({ + owner: "hackforla", + repo: "website", + assignee: assignee, + state: "open", + })).data; + + issues.map(issue => { console.log(issue.html_url) }); + console.log(issues.length); + console.log("----------------------------------------------"); + + // Get all cards in Emergent Request Column + const emergentRequestCards = (await github.rest.projects.listCards({ + column_id: 19403960 //Emergent Request Column Id + })).data.map(card => card.content_url); + + // Get all cards in New Issue Approval Column + const newIssueApprovalCards = (await github.rest.projects.listCards({ + column_id: 15235217 //New Issue Approval Column Id + })).data.map(card => card.content_url); + + let diffs = []; + // Exclude other issues + issues = issues.filter(issue => { + // Check is it's an agendas issue + const isAgendaIssue = issue.labels.some(label => label.name === "feature: agenda"); + + // Check if it's a prework issue + const isPreWork = issue.labels.some(label => label.name === "Complexity: Prework"); + + // Check if it's exists in Emergent Request Column + const inEmergentRequestColumn = emergentRequestCards.includes(issue.url); + + // Check if it's exists in New Issue Approval Column + const inNewIssueApprovalColumn = newIssueApprovalCards.includes(issue.url); + + if(isAgendaIssue || isPreWork || inEmergentRequestColumn || inNewIssueApprovalColumn) + diffs.push(issue); + + // If any of the above conditions applied, exclude the issue + return !(isAgendaIssue || isPreWork || inEmergentRequestColumn || inNewIssueApprovalColumn); + }); + + issues.map(issue => {console.log(issue.html_url)}); + console.log(issues.length); + + console.log("----------------------------------------------"); + + diffs.map(issue => {console.log(issue.html_url)}); + console.log(diffs.length); + + return issues.length !== 1; +} module.exports = main From 081bf9ae1d1761cd8d79818a451745b0fde890d6 Mon Sep 17 00:00:00 2001 From: ajb176 Date: Thu, 6 Jun 2024 01:06:29 +0530 Subject: [PATCH 06/62] Testing change from github-token to repo-token --- .github/workflows/pr-instructions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-instructions.yml b/.github/workflows/pr-instructions.yml index aea53eeb29..8e9661faa2 100644 --- a/.github/workflows/pr-instructions.yml +++ b/.github/workflows/pr-instructions.yml @@ -40,7 +40,7 @@ jobs: steps: - uses: actions/github-script@v7 with: - github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} + repo-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} script: | const prAuthor = context.payload.sender.login; const prNumber = context.payload.number; From 12a897dba322d6b6a9354ae6676b060fe4634e84 Mon Sep 17 00:00:00 2001 From: ajb176 Date: Thu, 6 Jun 2024 12:52:32 +0530 Subject: [PATCH 07/62] Changing github-token --- .github/workflows/pr-instructions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-instructions.yml b/.github/workflows/pr-instructions.yml index 8e9661faa2..9d3501b9a1 100644 --- a/.github/workflows/pr-instructions.yml +++ b/.github/workflows/pr-instructions.yml @@ -40,7 +40,7 @@ jobs: steps: - uses: actions/github-script@v7 with: - repo-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} + github-token: ${{ secrets.HACKFORLA_ADMIN_TOKEN }} script: | const prAuthor = context.payload.sender.login; const prNumber = context.payload.number; From e5c970d7dd4283824c1744518f6b452de7b9c4c1 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Thu, 6 Jun 2024 00:23:45 -0700 Subject: [PATCH 08/62] Update script to notify assignee who assigned to another issue --- .github/workflows/issue-trigger.yml | 7 +- .../preliminary-update-comment.js | 430 ++++++++++++------ 2 files changed, 295 insertions(+), 142 deletions(-) diff --git a/.github/workflows/issue-trigger.yml b/.github/workflows/issue-trigger.yml index deae02bbe8..ab8ff98541 100644 --- a/.github/workflows/issue-trigger.yml +++ b/.github/workflows/issue-trigger.yml @@ -18,8 +18,7 @@ jobs: with: project: Project Board column: ${{ env.COLUMN_NAME }} - # repo-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} - repo-token: ${{ secrets.MOAZ_BOT_PA_TOKEN }} + repo-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} Add-Missing-Labels-To-Issues: runs-on: ubuntu-latest @@ -72,7 +71,6 @@ jobs: uses: actions/github-script@v7 id: check-labels-prelim with: - github-token: ${{ secrets.MOAZ_BOT_PA_TOKEN }} script: | const script = require('./github-actions/trigger-issue/add-preliminary-comment/check-label-preliminary-update.js') const checklabels = script({g: github, c: context}) @@ -83,11 +81,10 @@ jobs: id: assigned-comment uses: actions/github-script@v7 with: - github-token: ${{ secrets.MOAZ_BOT_PA_TOKEN }} script: | const results = ${{ steps.check-labels-prelim.outputs.result }} const script = require('./github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js') - script({g: github, c:context},results) + script({g: github, c:context}, results) Add-Feature-Branch-Comment: runs-on: ubuntu-latest diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index 5f481862a2..c2e5e1e6f2 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -8,6 +8,21 @@ var github var context var assignee +var Emergent_Requests = "Emergent Requests"; +var New_Issue_Approval = "New Issue Approval"; +var Prioritized_Backlog = "Prioritized backlog"; +var In_Progress = "In progress (actively working)"; + +var columnsId = new Map([ + [Emergent_Requests, 19403960], + [New_Issue_Approval, 15235217], + [Prioritized_Backlog, 7198257], + [In_Progress, 7198228], +]); + +const READY_FOR_DEV_LABEL = "ready for dev lead" + + /** * @description - This function is the entry point into the javascript file, it formats the md file based on the result of the previous step and then posts it to the issue * @param {Object} g - github object @@ -15,185 +30,326 @@ var assignee * @param {Boolean} actionResult - the previous gh-action's result * @param {Number} issueNum - the number of the issue where the post will be made */ - async function main({ g, c }, { shouldPost, issueNum }){ - github = g - context = c - assignee = context.actor - - console.log(assignee) + try { + github = g + context = c + // Get the lates assignee in case there are multiple assignees + assignee = await getLatestAssignee(); + + // If the previous action returns a false, stop here + if(shouldPost === false){ + console.log('No need to post comment.'); + return; + } - // If the previous action returns a false, stop here - if(shouldPost === false){ - console.log('No need to post comment.') - return - } - //Else we make the comment with the issuecreator's github handle instead of the placeholder. - else{ - const instructions = await makeComment() - if(instructions !== null){ - // the actual creation of the comment in github - await postComment(issueNum, instructions, github, context) + const isAdminOrMerge = await memberOfAdminOrMergeTeam(); + const isAssignedToAnotherIssues = await assignedToAnotherIssue(); + + // If assignee is not in Admin or Merge Teams + // and assigned to other issues, do the following: + if(!isAdminOrMerge && isAssignedToAnotherIssues) { + // Create and post a comment using the template in this file + const fileName = "multiple-issue-reminder.md"; + const filePath = './github-actions/trigger-issue/add-preliminary-comment/' + fileName; + const unAssigningComment = createComment(filePath); + await postComment(issueNum, unAssigningComment, github, context); + + await unassignIssue(); // Unassign the issue + await addLabel(READY_FOR_DEV_LABEL); // Add 'ready for dev lead' label + await moveToNewIssueApproval(); // Move the card to 'New Issue Approval' Column + } + // Otherwise, post the normal comment + else { + const instructions = await makeComment(); + if(instructions !== null){ + // the actual creation of the comment in github + await postComment(issueNum, instructions, github, context); + console.log(instructions); + } } + } catch (error) { + console.log(error); } - - const isAdminOrMerge = await assigneeeInAdminOrMergeTeam(); - const isAssignedToAnotherIssues = await assigneeeInAdminOrMergeTeam(); - - console.log(isAdminOrMerge, isAssignedToAnotherIssues); } /** * @description - This function makes the comment with the issue assignee's github handle using the raw preliminary.md file * @returns {string} - Comment to be posted with the issue assignee's name in it!!! */ - async function makeComment(){ - // Setting all the variables which formatComment is to be called with - let issueAssignee = context.payload.issue.assignee.login - let filename = 'preliminary-update.md'; - const eventdescriptions = await getTimeline(context.payload.issue.number, github, context) - - //adding the code to find out the latest person assigned the issue - for(var i = eventdescriptions.length - 1 ; i>=0; i-=1){ - if(eventdescriptions[i].event == 'assigned'){ - issueAssignee = eventdescriptions[i].assignee.login - break - } - } + try { + // Get column name + const columnName = await getColumnName(context.payload.issue.number); - // Getting the issue's Project Board column name - const queryColumn = `query($owner:String!, $name:String!, $number:Int!) { - repository(owner:$owner, name:$name) { - issue(number:$number) { - projectCards { nodes { column { name } } } - } - } - }`; - const variables = { - owner: context.repo.owner, - name: context.repo.repo, - number: context.payload.issue.number - }; - const resColumn = await github.graphql(queryColumn, variables); - const columnName = resColumn.repository.issue.projectCards.nodes[0].column.name; - const isPrework = context.payload.issue.labels.find((label) => label.name == 'Complexity: Prework') ? true : false; - const isDraft = context.payload.issue.labels.find((label) => label.name == 'Draft') ? true : false; - - if (columnName == 'New Issue Approval' && !isDraft && !isPrework) { - // If author = assignee, remind them to add draft label, otherwise unnasign and comment - if (context.payload.issue.user.login == issueAssignee) { - filename = 'draft-label-reminder.md'; - } else { - filename = 'unassign-from-NIA.md'; - - await github.rest.issues.removeAssignees({ - owner: variables.owner, - repo: variables.name, - issue_number: variables.number, - assignees: [issueAssignee], - }); - } - } + const isPrework = context.payload.issue.labels.find((label) => label.name == 'Complexity: Prework') ? true : false; + const isDraft = context.payload.issue.labels.find((label) => label.name == 'Draft') ? true : false; - let filePathToFormat = './github-actions/trigger-issue/add-preliminary-comment/' + filename; - const commentObject = { - replacementString: issueAssignee, - placeholderString: '${issueAssignee}', - filePathToFormat: filePathToFormat, - textToFormat: null - } + let filename = 'preliminary-update.md'; - // creating the comment with issue assignee's name and returning it! - const commentWithIssueAssignee = formatComment(commentObject, fs) - return commentWithIssueAssignee -} + if (columnName == 'New Issue Approval' && !isDraft && !isPrework) { + // If author = assignee, remind them to add draft label, otherwise unnasign and comment + if (context.payload.issue.user.login == issueAsasignee) { + filename = 'draft-label-reminder.md'; + } else { + filename = 'unassign-from-NIA.md'; + // Unassign the issue + await unassignIssue(); + } + } + const filePath = './github-actions/trigger-issue/add-preliminary-comment/' + filename; + const comment = createComment(filePath); + return comment; + } catch (error) { + console.log(error); + } +} -// Check if assignee is in the Admin or Merge Team -async function assigneeeInAdminOrMergeTeam() { +/** + * @description - This function Check if assignee is in the Admin or Merge Team + * @returns {Boolean} - return true if assignee is member of Admin/Merge team, false otherwise + */ +async function memberOfAdminOrMergeTeam() { try { - - // Get the list of members in Admin Team + // Get all members in Admin Team const websiteAdminsMembers = (await github.rest.teams.listMembersInOrg({ - team_slug: "website-merge", - org: "hackforla" + team_slug: "website-admins", + org: context.repo.owner })).data.map(member => member.login); - // Get the list of members in Merge Team + // Get all members in Merge Team const websiteMergeMembers = (await github.rest.teams.listMembersInOrg({ team_slug: "website-merge", - org: "hackforla" + org: context.repo.owner })).data.map(member => member.login); // Return true if assignee is a member of the Admin or Merge Teams - if(websiteAdminsMembers.includes(assignee) || websiteMergeMembers.includes(assignee)) - return true; + return (websiteAdminsMembers.includes(assignee) || websiteMergeMembers.includes(assignee)); + } catch (error) { + console.log(error); + } +} - // Otherwise return false - return false; +/** + * @description - Check whether developer is assigned to another issue + * @returns {Boolean} - return true if assignee is assinged to another issue/s + */ +async function assignedToAnotherIssue() { + try { + let issues = (await github.rest.issues.listForRepo({ + owner: context.repo.owner, + repo: context.repo.repo, + assignee: assignee, + state: "open", // Only fetch opened issues + })).data; + + // Get all cards in 'Emergent Request' Column + const emergentRequestCards = await getAllCardsInColumn(columnsId.get(Emergent_Requests)); + + // Get all cards in 'New Issue Approval' Column + const newIssueApprovalCards = await getAllCardsInColumn(columnsId.get(New_Issue_Approval)); + + // Exclude any issue that apply the conditions below + issues = issues.filter(issue => { + // Check is it's an agendas issue + const isAgendaIssue = issue.labels.some(label => label.name === "feature: agenda"); + + // Check if it's a prework issue + const isPreWork = issue.labels.some(label => label.name === "Complexity: Prework"); + + // Check if it's exists in Emergent Request Column + const inEmergentRequestColumn = emergentRequestCards.some(card => card.content_url === issue.url); + + // Check if it's exists in New Issue Approval Column + const inNewIssueApprovalColumn = newIssueApprovalCards.some(card => card.content_url === issue.url); + + // If any of these conditions applied, exclude the issue + return !(isAgendaIssue || isPreWork || inEmergentRequestColumn || inNewIssueApprovalColumn); + }); + + // After excluding above issues and assignee still assigned to another issue/s, return true + return issues.length > 1; + } catch (error) { + console.log(error); + } +} +/** + * @description - Unassign assignee from the issue + */ +async function unassignIssue() { + try { + await github.rest.issues.removeAssignees({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.issue.number, + assignees: [assignee], + }); } catch (error) { console.log(error); } } -// Check whether developer is assigned to another issue -async function assignedToAnotherIssue() { - let issues = (await github.rest.issues.listForRepo({ - owner: "hackforla", - repo: "website", - assignee: assignee, - state: "open", - })).data; - - issues.map(issue => { console.log(issue.html_url) }); - console.log(issues.length); - console.log("----------------------------------------------"); - - // Get all cards in Emergent Request Column - const emergentRequestCards = (await github.rest.projects.listCards({ - column_id: 19403960 //Emergent Request Column Id - })).data.map(card => card.content_url); - - // Get all cards in New Issue Approval Column - const newIssueApprovalCards = (await github.rest.projects.listCards({ - column_id: 15235217 //New Issue Approval Column Id - })).data.map(card => card.content_url); - - let diffs = []; - // Exclude other issues - issues = issues.filter(issue => { - // Check is it's an agendas issue - const isAgendaIssue = issue.labels.some(label => label.name === "feature: agenda"); +/** + * @description - Create a comment using the template of the file in 'filePath' + * @param {String} filePath - file path for the used template + * @returns {String} - return fromatted comment + */ +function createComment(filePath) { + try { + const commentObject = { + replacementString: assignee, + placeholderString: '${assignee}', + filePathToFormat: filePath, + textToFormat: null + } + + // Fromat the comment and return it back + const fromattedComment = formatComment(commentObject, fs); + return fromattedComment; + } catch (error) { - // Check if it's a prework issue - const isPreWork = issue.labels.some(label => label.name === "Complexity: Prework"); + } +} + +/** + * @description - Add 'ready for dev lead' label to the issue + * @param {String} labelName - Name of the label to add + */ +async function addLabel(labelName) { + try { + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.issue.number, + labels: [labelName], + }); + } catch (error) { + console.log(error); + } +} + +/** + * @description - Get latest assignee, in case there were multimple assignee to the issue + * @returns {String} - return the username of the latest assignee + */ +async function getLatestAssignee() { + try { + let issueAssignee = context.payload.issue.assignee.login; + + const eventdescriptions = await getTimeline(context.payload.issue.number, github, context); - // Check if it's exists in Emergent Request Column - const inEmergentRequestColumn = emergentRequestCards.includes(issue.url); + // Adding the code to find out the latest person assigned the issue + for(var i = eventdescriptions.length - 1 ; i>=0; i-=1){ + if(eventdescriptions[i].event == 'assigned'){ + issueAssignee = eventdescriptions[i].assignee.login + break + } + } - // Check if it's exists in New Issue Approval Column - const inNewIssueApprovalColumn = newIssueApprovalCards.includes(issue.url); + return issueAssignee; + } catch (error) { + console.log(error); + } +} - if(isAgendaIssue || isPreWork || inEmergentRequestColumn || inNewIssueApprovalColumn) - diffs.push(issue); +/** + * @description - Move the card to 'New Approval Issues' Column + */ +async function moveToNewIssueApproval() { + try { + const issueNum = context.payload.issue.number; - // If any of the above conditions applied, exclude the issue - return !(isAgendaIssue || isPreWork || inEmergentRequestColumn || inNewIssueApprovalColumn); - }); + // Get column name assiged with the issue + const columnName = await getColumnName(); - issues.map(issue => {console.log(issue.html_url)}); - console.log(issues.length); + // Get all cards in this column using column id + const cards = await getAllCardsInColumn(columnsId.get(columnName)); - console.log("----------------------------------------------"); + // Get the issue's card + const card = cards.find(card => card.content_url && card.content_url.includes(`/issues/${issueNum}`)); - diffs.map(issue => {console.log(issue.html_url)}); - console.log(diffs.length); + // Move the card to 'New Issue Approval' Column + await github.rest.projects.moveCard({ + card_id: card.id, + position: "top", + column_id: columnsId.get(New_Issue_Approval), + }); + } catch (error) { + console.log(error); + } +} + +/** + * @description - Getting the issue's Project Board column name using graphql + * @returns {String} - Column Name + */ +async function getColumnName() { + try { + // GraphQL query to fetch issue's column name + const queryColumn = `query($owner:String!, $name:String!, $number:Int!) { + repository(owner:$owner, name:$name) { + issue(number:$number) { + projectCards { nodes { column { name } } } + } + } + }`; + + // Variables to be passed to the GraphQL query + const variables = { + owner: context.repo.owner, + name: context.repo.repo, + number: context.payload.issue.number + }; + + // Making the GraphQL request to get column name + const response = await github.graphql(queryColumn, variables); + const columnName = response.repository.issue.projectCards.nodes[0].column.name; + + // Return column name + return columnName; + } catch (error) { + console.log(error); + } +} + +/** + * @description - Fetch all cards inside issue's column + * @param {Number} columnId - The id for the issue's column + * @returns {Object[]} - Array of card objects + */ +async function getAllCardsInColumn(columnId) { + let allCards = []; + let page = 1; + const perPage = 100; // Maximum number of cards per page + + try { + // Using pagination since max number of cards to fetch per request is only 100 + while (true) { + const cards = (await github.rest.projects.listCards({ + column_id: columnId, + page: page, + per_page: perPage, + })).data; + + allCards = allCards.concat(cards); + + // Berak if there are no more cards + if (cards.length < perPage) { + break; + } + + // Go to next page + page++; + } - return issues.length !== 1; + return allCards; + } catch (error) { + console.log(error); + } } - + module.exports = main From f67436d6e7315adab73e7487d20169cb1ceae509 Mon Sep 17 00:00:00 2001 From: ajb176 Date: Fri, 7 Jun 2024 01:34:00 +0530 Subject: [PATCH 09/62] Create new yml file --- .github/workflows/pr-verification.yml | 41 +++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/pr-verification.yml diff --git a/.github/workflows/pr-verification.yml b/.github/workflows/pr-verification.yml new file mode 100644 index 0000000000..27ef13276f --- /dev/null +++ b/.github/workflows/pr-verification.yml @@ -0,0 +1,41 @@ +name: Pull Request Verification +on: + pull_request_target: + types: [opened] + branches: + - 'gh-pages' + +jobs: + Check-Team-Membership: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v7 + with: + github-token: ${{ secrets.HACKFORLA_ADMIN_TOKEN }} + script: | + const prAuthor = context.payload.sender.login; + const prNumber = context.payload.number; + try { + const getMembershipStatus = await github.rest.teams.getMembershipForUserInOrg({ + org: 'hackforla', + team_slug: 'website-write', + username: prAuthor + }); + console.log('Successfully verified!') + } catch (verificationError) { + if (verificationError.status==404) { + await github.request('PATCH /repos/{owner}/{repo}/pulls/{pull_number}', { + owner : 'hackforla', + repo : 'website', + pull_number : prNumber, + state : 'closed' + }); + await github.request('POST /repos/{owner}/{repo}/issues/{issue_number}/comments', { + owner : 'hackforla', + repo : 'website', + issue_number : prNumber, + body : 'You must be a member of the HFLA website team in order to create pull requests. Please see our page on how to join us as a member at HFLA: https://www.hackforla.org/getting-started. If you have been though onboarding, and feel this message in error, please message us in the #hfla-site team slack channel with the link to this PR.' + }); + } + } + From 1843799c717d254279f13fafa55bf777cc025155 Mon Sep 17 00:00:00 2001 From: ajb176 Date: Fri, 7 Jun 2024 01:53:13 +0530 Subject: [PATCH 10/62] re-formatting --- .github/workflows/pr-instructions.yml | 35 +-------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/.github/workflows/pr-instructions.yml b/.github/workflows/pr-instructions.yml index 9d3501b9a1..1df453d685 100644 --- a/.github/workflows/pr-instructions.yml +++ b/.github/workflows/pr-instructions.yml @@ -33,37 +33,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: adding-pr-instructions-artifact - path: addingPrInstructions/artifact/ - - Check-Team-Membership: - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.HACKFORLA_ADMIN_TOKEN }} - script: | - const prAuthor = context.payload.sender.login; - const prNumber = context.payload.number; - try { - const getMembershipStatus = await github.rest.teams.getMembershipForUserInOrg({ - org: 'hackforla', - team_slug: 'website-write', - username: prAuthor - }); - console.log('Successfully verified!') - } catch (verificationError) { - if (verificationError.status==404) { - await github.request('PATCH /repos/{owner}/{repo}/pulls/{pull_number}', { - owner : 'hackforla', - repo : 'website', - pull_number : prNumber, - state : 'closed' - }); - await github.request('POST /repos/{owner}/{repo}/issues/{issue_number}/comments', { - owner : 'hackforla', - repo : 'website', - issue_number : prNumber, - body : 'You must be a member of the HFLA website team in order to create pull requests. Please see our page on how to join us as a member at HFLA: https://www.hackforla.org/getting-started. If you have been though onboarding, and feel this message in error, please message us in the #hfla-site team slack channel with the link to this PR.' - }); - } - } \ No newline at end of file + path: addingPrInstructions/artifact/ \ No newline at end of file From daa2e4bfe2cd396b15073bd5dc8d03e76fd765a6 Mon Sep 17 00:00:00 2001 From: ajb176 Date: Fri, 7 Jun 2024 01:58:22 +0530 Subject: [PATCH 11/62] restoring original --- .github/workflows/pr-instructions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-instructions.yml b/.github/workflows/pr-instructions.yml index 1df453d685..15a585de64 100644 --- a/.github/workflows/pr-instructions.yml +++ b/.github/workflows/pr-instructions.yml @@ -33,4 +33,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: adding-pr-instructions-artifact - path: addingPrInstructions/artifact/ \ No newline at end of file + path: addingPrInstructions/artifact/ From 949234502f7d2e3be6068d656e2bb4baf12cc3fd Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Thu, 6 Jun 2024 14:44:36 -0700 Subject: [PATCH 12/62] Update script to notify assignee who assigned to another issue --- .../add-preliminary-comment/preliminary-update-comment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index c2e5e1e6f2..dc1d482504 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -20,7 +20,7 @@ var columnsId = new Map([ [In_Progress, 7198228], ]); -const READY_FOR_DEV_LABEL = "ready for dev lead" +const READY_FOR_DEV_LABEL = "ready for dev lead"; /** From 2ca4ae11b751ad581c34c1525759ccae2fdd0cc9 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Fri, 7 Jun 2024 02:39:34 -0700 Subject: [PATCH 13/62] Fix superfluous trailing arguments warning --- .../add-preliminary-comment/preliminary-update-comment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index dc1d482504..750fd6f877 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -80,7 +80,7 @@ async function main({ g, c }, { shouldPost, issueNum }){ async function makeComment(){ try { // Get column name - const columnName = await getColumnName(context.payload.issue.number); + const columnName = await getColumnName(); const isPrework = context.payload.issue.labels.find((label) => label.name == 'Complexity: Prework') ? true : false; const isDraft = context.payload.issue.labels.find((label) => label.name == 'Draft') ? true : false; From 6ba49a919656094fb1cb5c3b0b302613f65e2e23 Mon Sep 17 00:00:00 2001 From: ajb176 Date: Fri, 21 Jun 2024 18:49:30 +0530 Subject: [PATCH 14/62] Add utility function, change API syntax --- .github/workflows/pr-verification.yml | 17 +++++----- github-actions/utils/check-team-membership.js | 33 +++++++++++++++++++ 2 files changed, 41 insertions(+), 9 deletions(-) create mode 100644 github-actions/utils/check-team-membership.js diff --git a/.github/workflows/pr-verification.yml b/.github/workflows/pr-verification.yml index 27ef13276f..9a9adfbe7b 100644 --- a/.github/workflows/pr-verification.yml +++ b/.github/workflows/pr-verification.yml @@ -16,26 +16,25 @@ jobs: const prAuthor = context.payload.sender.login; const prNumber = context.payload.number; try { - const getMembershipStatus = await github.rest.teams.getMembershipForUserInOrg({ - org: 'hackforla', - team_slug: 'website-write', - username: prAuthor + await github.rest.teams.getMembershipForUserInOrg({ + org: 'hackforla', + team_slug: 'website-write', + username: prAuthor }); console.log('Successfully verified!') } catch (verificationError) { if (verificationError.status==404) { - await github.request('PATCH /repos/{owner}/{repo}/pulls/{pull_number}', { + await github.rest.issues.update({ owner : 'hackforla', repo : 'website', - pull_number : prNumber, + issue_number : prNumber, state : 'closed' }); - await github.request('POST /repos/{owner}/{repo}/issues/{issue_number}/comments', { + await github.rest.issues.createComment({ owner : 'hackforla', repo : 'website', issue_number : prNumber, body : 'You must be a member of the HFLA website team in order to create pull requests. Please see our page on how to join us as a member at HFLA: https://www.hackforla.org/getting-started. If you have been though onboarding, and feel this message in error, please message us in the #hfla-site team slack channel with the link to this PR.' }); } - } - + } \ No newline at end of file diff --git a/github-actions/utils/check-team-membership.js b/github-actions/utils/check-team-membership.js new file mode 100644 index 0000000000..b34c7f14dd --- /dev/null +++ b/github-actions/utils/check-team-membership.js @@ -0,0 +1,33 @@ +/** +* @param {octokit} github - Octokit object used to access GitHub API +* @param {String} githubUsername - The github username of the user whose membership is to be checked. +* @param {String} team - The HFLA team the username's membership is checked against. Example: 'website-write' + +- Returns true or false depending on whether the username is found on the passed team, 404 means the user passed wasn't +found on the team passed. Any other type of error will be thrown. +- Need read:org permission to use this function, the least permissive token which contains this is the secrets.TEAMS token. +Lack of permission will result in a 403 error. +- The method of obtaining the github username will vary depending on the contents of the context object. See github action +docs on printing context information into the log. +*/ + +async function isMemberOfTeam(github, githubUsername, team) +{ + try { + const result = await github.rest.teams.getMembershipForUserInOrg({ + org : 'hackforla', + team_slug : team, + username : githubUsername + }); + return true; + } catch (verificationError) { + if (verificationError.status == 404) { + return false; + } + else { + throw verificationError; + } + } +} + +module.exports = isMemberOfTeam; \ No newline at end of file From f6bd3ee93eeb4188b47b67fb2f46c00c77b822a7 Mon Sep 17 00:00:00 2001 From: ajb176 Date: Fri, 21 Jun 2024 19:34:50 +0530 Subject: [PATCH 15/62] fix comment body --- .github/workflows/pr-verification.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-verification.yml b/.github/workflows/pr-verification.yml index 9a9adfbe7b..867c3df486 100644 --- a/.github/workflows/pr-verification.yml +++ b/.github/workflows/pr-verification.yml @@ -34,7 +34,7 @@ jobs: owner : 'hackforla', repo : 'website', issue_number : prNumber, - body : 'You must be a member of the HFLA website team in order to create pull requests. Please see our page on how to join us as a member at HFLA: https://www.hackforla.org/getting-started. If you have been though onboarding, and feel this message in error, please message us in the #hfla-site team slack channel with the link to this PR.' + body : 'You must be a member of the HFLA website team in order to create pull requests. Please see our page on how to join us as a member at HFLA: https://www.hackforla.org/getting-started. If you have been though onboarding, and feel you have received this message in error, please message us in the #hfla-site team slack channel with the link to this PR.' }); } } \ No newline at end of file From b9f9ca3018f004a00804369dd6553577eaf3f5e5 Mon Sep 17 00:00:00 2001 From: ajb176 Date: Fri, 21 Jun 2024 19:38:28 +0530 Subject: [PATCH 16/62] Remove unit testing code from utility function --- github-actions/utils/check-team-membership.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-actions/utils/check-team-membership.js b/github-actions/utils/check-team-membership.js index b34c7f14dd..f28699ce60 100644 --- a/github-actions/utils/check-team-membership.js +++ b/github-actions/utils/check-team-membership.js @@ -14,7 +14,7 @@ docs on printing context information into the log. async function isMemberOfTeam(github, githubUsername, team) { try { - const result = await github.rest.teams.getMembershipForUserInOrg({ + await github.rest.teams.getMembershipForUserInOrg({ org : 'hackforla', team_slug : team, username : githubUsername From 561227fcf1434153befa26044494dadf5f5cda6f Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Sat, 22 Jun 2024 15:54:56 -0700 Subject: [PATCH 17/62] test --- .github/workflows/pr-verification.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr-verification.yml b/.github/workflows/pr-verification.yml index 27ef13276f..5e0330d38a 100644 --- a/.github/workflows/pr-verification.yml +++ b/.github/workflows/pr-verification.yml @@ -13,26 +13,27 @@ jobs: with: github-token: ${{ secrets.HACKFORLA_ADMIN_TOKEN }} script: | - const prAuthor = context.payload.sender.login; - const prNumber = context.payload.number; + const prAuthor = "test"; + const prNumber = 100; try { const getMembershipStatus = await github.rest.teams.getMembershipForUserInOrg({ org: 'hackforla', team_slug: 'website-write', username: prAuthor }); - console.log('Successfully verified!') + if(getMembershipStatus.data) console.log(getMembershipStatus.data); + //console.log('Successfully verified!') } catch (verificationError) { if (verificationError.status==404) { await github.request('PATCH /repos/{owner}/{repo}/pulls/{pull_number}', { - owner : 'hackforla', - repo : 'website', + owner : 'moazDev1', + repo : 'test', pull_number : prNumber, state : 'closed' }); await github.request('POST /repos/{owner}/{repo}/issues/{issue_number}/comments', { - owner : 'hackforla', - repo : 'website', + owner : 'moazDev1', + repo : 'test', issue_number : prNumber, body : 'You must be a member of the HFLA website team in order to create pull requests. Please see our page on how to join us as a member at HFLA: https://www.hackforla.org/getting-started. If you have been though onboarding, and feel this message in error, please message us in the #hfla-site team slack channel with the link to this PR.' }); From d11c80bd475be208f625d61c0dbafbeb1cf5f92a Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Sun, 23 Jun 2024 21:28:09 -0700 Subject: [PATCH 18/62] test --- .github/workflows/pr-verification.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-verification.yml b/.github/workflows/pr-verification.yml index 35cb49a4ef..5d66b7891e 100644 --- a/.github/workflows/pr-verification.yml +++ b/.github/workflows/pr-verification.yml @@ -17,6 +17,7 @@ jobs: const prAuthor = "test"; const prNumber = 100; try { + const response = await github.rest.teams.getMembershipForUserInOrg({ org: 'hackforla', team_slug: 'website-write', From daaf20f15771836a0172c36bd1f33bf513be212b Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Sun, 23 Jun 2024 21:30:03 -0700 Subject: [PATCH 19/62] test --- .github/workflows/pr-verification.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-verification.yml b/.github/workflows/pr-verification.yml index 5d66b7891e..5e31a7ce4e 100644 --- a/.github/workflows/pr-verification.yml +++ b/.github/workflows/pr-verification.yml @@ -4,7 +4,7 @@ on: types: [opened] branches: - 'gh-pages' - - 'verify-pr-creator-3906' + - 'verify-pr-creator-3906-test' jobs: Check-Team-Membership: @@ -17,7 +17,7 @@ jobs: const prAuthor = "test"; const prNumber = 100; try { - + const response = await github.rest.teams.getMembershipForUserInOrg({ org: 'hackforla', team_slug: 'website-write', From 7f1c6f73392236227ae48c5d689f40f52ff17fb5 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Sun, 23 Jun 2024 21:32:45 -0700 Subject: [PATCH 20/62] test --- .github/workflows/pr-verification.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr-verification.yml b/.github/workflows/pr-verification.yml index 5e31a7ce4e..b84612d492 100644 --- a/.github/workflows/pr-verification.yml +++ b/.github/workflows/pr-verification.yml @@ -17,7 +17,6 @@ jobs: const prAuthor = "test"; const prNumber = 100; try { - const response = await github.rest.teams.getMembershipForUserInOrg({ org: 'hackforla', team_slug: 'website-write', From b0c7b163129b60d058553109f117c82a1784cae8 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Sun, 23 Jun 2024 21:36:11 -0700 Subject: [PATCH 21/62] test --- .github/workflows/pr-verification.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-verification.yml b/.github/workflows/pr-verification.yml index b84612d492..54b14bb790 100644 --- a/.github/workflows/pr-verification.yml +++ b/.github/workflows/pr-verification.yml @@ -14,8 +14,8 @@ jobs: with: github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} script: | - const prAuthor = "test"; - const prNumber = 100; + const prAuthor = context.payload.number; + const prNumber = context.payload.number; try { const response = await github.rest.teams.getMembershipForUserInOrg({ org: 'hackforla', From 71eb238d856b8ab4c3f84c9fc89cac65bfe6b744 Mon Sep 17 00:00:00 2001 From: Moaz Ali <32923319+moazDev1@users.noreply.github.com> Date: Mon, 24 Jun 2024 00:10:29 -0700 Subject: [PATCH 22/62] Revert "test" --- .github/workflows/pr-verification.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-verification.yml b/.github/workflows/pr-verification.yml index 54b14bb790..5e31a7ce4e 100644 --- a/.github/workflows/pr-verification.yml +++ b/.github/workflows/pr-verification.yml @@ -14,9 +14,10 @@ jobs: with: github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} script: | - const prAuthor = context.payload.number; - const prNumber = context.payload.number; + const prAuthor = "test"; + const prNumber = 100; try { + const response = await github.rest.teams.getMembershipForUserInOrg({ org: 'hackforla', team_slug: 'website-write', From 2371791a56253fe0da165e4b0f3fef6bf01d2133 Mon Sep 17 00:00:00 2001 From: Moaz Ali <32923319+moazDev1@users.noreply.github.com> Date: Mon, 24 Jun 2024 00:11:33 -0700 Subject: [PATCH 23/62] Revert "Ajb176 verify pr creator 3906 test" --- .github/workflows/pr-verification.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pr-verification.yml b/.github/workflows/pr-verification.yml index 5e31a7ce4e..35cb49a4ef 100644 --- a/.github/workflows/pr-verification.yml +++ b/.github/workflows/pr-verification.yml @@ -4,7 +4,7 @@ on: types: [opened] branches: - 'gh-pages' - - 'verify-pr-creator-3906-test' + - 'verify-pr-creator-3906' jobs: Check-Team-Membership: @@ -17,7 +17,6 @@ jobs: const prAuthor = "test"; const prNumber = 100; try { - const response = await github.rest.teams.getMembershipForUserInOrg({ org: 'hackforla', team_slug: 'website-write', From 8a83c475218a2be38203ce31130dac4078da2d35 Mon Sep 17 00:00:00 2001 From: Moaz Ali <32923319+moazDev1@users.noreply.github.com> Date: Mon, 24 Jun 2024 00:12:06 -0700 Subject: [PATCH 24/62] Revert "Ajb176 verify pr creator 3906 test" --- .github/workflows/pr-verification.yml | 42 ------------------- github-actions/utils/check-team-membership.js | 33 --------------- 2 files changed, 75 deletions(-) delete mode 100644 .github/workflows/pr-verification.yml delete mode 100644 github-actions/utils/check-team-membership.js diff --git a/.github/workflows/pr-verification.yml b/.github/workflows/pr-verification.yml deleted file mode 100644 index 35cb49a4ef..0000000000 --- a/.github/workflows/pr-verification.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Pull Request Verification -on: - pull_request_target: - types: [opened] - branches: - - 'gh-pages' - - 'verify-pr-creator-3906' - -jobs: - Check-Team-Membership: - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} - script: | - const prAuthor = "test"; - const prNumber = 100; - try { - const response = await github.rest.teams.getMembershipForUserInOrg({ - org: 'hackforla', - team_slug: 'website-write', - username: prAuthor - }); - if(response) console.log(response.data); - else console.log("Not successful!"); - } catch (verificationError) { - if (verificationError.status==404) { - await github.rest.issues.update({ - owner : 'moazDev1', - repo : 'website', - issue_number : prNumber, - state : 'closed' - }); - await github.rest.issues.createComment({ - owner : 'moazDev1', - repo : 'website', - issue_number : prNumber, - body : 'You must be a member of the HFLA website team in order to create pull requests. Please see our page on how to join us as a member at HFLA: https://www.hackforla.org/getting-started. If you have been though onboarding, and feel you have received this message in error, please message us in the #hfla-site team slack channel with the link to this PR.' - }); - } - } \ No newline at end of file diff --git a/github-actions/utils/check-team-membership.js b/github-actions/utils/check-team-membership.js deleted file mode 100644 index f28699ce60..0000000000 --- a/github-actions/utils/check-team-membership.js +++ /dev/null @@ -1,33 +0,0 @@ -/** -* @param {octokit} github - Octokit object used to access GitHub API -* @param {String} githubUsername - The github username of the user whose membership is to be checked. -* @param {String} team - The HFLA team the username's membership is checked against. Example: 'website-write' - -- Returns true or false depending on whether the username is found on the passed team, 404 means the user passed wasn't -found on the team passed. Any other type of error will be thrown. -- Need read:org permission to use this function, the least permissive token which contains this is the secrets.TEAMS token. -Lack of permission will result in a 403 error. -- The method of obtaining the github username will vary depending on the contents of the context object. See github action -docs on printing context information into the log. -*/ - -async function isMemberOfTeam(github, githubUsername, team) -{ - try { - await github.rest.teams.getMembershipForUserInOrg({ - org : 'hackforla', - team_slug : team, - username : githubUsername - }); - return true; - } catch (verificationError) { - if (verificationError.status == 404) { - return false; - } - else { - throw verificationError; - } - } -} - -module.exports = isMemberOfTeam; \ No newline at end of file From 10757b309c6d7e33dad5f914e6992b0d8c1223f2 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Sun, 30 Jun 2024 20:22:54 -0700 Subject: [PATCH 25/62] Update to ProjectV2 --- .github/workflows/issue-trigger.yml | 2 + .../preliminary-update-comment.js | 320 +++++++++--------- 2 files changed, 164 insertions(+), 158 deletions(-) diff --git a/.github/workflows/issue-trigger.yml b/.github/workflows/issue-trigger.yml index 2108fb8d9d..6b53500b9a 100644 --- a/.github/workflows/issue-trigger.yml +++ b/.github/workflows/issue-trigger.yml @@ -52,6 +52,7 @@ jobs: uses: actions/github-script@v7 id: check-labels-prelim with: + github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} script: | const script = require('./github-actions/trigger-issue/add-preliminary-comment/check-label-preliminary-update.js') const checklabels = script({g: github, c: context}) @@ -62,6 +63,7 @@ jobs: id: assigned-comment uses: actions/github-script@v7 with: + github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} script: | const results = ${{ steps.check-labels-prelim.outputs.result }} const script = require('./github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js') diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index dc45a8deac..0588f19a59 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -5,60 +5,72 @@ const formatComment = require('../../utils/format-comment'); const getTimeline = require('../../utils/get-timeline'); // Global variables -var github -var context -var assignee - -var Emergent_Requests = "Emergent Requests"; -var New_Issue_Approval = "New Issue Approval"; -var Prioritized_Backlog = "Prioritized backlog"; -var In_Progress = "In progress (actively working)"; - -var columnsId = new Map([ - [Emergent_Requests, 19403960], - [New_Issue_Approval, 15235217], - [Prioritized_Backlog, 7198257], - [In_Progress, 7198228], +let github; +let context; +let assignee; + +const PROJECT_ID = "PVT_kwHOAfZet84AkAVr"; + +// The field containing all statuses +const STATUS_FIELD_ID = "PVTSSF_lAHOAfZet84AkAVrzgcR5Tc"; + +const Emergent_Requests = "Emergent Requests"; +const New_Issue_Approval = "New Issue Approval"; +const Prioritized_Backlog = "Prioritized backlog"; +const In_Progress = "In progress (actively working)"; + +const statusesValues = new Map([ + [Emergent_Requests, "d468e876"], + [New_Issue_Approval, "83187325"], + [Prioritized_Backlog, "434304a8"], + [In_Progress, "9a878e9c"], ]); const READY_FOR_DEV_LABEL = "ready for dev lead"; - /** - * @description - This function is the entry point into the javascript file, it formats the md file based on the result of the previous step and then posts it to the issue + * @description This function is the entry point into the JavaScript file. It formats the + * markdown file based on the result of the previous step, checks if the developer is allowed + * to be assigned to this issue, and performs the following actions: + * - If the developer is not allowed, posts an "unassigned" comment, unassigns the developer, + * and updates the item status. + * - Posts the formatted markdown to the issue. * @param {Object} g - GitHub object - * @param {Object} c - context object - * @param {Boolean} actionResult - the previous gh-action's result - * @param {Number} issueNum - the number of the issue where the post will be made + * @param {Object} c - Context object + * @param {Boolean} shouldPost - The previous GitHub action's result + * @param {Number} issueNum - The number of the issue where the post will be made */ -async function main({ g, c }, { shouldPost, issueNum }){ +async function main({ g, c }, { shouldPost, issueNum }) { try { - github = g - context = c - // Get the lates assignee in case there are multiple assignees + github = g; + context = c; + // Get the lates developer in case there are multiple assignees assignee = await getLatestAssignee(); - - // If the previous action returns a false, stop here - if(shouldPost === false){ - console.log('No need to post comment.'); + + // If the previous action returns false, stop here + if(shouldPost === false) return; - } + // Check if developer is allowed to work on this issue const isAdminOrMerge = await memberOfAdminOrMergeTeam(); const isAssignedToAnotherIssues = await assignedToAnotherIssue(); - // If assignee is not in Admin or Merge Teams - // and assigned to other issues, do the following: + // If developer is not in Admin or Merge Teams + // and assigned to another issue/s, do the following: if(!isAdminOrMerge && isAssignedToAnotherIssues) { + // Create and post a comment using the template in this file const fileName = "multiple-issue-reminder.md"; const filePath = './github-actions/trigger-issue/add-preliminary-comment/' + fileName; const unAssigningComment = createComment(filePath); await postComment(issueNum, unAssigningComment, github, context); - await unassignIssue(); // Unassign the issue + await unAssignDev(); // Unassign the developer await addLabel(READY_FOR_DEV_LABEL); // Add 'ready for dev lead' label - await moveToNewIssueApproval(); // Move the card to 'New Issue Approval' Column + + // Update item status to "New Issue Approval" + const item = await getItemInfo(); + await updateItemStatus(item.id, statusesValues.get(New_Issue_Approval)); } // Otherwise, post the normal comment else { @@ -66,7 +78,10 @@ async function main({ g, c }, { shouldPost, issueNum }){ if(instructions !== null){ // the actual creation of the comment in github await postComment(issueNum, instructions, github, context); - console.log(instructions); + + // Update item status to "In progress (actively working)" + const item = await getItemInfo(); + await updateItemStatus(item.id, statusesValues.get(In_Progress)); } } } catch (error) { @@ -75,28 +90,28 @@ async function main({ g, c }, { shouldPost, issueNum }){ } /** - * @description - This function makes the comment with the issue assignee's GitHub handle using the raw preliminary.md file - * @returns {string} - Comment to be posted with the issue assignee's name in it!!! + * @description - This function makes the comment with the issue developer's GitHub handle using the raw preliminary.md file + * @returns {string} - Comment to be posted with the issue developer's name in it!!! */ async function makeComment(){ try { - // Get column name - const columnName = await getColumnName(); + // Get status name + const statusName = (await getItemInfo()).statusName; const isPrework = context.payload.issue.labels.find((label) => label.name == 'Complexity: Prework') ? true : false; const isDraft = context.payload.issue.labels.find((label) => label.name == 'Draft') ? true : false; let filename = 'preliminary-update.md'; - if (columnName == 'New Issue Approval' && !isDraft && !isPrework) { - // If author = assignee, remind them to add draft label, otherwise unnasign and comment + if (statusName == New_Issue_Approval && !isDraft && !isPrework) { + // If author = developer, remind them to add draft label, otherwise unnasign and comment if (context.payload.issue.user.login == issueAsasignee) { filename = 'draft-label-reminder.md'; } else { filename = 'unassign-from-NIA.md'; - // Unassign the issue - await unassignIssue(); + // Unassign the developer + await unAssignDev(); } } @@ -110,8 +125,8 @@ async function makeComment(){ } /** - * @description - This function Check if assignee is in the Admin or Merge Team - * @returns {Boolean} - return true if assignee is member of Admin/Merge team, false otherwise + * @description - This function Check if developer is in the Admin or Merge Team + * @returns {Boolean} - return true if developer is member of Admin/Merge team, false otherwise */ async function memberOfAdminOrMergeTeam() { try { @@ -127,61 +142,57 @@ async function memberOfAdminOrMergeTeam() { org: context.repo.owner })).data.map(member => member.login); - // Return true if assignee is a member of the Admin or Merge Teams + // Return true if developer is a member of the Admin or Merge Teams return (websiteAdminsMembers.includes(assignee) || websiteMergeMembers.includes(assignee)); } catch (error) { - console.log(error); + console.log("Error getting membership status: ", error); } } /** * @description - Check whether developer is assigned to another issue - * @returns {Boolean} - return true if assignee is assinged to another issue/s + * @returns {Boolean} - return true if developer is assinged to another issue/s */ async function assignedToAnotherIssue() { try { - let issues = (await github.rest.issues.listForRepo({ + const issues = (await github.rest.issues.listForRepo({ owner: context.repo.owner, repo: context.repo.repo, assignee: assignee, state: "open", // Only fetch opened issues })).data; - - // Get all cards in 'Emergent Request' Column - const emergentRequestCards = await getAllCardsInColumn(columnsId.get(Emergent_Requests)); - - // Get all cards in 'New Issue Approval' Column - const newIssueApprovalCards = await getAllCardsInColumn(columnsId.get(New_Issue_Approval)); - - // Exclude any issue that apply the conditions below - issues = issues.filter(issue => { - // Check is it's an agendas issue + + const otherIssues = []; + + for(const issue of issues) { + // Check is it's an "Agenda" issue const isAgendaIssue = issue.labels.some(label => label.name === "feature: agenda"); - - // Check if it's a prework issue + + // Check if it's a "Prework" issue const isPreWork = issue.labels.some(label => label.name === "Complexity: Prework"); - - // Check if it's exists in Emergent Request Column - const inEmergentRequestColumn = emergentRequestCards.some(card => card.content_url === issue.url); - - // Check if it's exists in New Issue Approval Column - const inNewIssueApprovalColumn = newIssueApprovalCards.some(card => card.content_url === issue.url); - - // If any of these conditions applied, exclude the issue - return !(isAgendaIssue || isPreWork || inEmergentRequestColumn || inNewIssueApprovalColumn); - }); - - // After excluding above issues and assignee still assigned to another issue/s, return true - return issues.length > 1; + + // Check if it exists in "Emergent Request" Status + const inEmergentRequestStatus = (await getItemInfo()).statusName === Emergent_Requests; + + // Check if it exists in "New Issue Approval" Status + const inNewIssueApprovalStatus = (await getItemInfo()).statusName === New_Issue_Approval; + + // Include the issue only if none of the conditions are met + if(!(isAgendaIssue || isPreWork || inEmergentRequestStatus || inNewIssueApprovalStatus)) + otherIssues.push(issue); + } + + // If developer is assigned to another issue/s, return true + return otherIssues.length > 1; } catch (error) { - console.log(error); + console.log("Error getting other issues: ", error); } } /** - * @description - Unassign assignee from the issue + * @description - Unassign developer from the issue */ -async function unassignIssue() { +async function unAssignDev() { try { await github.rest.issues.removeAssignees({ owner: context.repo.owner, @@ -190,7 +201,7 @@ async function unassignIssue() { assignees: [assignee], }); } catch (error) { - console.log(error); + console.log("Error unassigning developer: ", error); } } @@ -208,11 +219,11 @@ function createComment(filePath) { textToFormat: null } - // Fromat the comment and return it back + // Return teh formatted comment const fromattedComment = formatComment(commentObject, fs); return fromattedComment; } catch (error) { - + console.log("Error creating comment: ", error); } } @@ -221,7 +232,7 @@ function createComment(filePath) { * @param {String} labelName - Name of the label to add */ async function addLabel(labelName) { - try { + try { await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo, @@ -229,12 +240,12 @@ async function addLabel(labelName) { labels: [labelName], }); } catch (error) { - console.log(error); + console.log("Error Adding label: ", error); } } /** - * @description - Get latest assignee, in case there were multimple assignee to the issue + * @description - Get latest assignee, in case there are multimple assignees to the issue * @returns {String} - return the username of the latest assignee */ async function getLatestAssignee() { @@ -243,8 +254,8 @@ async function getLatestAssignee() { const eventdescriptions = await getTimeline(context.payload.issue.number, github, context); - // Adding the code to find out the latest person assigned the issue - for(var i = eventdescriptions.length - 1 ; i>=0; i-=1){ + // Find out the latest developer assigned to the issue + for(let i = eventdescriptions.length - 1 ; i>=0; i-=1){ if(eventdescriptions[i].event == 'assigned'){ issueAssignee = eventdescriptions[i].assignee.login break @@ -253,104 +264,97 @@ async function getLatestAssignee() { return issueAssignee; } catch (error) { - console.log(error); + console.log("Error getting last assignee: ", error); } } /** - * @description - Move the card to 'New Approval Issues' Column + * @description - Get item info using its issue number + * @param {Number} issueNum - Issue number linked to the item + * @returns {Object} - An object containing the item ID and its status name */ -async function moveToNewIssueApproval() { +async function getItemInfo() { try { - const issueNum = context.payload.issue.number; + const query = `query($owner: String!, $repo: String!, $issueNum: Int!) { + repository(owner: $owner, name: $repo) { + issue(number: $issueNum) { + id + projectItems(first: 100) { + nodes { + id + fieldValues(first: 100) { + nodes { + ... on ProjectV2ItemFieldSingleSelectValue { + name + } + } + } + } + } + } + } + }`; + + const variables = { + owner: context.repo.owner, + repo: context.repo.repo, + issueNum: context.payload.issue.number + }; + + const response = await github.graphql(query, variables); - // Get column name assiged with the issue - const columnName = await getColumnName(); + // Extract the list of project items associated with the issue + const projectItems = response.repository.issue.projectItems.nodes; + + // Since there is always one item associated with the issue, + // directly get the item's ID from the first index + const id = projectItems[0].id; - // Get all cards in this column using column id - const cards = await getAllCardsInColumn(columnsId.get(columnName)); + // Iterate through the field values of the first project item + // and find the node that contains the 'name' property, then get its 'name' value + const statusName = projectItems[0].fieldValues.nodes.find(item => item.hasOwnProperty('name')).name; - // Get the issue's card - const card = cards.find(card => card.content_url && card.content_url.includes(`/issues/${issueNum}`)); + return {id, statusName}; - // Move the card to 'New Issue Approval' Column - await github.rest.projects.moveCard({ - card_id: card.id, - position: "top", - column_id: columnsId.get(New_Issue_Approval), - }); } catch (error) { - console.log(error); + console.log("Error getting item info: ", error); } } /** - * @description - Getting the issue's Project Board column name using graphql - * @returns {String} - Column Name + * @description - Update item to a new status + * @param {String} itemId - The ID of the item to be updated + * @param {String} newStatusValue - The new status value to be assigned to the item */ -async function getColumnName() { +async function updateItemStatus(itemId, newStatusValue) { try { - // GraphQL query to fetch issue's column name - const queryColumn = `query($owner:String!, $name:String!, $number:Int!) { - repository(owner:$owner, name:$name) { - issue(number:$number) { - projectCards { nodes { column { name } } } + const mutation = `mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $value: String!) { + updateProjectV2ItemFieldValue(input: { + projectId: $projectId, + itemId: $itemId, + fieldId: $fieldId, + value: { + singleSelectOptionId: $value + } + }) { + projectV2Item { + id } } - }`; - - // Variables to be passed to the GraphQL query + }` + const variables = { - owner: context.repo.owner, - name: context.repo.repo, - number: context.payload.issue.number + projectId: PROJECT_ID, + itemId: itemId, + fieldId: STATUS_FIELD_ID, + value: newStatusValue }; - - // Making the GraphQL request to get column name - const response = await github.graphql(queryColumn, variables); - const columnName = response.repository.issue.projectCards.nodes[0].column.name; - - // Return column name - return columnName; - } catch (error) { - console.log(error); - } -} -/** - * @description - Fetch all cards inside issue's column - * @param {Number} columnId - The id for the issue's column - * @returns {Object[]} - Array of card objects - */ -async function getAllCardsInColumn(columnId) { - let allCards = []; - let page = 1; - const perPage = 100; // Maximum number of cards per page + await github.graphql(mutation, variables); - try { - // Using pagination since max number of cards to fetch per request is only 100 - while (true) { - const cards = (await github.rest.projects.listCards({ - column_id: columnId, - page: page, - per_page: perPage, - })).data; - - allCards = allCards.concat(cards); - - // Berak if there are no more cards - if (cards.length < perPage) { - break; - } - - // Go to next page - page++; - } - - return allCards; } catch (error) { - console.log(error); + console.log("Error moving item: ", error); } } - -module.exports = main + +module.exports = main; \ No newline at end of file From 994e3de5c04bf84d7eb651a79903b9e13d43161a Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Sun, 30 Jun 2024 20:27:25 -0700 Subject: [PATCH 26/62] Update to ProjectV2 --- .../add-preliminary-comment/preliminary-update-comment.js | 1 + 1 file changed, 1 insertion(+) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index 0588f19a59..754a19da99 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -44,6 +44,7 @@ async function main({ g, c }, { shouldPost, issueNum }) { try { github = g; context = c; + // Get the lates developer in case there are multiple assignees assignee = await getLatestAssignee(); From fb809ced6e50a7baffec9a848b808ef0f6c5c6c9 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Sun, 30 Jun 2024 20:33:49 -0700 Subject: [PATCH 27/62] Update to ProjectV2 --- .github/workflows/issue-trigger.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/issue-trigger.yml b/.github/workflows/issue-trigger.yml index 6b53500b9a..2108fb8d9d 100644 --- a/.github/workflows/issue-trigger.yml +++ b/.github/workflows/issue-trigger.yml @@ -52,7 +52,6 @@ jobs: uses: actions/github-script@v7 id: check-labels-prelim with: - github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} script: | const script = require('./github-actions/trigger-issue/add-preliminary-comment/check-label-preliminary-update.js') const checklabels = script({g: github, c: context}) @@ -63,7 +62,6 @@ jobs: id: assigned-comment uses: actions/github-script@v7 with: - github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} script: | const results = ${{ steps.check-labels-prelim.outputs.result }} const script = require('./github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js') From d8aeed9c64b0d642fdb402b67e9ece83af6babd1 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Sun, 30 Jun 2024 23:03:46 -0700 Subject: [PATCH 28/62] Fix minor erros --- .../preliminary-update-comment.js | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index 0588f19a59..f3286d85cc 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -105,7 +105,7 @@ async function makeComment(){ if (statusName == New_Issue_Approval && !isDraft && !isPrework) { // If author = developer, remind them to add draft label, otherwise unnasign and comment - if (context.payload.issue.user.login == issueAsasignee) { + if (context.payload.issue.user.login == assignee) { filename = 'draft-label-reminder.md'; } else { filename = 'unassign-from-NIA.md'; @@ -133,13 +133,13 @@ async function memberOfAdminOrMergeTeam() { // Get all members in Admin Team const websiteAdminsMembers = (await github.rest.teams.listMembersInOrg({ team_slug: "website-admins", - org: context.repo.owner + org: "hackforla" })).data.map(member => member.login); // Get all members in Merge Team const websiteMergeMembers = (await github.rest.teams.listMembersInOrg({ team_slug: "website-merge", - org: context.repo.owner + org: "hackforla" })).data.map(member => member.login); // Return true if developer is a member of the Admin or Merge Teams @@ -156,8 +156,8 @@ async function memberOfAdminOrMergeTeam() { async function assignedToAnotherIssue() { try { const issues = (await github.rest.issues.listForRepo({ - owner: context.repo.owner, - repo: context.repo.repo, + owner: "moazDev1", + repo: "website", assignee: assignee, state: "open", // Only fetch opened issues })).data; @@ -183,7 +183,7 @@ async function assignedToAnotherIssue() { } // If developer is assigned to another issue/s, return true - return otherIssues.length > 1; + return otherIssues.length > 0; } catch (error) { console.log("Error getting other issues: ", error); } @@ -195,8 +195,8 @@ async function assignedToAnotherIssue() { async function unAssignDev() { try { await github.rest.issues.removeAssignees({ - owner: context.repo.owner, - repo: context.repo.repo, + owner: "moazDev1", + repo: "website", issue_number: context.payload.issue.number, assignees: [assignee], }); @@ -234,8 +234,8 @@ function createComment(filePath) { async function addLabel(labelName) { try { await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, + owner: "moazDev1", + repo: "website", issue_number: context.payload.issue.number, labels: [labelName], }); @@ -296,8 +296,8 @@ async function getItemInfo() { }`; const variables = { - owner: context.repo.owner, - repo: context.repo.repo, + owner: "moazDev1", + repo: "website", issueNum: context.payload.issue.number }; From 3ae555f84d8fa6127b0c2d358761e11bc06a4afe Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Sun, 30 Jun 2024 23:05:13 -0700 Subject: [PATCH 29/62] Fix minor erros --- .../add-preliminary-comment/preliminary-update-comment.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index 754a19da99..94989beb3a 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -106,7 +106,7 @@ async function makeComment(){ if (statusName == New_Issue_Approval && !isDraft && !isPrework) { // If author = developer, remind them to add draft label, otherwise unnasign and comment - if (context.payload.issue.user.login == issueAsasignee) { + if (context.payload.issue.user.login == assignee) { filename = 'draft-label-reminder.md'; } else { filename = 'unassign-from-NIA.md'; @@ -184,7 +184,7 @@ async function assignedToAnotherIssue() { } // If developer is assigned to another issue/s, return true - return otherIssues.length > 1; + return otherIssues.length > 0; } catch (error) { console.log("Error getting other issues: ", error); } From 74fc2172b56e35c7c49ade16b6d74628daa714bb Mon Sep 17 00:00:00 2001 From: Moaz Ali <32923319+moazDev1@users.noreply.github.com> Date: Sun, 30 Jun 2024 23:08:02 -0700 Subject: [PATCH 30/62] Revert "Fix minor erros" --- .../add-preliminary-comment/preliminary-update-comment.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index 94989beb3a..754a19da99 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -106,7 +106,7 @@ async function makeComment(){ if (statusName == New_Issue_Approval && !isDraft && !isPrework) { // If author = developer, remind them to add draft label, otherwise unnasign and comment - if (context.payload.issue.user.login == assignee) { + if (context.payload.issue.user.login == issueAsasignee) { filename = 'draft-label-reminder.md'; } else { filename = 'unassign-from-NIA.md'; @@ -184,7 +184,7 @@ async function assignedToAnotherIssue() { } // If developer is assigned to another issue/s, return true - return otherIssues.length > 0; + return otherIssues.length > 1; } catch (error) { console.log("Error getting other issues: ", error); } From 761da496467dcdda94311acb8662e8f227ad95e9 Mon Sep 17 00:00:00 2001 From: Moaz Ali <32923319+moazDev1@users.noreply.github.com> Date: Sun, 30 Jun 2024 23:09:00 -0700 Subject: [PATCH 31/62] Revert "Notify multiple issues 4505" --- .github/workflows/issue-trigger.yml | 1 + .../multiple-issue-reminder.md | 6 - .../preliminary-update-comment.js | 408 ++++-------------- 3 files changed, 77 insertions(+), 338 deletions(-) delete mode 100644 github-actions/trigger-issue/add-preliminary-comment/multiple-issue-reminder.md diff --git a/.github/workflows/issue-trigger.yml b/.github/workflows/issue-trigger.yml index 2108fb8d9d..14323a68b9 100644 --- a/.github/workflows/issue-trigger.yml +++ b/.github/workflows/issue-trigger.yml @@ -67,6 +67,7 @@ jobs: const script = require('./github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js') script({g: github, c:context}, results) + # The following steps only apply to issues with `Feature: Feature Branch` label # Note: These steps will be unnecessary and should be removed once Feature Branch goes live Add-Feature-Branch-Comment: diff --git a/github-actions/trigger-issue/add-preliminary-comment/multiple-issue-reminder.md b/github-actions/trigger-issue/add-preliminary-comment/multiple-issue-reminder.md deleted file mode 100644 index f05ab4820d..0000000000 --- a/github-actions/trigger-issue/add-preliminary-comment/multiple-issue-reminder.md +++ /dev/null @@ -1,6 +0,0 @@ - -Hello @${issueAssignee}, we appreciate you taking on this issue, however it looks like you're already working on another issue at this time. Please wait until your current issue is merged before taking on another issue. :) - -We are going to unassign you from this issue so you can focus on your current issue. - -Hfla appreciates you! :) \ No newline at end of file diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index 754a19da99..e890bb8a3b 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -5,357 +5,101 @@ const formatComment = require('../../utils/format-comment'); const getTimeline = require('../../utils/get-timeline'); // Global variables -let github; -let context; -let assignee; - -const PROJECT_ID = "PVT_kwHOAfZet84AkAVr"; - -// The field containing all statuses -const STATUS_FIELD_ID = "PVTSSF_lAHOAfZet84AkAVrzgcR5Tc"; - -const Emergent_Requests = "Emergent Requests"; -const New_Issue_Approval = "New Issue Approval"; -const Prioritized_Backlog = "Prioritized backlog"; -const In_Progress = "In progress (actively working)"; - -const statusesValues = new Map([ - [Emergent_Requests, "d468e876"], - [New_Issue_Approval, "83187325"], - [Prioritized_Backlog, "434304a8"], - [In_Progress, "9a878e9c"], -]); - -const READY_FOR_DEV_LABEL = "ready for dev lead"; +var github; +var context; /** - * @description This function is the entry point into the JavaScript file. It formats the - * markdown file based on the result of the previous step, checks if the developer is allowed - * to be assigned to this issue, and performs the following actions: - * - If the developer is not allowed, posts an "unassigned" comment, unassigns the developer, - * and updates the item status. - * - Posts the formatted markdown to the issue. + * @description - This function is the entry point into the javascript file, it formats the md file based on the result of the previous step and then posts it to the issue * @param {Object} g - GitHub object - * @param {Object} c - Context object - * @param {Boolean} shouldPost - The previous GitHub action's result - * @param {Number} issueNum - The number of the issue where the post will be made + * @param {Object} c - context object + * @param {Boolean} actionResult - the previous gh-action's result + * @param {Number} issueNum - the number of the issue where the post will be made */ -async function main({ g, c }, { shouldPost, issueNum }) { - try { - github = g; - context = c; - - // Get the lates developer in case there are multiple assignees - assignee = await getLatestAssignee(); - - // If the previous action returns false, stop here - if(shouldPost === false) - return; - - // Check if developer is allowed to work on this issue - const isAdminOrMerge = await memberOfAdminOrMergeTeam(); - const isAssignedToAnotherIssues = await assignedToAnotherIssue(); - - // If developer is not in Admin or Merge Teams - // and assigned to another issue/s, do the following: - if(!isAdminOrMerge && isAssignedToAnotherIssues) { - - // Create and post a comment using the template in this file - const fileName = "multiple-issue-reminder.md"; - const filePath = './github-actions/trigger-issue/add-preliminary-comment/' + fileName; - const unAssigningComment = createComment(filePath); - await postComment(issueNum, unAssigningComment, github, context); - - await unAssignDev(); // Unassign the developer - await addLabel(READY_FOR_DEV_LABEL); // Add 'ready for dev lead' label - - // Update item status to "New Issue Approval" - const item = await getItemInfo(); - await updateItemStatus(item.id, statusesValues.get(New_Issue_Approval)); - } - // Otherwise, post the normal comment - else { - const instructions = await makeComment(); - if(instructions !== null){ - // the actual creation of the comment in github - await postComment(issueNum, instructions, github, context); - - // Update item status to "In progress (actively working)" - const item = await getItemInfo(); - await updateItemStatus(item.id, statusesValues.get(In_Progress)); - } - } - } catch (error) { - console.log(error); +async function main({ g, c }, { shouldPost, issueNum }){ + github = g; + context = c; + // If the previous action returned a false, stop here + if (shouldPost === false) { + console.log('Issue creator not a team member, no need to post comment.'); + return; } -} - -/** - * @description - This function makes the comment with the issue developer's GitHub handle using the raw preliminary.md file - * @returns {string} - Comment to be posted with the issue developer's name in it!!! - */ -async function makeComment(){ - try { - // Get status name - const statusName = (await getItemInfo()).statusName; - - const isPrework = context.payload.issue.labels.find((label) => label.name == 'Complexity: Prework') ? true : false; - const isDraft = context.payload.issue.labels.find((label) => label.name == 'Draft') ? true : false; - - let filename = 'preliminary-update.md'; - - if (statusName == New_Issue_Approval && !isDraft && !isPrework) { - // If author = developer, remind them to add draft label, otherwise unnasign and comment - if (context.payload.issue.user.login == issueAsasignee) { - filename = 'draft-label-reminder.md'; - } else { - filename = 'unassign-from-NIA.md'; - - // Unassign the developer - await unAssignDev(); - } + // Else we make the comment with the issue creator's GitHub handle instead of the placeholder + else { + const instructions = await makeComment(); + if (instructions !== null) { + // The actual creation of the comment in GitHub + await postComment(issueNum, instructions, github, context); } - - const filePath = './github-actions/trigger-issue/add-preliminary-comment/' + filename; - - const comment = createComment(filePath); - return comment; - } catch (error) { - console.log(error); - } -} - -/** - * @description - This function Check if developer is in the Admin or Merge Team - * @returns {Boolean} - return true if developer is member of Admin/Merge team, false otherwise - */ -async function memberOfAdminOrMergeTeam() { - try { - // Get all members in Admin Team - const websiteAdminsMembers = (await github.rest.teams.listMembersInOrg({ - team_slug: "website-admins", - org: context.repo.owner - })).data.map(member => member.login); - - // Get all members in Merge Team - const websiteMergeMembers = (await github.rest.teams.listMembersInOrg({ - team_slug: "website-merge", - org: context.repo.owner - })).data.map(member => member.login); - - // Return true if developer is a member of the Admin or Merge Teams - return (websiteAdminsMembers.includes(assignee) || websiteMergeMembers.includes(assignee)); - } catch (error) { - console.log("Error getting membership status: ", error); } } /** - * @description - Check whether developer is assigned to another issue - * @returns {Boolean} - return true if developer is assinged to another issue/s + * @description - This function makes the comment with the issue assignee's GitHub handle using the raw preliminary.md file + * @returns {string} - Comment to be posted with the issue assignee's name in it!!! */ -async function assignedToAnotherIssue() { - try { - const issues = (await github.rest.issues.listForRepo({ - owner: context.repo.owner, - repo: context.repo.repo, - assignee: assignee, - state: "open", // Only fetch opened issues - })).data; - - const otherIssues = []; - - for(const issue of issues) { - // Check is it's an "Agenda" issue - const isAgendaIssue = issue.labels.some(label => label.name === "feature: agenda"); - - // Check if it's a "Prework" issue - const isPreWork = issue.labels.some(label => label.name === "Complexity: Prework"); - - // Check if it exists in "Emergent Request" Status - const inEmergentRequestStatus = (await getItemInfo()).statusName === Emergent_Requests; - - // Check if it exists in "New Issue Approval" Status - const inNewIssueApprovalStatus = (await getItemInfo()).statusName === New_Issue_Approval; - - // Include the issue only if none of the conditions are met - if(!(isAgendaIssue || isPreWork || inEmergentRequestStatus || inNewIssueApprovalStatus)) - otherIssues.push(issue); +async function makeComment() { + // Setting all the variables which formatComment is to be called with + let issueAssignee = context.payload.issue.assignee.login; + let filename = 'preliminary-update.md'; + const eventdescriptions = await getTimeline(context.payload.issue.number, github, context); + + // Adding the code to find out the latest person assigned the issue + for (var i = eventdescriptions.length - 1 ; i>=0; i-=1) { + if (eventdescriptions[i].event == 'assigned') { + issueAssignee = eventdescriptions[i].assignee.login; + break; } - - // If developer is assigned to another issue/s, return true - return otherIssues.length > 1; - } catch (error) { - console.log("Error getting other issues: ", error); - } -} - -/** - * @description - Unassign developer from the issue - */ -async function unAssignDev() { - try { - await github.rest.issues.removeAssignees({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.issue.number, - assignees: [assignee], - }); - } catch (error) { - console.log("Error unassigning developer: ", error); } -} -/** - * @description - Create a comment using the template of the file in 'filePath' - * @param {String} filePath - file path for the used template - * @returns {String} - return fromatted comment - */ -function createComment(filePath) { - try { - const commentObject = { - replacementString: assignee, - placeholderString: '${assignee}', - filePathToFormat: filePath, - textToFormat: null - } - - // Return teh formatted comment - const fromattedComment = formatComment(commentObject, fs); - return fromattedComment; - } catch (error) { - console.log("Error creating comment: ", error); - } -} - -/** - * @description - Add 'ready for dev lead' label to the issue - * @param {String} labelName - Name of the label to add - */ -async function addLabel(labelName) { - try { - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.issue.number, - labels: [labelName], - }); - } catch (error) { - console.log("Error Adding label: ", error); - } -} - -/** - * @description - Get latest assignee, in case there are multimple assignees to the issue - * @returns {String} - return the username of the latest assignee - */ -async function getLatestAssignee() { - try { - let issueAssignee = context.payload.issue.assignee.login; - - const eventdescriptions = await getTimeline(context.payload.issue.number, github, context); - - // Find out the latest developer assigned to the issue - for(let i = eventdescriptions.length - 1 ; i>=0; i-=1){ - if(eventdescriptions[i].event == 'assigned'){ - issueAssignee = eventdescriptions[i].assignee.login - break + // BELOW through line 89 +/-, disabling the 'column' checks becaues these are not compatible + // with Projects Beta. This code needs to be refactored using GraphQL, ProjectsV2, and 'status' field. + /* + // Getting the issue's Project Board column name + const queryColumn = `query($owner:String!, $name:String!, $number:Int!) { + repository(owner:$owner, name:$name) { + issue(number:$number) { + projectCards { nodes { column { name } } } } } - - return issueAssignee; - } catch (error) { - console.log("Error getting last assignee: ", error); - } -} - -/** - * @description - Get item info using its issue number - * @param {Number} issueNum - Issue number linked to the item - * @returns {Object} - An object containing the item ID and its status name - */ -async function getItemInfo() { - try { - const query = `query($owner: String!, $repo: String!, $issueNum: Int!) { - repository(owner: $owner, name: $repo) { - issue(number: $issueNum) { - id - projectItems(first: 100) { - nodes { - id - fieldValues(first: 100) { - nodes { - ... on ProjectV2ItemFieldSingleSelectValue { - name - } - } - } - } - } - } - } - }`; - + }`; const variables = { owner: context.repo.owner, - repo: context.repo.repo, - issueNum: context.payload.issue.number + name: context.repo.repo, + number: context.payload.issue.number }; - - const response = await github.graphql(query, variables); - - // Extract the list of project items associated with the issue - const projectItems = response.repository.issue.projectItems.nodes; - - // Since there is always one item associated with the issue, - // directly get the item's ID from the first index - const id = projectItems[0].id; - - // Iterate through the field values of the first project item - // and find the node that contains the 'name' property, then get its 'name' value - const statusName = projectItems[0].fieldValues.nodes.find(item => item.hasOwnProperty('name')).name; - - return {id, statusName}; - - } catch (error) { - console.log("Error getting item info: ", error); + const resColumn = await github.graphql(queryColumn, variables); + const columnName = resColumn.repository.issue.projectCards.nodes[0].column.name; + const isPrework = context.payload.issue.labels.find((label) => label.name == 'Complexity: Prework') ? true : false; + const isDraft = context.payload.issue.labels.find((label) => label.name == 'Draft') ? true : false; + + if (columnName == 'New Issue Approval' && !isDraft && !isPrework) { + // If author == assignee, remind them to add `Draft` label, otherwise unnasign and comment + if (context.payload.issue.user.login == issueAssignee) { + filename = 'draft-label-reminder.md'; + } else { + filename = 'unassign-from-NIA.md'; + + await github.rest.issues.removeAssignees({ + owner: variables.owner, + repo: variables.name, + issue_number: variables.number, + assignees: [issueAssignee], + }); + } } -} - -/** - * @description - Update item to a new status - * @param {String} itemId - The ID of the item to be updated - * @param {String} newStatusValue - The new status value to be assigned to the item - */ -async function updateItemStatus(itemId, newStatusValue) { - try { - const mutation = `mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $value: String!) { - updateProjectV2ItemFieldValue(input: { - projectId: $projectId, - itemId: $itemId, - fieldId: $fieldId, - value: { - singleSelectOptionId: $value - } - }) { - projectV2Item { - id - } - } - }` - - const variables = { - projectId: PROJECT_ID, - itemId: itemId, - fieldId: STATUS_FIELD_ID, - value: newStatusValue - }; - - await github.graphql(mutation, variables); + */ + + let filePathToFormat = './github-actions/trigger-issue/add-preliminary-comment/' + filename; + const commentObject = { + replacementString: issueAssignee, + placeholderString: '${issueAssignee}', + filePathToFormat: filePathToFormat, + textToFormat: null + }; - } catch (error) { - console.log("Error moving item: ", error); - } + // Creating the comment with issue assignee's name and returning it! + const commentWithIssueAssignee = formatComment(commentObject, fs); + return commentWithIssueAssignee; } - -module.exports = main; \ No newline at end of file + +module.exports = main; From cfda28ae07d99b9108de68c6bbbb382eab26d99a Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Mon, 1 Jul 2024 00:47:50 -0700 Subject: [PATCH 32/62] Test --- .../add-preliminary-comment/preliminary-update-comment.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index 94989beb3a..8335d458c3 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -49,8 +49,8 @@ async function main({ g, c }, { shouldPost, issueNum }) { assignee = await getLatestAssignee(); // If the previous action returns false, stop here - if(shouldPost === false) - return; + // if(shouldPost === false) + // return; // Check if developer is allowed to work on this issue const isAdminOrMerge = await memberOfAdminOrMergeTeam(); From 85e140b66e56d9efb9baebc812fc57f4a44a1017 Mon Sep 17 00:00:00 2001 From: Moaz Ali <32923319+moazDev1@users.noreply.github.com> Date: Mon, 1 Jul 2024 01:04:02 -0700 Subject: [PATCH 33/62] Revert "Test" --- .../preliminary-update-comment.js | 408 ++++-------------- 1 file changed, 76 insertions(+), 332 deletions(-) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index 8335d458c3..e890bb8a3b 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -5,357 +5,101 @@ const formatComment = require('../../utils/format-comment'); const getTimeline = require('../../utils/get-timeline'); // Global variables -let github; -let context; -let assignee; - -const PROJECT_ID = "PVT_kwHOAfZet84AkAVr"; - -// The field containing all statuses -const STATUS_FIELD_ID = "PVTSSF_lAHOAfZet84AkAVrzgcR5Tc"; - -const Emergent_Requests = "Emergent Requests"; -const New_Issue_Approval = "New Issue Approval"; -const Prioritized_Backlog = "Prioritized backlog"; -const In_Progress = "In progress (actively working)"; - -const statusesValues = new Map([ - [Emergent_Requests, "d468e876"], - [New_Issue_Approval, "83187325"], - [Prioritized_Backlog, "434304a8"], - [In_Progress, "9a878e9c"], -]); - -const READY_FOR_DEV_LABEL = "ready for dev lead"; +var github; +var context; /** - * @description This function is the entry point into the JavaScript file. It formats the - * markdown file based on the result of the previous step, checks if the developer is allowed - * to be assigned to this issue, and performs the following actions: - * - If the developer is not allowed, posts an "unassigned" comment, unassigns the developer, - * and updates the item status. - * - Posts the formatted markdown to the issue. + * @description - This function is the entry point into the javascript file, it formats the md file based on the result of the previous step and then posts it to the issue * @param {Object} g - GitHub object - * @param {Object} c - Context object - * @param {Boolean} shouldPost - The previous GitHub action's result - * @param {Number} issueNum - The number of the issue where the post will be made + * @param {Object} c - context object + * @param {Boolean} actionResult - the previous gh-action's result + * @param {Number} issueNum - the number of the issue where the post will be made */ -async function main({ g, c }, { shouldPost, issueNum }) { - try { - github = g; - context = c; - - // Get the lates developer in case there are multiple assignees - assignee = await getLatestAssignee(); - - // If the previous action returns false, stop here - // if(shouldPost === false) - // return; - - // Check if developer is allowed to work on this issue - const isAdminOrMerge = await memberOfAdminOrMergeTeam(); - const isAssignedToAnotherIssues = await assignedToAnotherIssue(); - - // If developer is not in Admin or Merge Teams - // and assigned to another issue/s, do the following: - if(!isAdminOrMerge && isAssignedToAnotherIssues) { - - // Create and post a comment using the template in this file - const fileName = "multiple-issue-reminder.md"; - const filePath = './github-actions/trigger-issue/add-preliminary-comment/' + fileName; - const unAssigningComment = createComment(filePath); - await postComment(issueNum, unAssigningComment, github, context); - - await unAssignDev(); // Unassign the developer - await addLabel(READY_FOR_DEV_LABEL); // Add 'ready for dev lead' label - - // Update item status to "New Issue Approval" - const item = await getItemInfo(); - await updateItemStatus(item.id, statusesValues.get(New_Issue_Approval)); - } - // Otherwise, post the normal comment - else { - const instructions = await makeComment(); - if(instructions !== null){ - // the actual creation of the comment in github - await postComment(issueNum, instructions, github, context); - - // Update item status to "In progress (actively working)" - const item = await getItemInfo(); - await updateItemStatus(item.id, statusesValues.get(In_Progress)); - } - } - } catch (error) { - console.log(error); +async function main({ g, c }, { shouldPost, issueNum }){ + github = g; + context = c; + // If the previous action returned a false, stop here + if (shouldPost === false) { + console.log('Issue creator not a team member, no need to post comment.'); + return; } -} - -/** - * @description - This function makes the comment with the issue developer's GitHub handle using the raw preliminary.md file - * @returns {string} - Comment to be posted with the issue developer's name in it!!! - */ -async function makeComment(){ - try { - // Get status name - const statusName = (await getItemInfo()).statusName; - - const isPrework = context.payload.issue.labels.find((label) => label.name == 'Complexity: Prework') ? true : false; - const isDraft = context.payload.issue.labels.find((label) => label.name == 'Draft') ? true : false; - - let filename = 'preliminary-update.md'; - - if (statusName == New_Issue_Approval && !isDraft && !isPrework) { - // If author = developer, remind them to add draft label, otherwise unnasign and comment - if (context.payload.issue.user.login == assignee) { - filename = 'draft-label-reminder.md'; - } else { - filename = 'unassign-from-NIA.md'; - - // Unassign the developer - await unAssignDev(); - } + // Else we make the comment with the issue creator's GitHub handle instead of the placeholder + else { + const instructions = await makeComment(); + if (instructions !== null) { + // The actual creation of the comment in GitHub + await postComment(issueNum, instructions, github, context); } - - const filePath = './github-actions/trigger-issue/add-preliminary-comment/' + filename; - - const comment = createComment(filePath); - return comment; - } catch (error) { - console.log(error); - } -} - -/** - * @description - This function Check if developer is in the Admin or Merge Team - * @returns {Boolean} - return true if developer is member of Admin/Merge team, false otherwise - */ -async function memberOfAdminOrMergeTeam() { - try { - // Get all members in Admin Team - const websiteAdminsMembers = (await github.rest.teams.listMembersInOrg({ - team_slug: "website-admins", - org: context.repo.owner - })).data.map(member => member.login); - - // Get all members in Merge Team - const websiteMergeMembers = (await github.rest.teams.listMembersInOrg({ - team_slug: "website-merge", - org: context.repo.owner - })).data.map(member => member.login); - - // Return true if developer is a member of the Admin or Merge Teams - return (websiteAdminsMembers.includes(assignee) || websiteMergeMembers.includes(assignee)); - } catch (error) { - console.log("Error getting membership status: ", error); } } /** - * @description - Check whether developer is assigned to another issue - * @returns {Boolean} - return true if developer is assinged to another issue/s + * @description - This function makes the comment with the issue assignee's GitHub handle using the raw preliminary.md file + * @returns {string} - Comment to be posted with the issue assignee's name in it!!! */ -async function assignedToAnotherIssue() { - try { - const issues = (await github.rest.issues.listForRepo({ - owner: context.repo.owner, - repo: context.repo.repo, - assignee: assignee, - state: "open", // Only fetch opened issues - })).data; - - const otherIssues = []; - - for(const issue of issues) { - // Check is it's an "Agenda" issue - const isAgendaIssue = issue.labels.some(label => label.name === "feature: agenda"); - - // Check if it's a "Prework" issue - const isPreWork = issue.labels.some(label => label.name === "Complexity: Prework"); - - // Check if it exists in "Emergent Request" Status - const inEmergentRequestStatus = (await getItemInfo()).statusName === Emergent_Requests; - - // Check if it exists in "New Issue Approval" Status - const inNewIssueApprovalStatus = (await getItemInfo()).statusName === New_Issue_Approval; - - // Include the issue only if none of the conditions are met - if(!(isAgendaIssue || isPreWork || inEmergentRequestStatus || inNewIssueApprovalStatus)) - otherIssues.push(issue); +async function makeComment() { + // Setting all the variables which formatComment is to be called with + let issueAssignee = context.payload.issue.assignee.login; + let filename = 'preliminary-update.md'; + const eventdescriptions = await getTimeline(context.payload.issue.number, github, context); + + // Adding the code to find out the latest person assigned the issue + for (var i = eventdescriptions.length - 1 ; i>=0; i-=1) { + if (eventdescriptions[i].event == 'assigned') { + issueAssignee = eventdescriptions[i].assignee.login; + break; } - - // If developer is assigned to another issue/s, return true - return otherIssues.length > 0; - } catch (error) { - console.log("Error getting other issues: ", error); - } -} - -/** - * @description - Unassign developer from the issue - */ -async function unAssignDev() { - try { - await github.rest.issues.removeAssignees({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.issue.number, - assignees: [assignee], - }); - } catch (error) { - console.log("Error unassigning developer: ", error); } -} -/** - * @description - Create a comment using the template of the file in 'filePath' - * @param {String} filePath - file path for the used template - * @returns {String} - return fromatted comment - */ -function createComment(filePath) { - try { - const commentObject = { - replacementString: assignee, - placeholderString: '${assignee}', - filePathToFormat: filePath, - textToFormat: null - } - - // Return teh formatted comment - const fromattedComment = formatComment(commentObject, fs); - return fromattedComment; - } catch (error) { - console.log("Error creating comment: ", error); - } -} - -/** - * @description - Add 'ready for dev lead' label to the issue - * @param {String} labelName - Name of the label to add - */ -async function addLabel(labelName) { - try { - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.issue.number, - labels: [labelName], - }); - } catch (error) { - console.log("Error Adding label: ", error); - } -} - -/** - * @description - Get latest assignee, in case there are multimple assignees to the issue - * @returns {String} - return the username of the latest assignee - */ -async function getLatestAssignee() { - try { - let issueAssignee = context.payload.issue.assignee.login; - - const eventdescriptions = await getTimeline(context.payload.issue.number, github, context); - - // Find out the latest developer assigned to the issue - for(let i = eventdescriptions.length - 1 ; i>=0; i-=1){ - if(eventdescriptions[i].event == 'assigned'){ - issueAssignee = eventdescriptions[i].assignee.login - break + // BELOW through line 89 +/-, disabling the 'column' checks becaues these are not compatible + // with Projects Beta. This code needs to be refactored using GraphQL, ProjectsV2, and 'status' field. + /* + // Getting the issue's Project Board column name + const queryColumn = `query($owner:String!, $name:String!, $number:Int!) { + repository(owner:$owner, name:$name) { + issue(number:$number) { + projectCards { nodes { column { name } } } } } - - return issueAssignee; - } catch (error) { - console.log("Error getting last assignee: ", error); - } -} - -/** - * @description - Get item info using its issue number - * @param {Number} issueNum - Issue number linked to the item - * @returns {Object} - An object containing the item ID and its status name - */ -async function getItemInfo() { - try { - const query = `query($owner: String!, $repo: String!, $issueNum: Int!) { - repository(owner: $owner, name: $repo) { - issue(number: $issueNum) { - id - projectItems(first: 100) { - nodes { - id - fieldValues(first: 100) { - nodes { - ... on ProjectV2ItemFieldSingleSelectValue { - name - } - } - } - } - } - } - } - }`; - + }`; const variables = { owner: context.repo.owner, - repo: context.repo.repo, - issueNum: context.payload.issue.number + name: context.repo.repo, + number: context.payload.issue.number }; - - const response = await github.graphql(query, variables); - - // Extract the list of project items associated with the issue - const projectItems = response.repository.issue.projectItems.nodes; - - // Since there is always one item associated with the issue, - // directly get the item's ID from the first index - const id = projectItems[0].id; - - // Iterate through the field values of the first project item - // and find the node that contains the 'name' property, then get its 'name' value - const statusName = projectItems[0].fieldValues.nodes.find(item => item.hasOwnProperty('name')).name; - - return {id, statusName}; - - } catch (error) { - console.log("Error getting item info: ", error); + const resColumn = await github.graphql(queryColumn, variables); + const columnName = resColumn.repository.issue.projectCards.nodes[0].column.name; + const isPrework = context.payload.issue.labels.find((label) => label.name == 'Complexity: Prework') ? true : false; + const isDraft = context.payload.issue.labels.find((label) => label.name == 'Draft') ? true : false; + + if (columnName == 'New Issue Approval' && !isDraft && !isPrework) { + // If author == assignee, remind them to add `Draft` label, otherwise unnasign and comment + if (context.payload.issue.user.login == issueAssignee) { + filename = 'draft-label-reminder.md'; + } else { + filename = 'unassign-from-NIA.md'; + + await github.rest.issues.removeAssignees({ + owner: variables.owner, + repo: variables.name, + issue_number: variables.number, + assignees: [issueAssignee], + }); + } } -} - -/** - * @description - Update item to a new status - * @param {String} itemId - The ID of the item to be updated - * @param {String} newStatusValue - The new status value to be assigned to the item - */ -async function updateItemStatus(itemId, newStatusValue) { - try { - const mutation = `mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $value: String!) { - updateProjectV2ItemFieldValue(input: { - projectId: $projectId, - itemId: $itemId, - fieldId: $fieldId, - value: { - singleSelectOptionId: $value - } - }) { - projectV2Item { - id - } - } - }` - - const variables = { - projectId: PROJECT_ID, - itemId: itemId, - fieldId: STATUS_FIELD_ID, - value: newStatusValue - }; - - await github.graphql(mutation, variables); + */ + + let filePathToFormat = './github-actions/trigger-issue/add-preliminary-comment/' + filename; + const commentObject = { + replacementString: issueAssignee, + placeholderString: '${issueAssignee}', + filePathToFormat: filePathToFormat, + textToFormat: null + }; - } catch (error) { - console.log("Error moving item: ", error); - } + // Creating the comment with issue assignee's name and returning it! + const commentWithIssueAssignee = formatComment(commentObject, fs); + return commentWithIssueAssignee; } - -module.exports = main; \ No newline at end of file + +module.exports = main; From dbb19734c49d886bef2deef7f16a045ff799492f Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Mon, 1 Jul 2024 01:06:52 -0700 Subject: [PATCH 34/62] Update to ProjectV2 --- .../add-preliminary-comment/preliminary-update-comment.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index 8335d458c3..09e3d19524 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -9,10 +9,10 @@ let github; let context; let assignee; -const PROJECT_ID = "PVT_kwHOAfZet84AkAVr"; +const PROJECT_ID = "PVT_kwDOALGKNs4Ajuck"; // The field containing all statuses -const STATUS_FIELD_ID = "PVTSSF_lAHOAfZet84AkAVrzgcR5Tc"; +const STATUS_FIELD_ID = "PVTSSF_lADOALGKNs4AjuckzgcCutQ"; const Emergent_Requests = "Emergent Requests"; const New_Issue_Approval = "New Issue Approval"; @@ -49,8 +49,8 @@ async function main({ g, c }, { shouldPost, issueNum }) { assignee = await getLatestAssignee(); // If the previous action returns false, stop here - // if(shouldPost === false) - // return; + if(shouldPost === false) + return; // Check if developer is allowed to work on this issue const isAdminOrMerge = await memberOfAdminOrMergeTeam(); From c6b51f94ba7e7274bf13a845fef17c4da352da57 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Tue, 2 Jul 2024 16:30:21 -0700 Subject: [PATCH 35/62] test --- .github/workflows/issue-trigger.yml | 2 ++ .../add-preliminary-comment/preliminary-update-comment.js | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/issue-trigger.yml b/.github/workflows/issue-trigger.yml index 14323a68b9..36e2f93d4c 100644 --- a/.github/workflows/issue-trigger.yml +++ b/.github/workflows/issue-trigger.yml @@ -15,6 +15,7 @@ jobs: id: check-labels uses: actions/github-script@v7 with: + github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} script: | const script = require('./github-actions/trigger-issue/add-missing-labels-to-issues/check-labels.js') const checkLabels = script({g: github, c: context}) @@ -52,6 +53,7 @@ jobs: uses: actions/github-script@v7 id: check-labels-prelim with: + github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} script: | const script = require('./github-actions/trigger-issue/add-preliminary-comment/check-label-preliminary-update.js') const checklabels = script({g: github, c: context}) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index 09e3d19524..8335d458c3 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -9,10 +9,10 @@ let github; let context; let assignee; -const PROJECT_ID = "PVT_kwDOALGKNs4Ajuck"; +const PROJECT_ID = "PVT_kwHOAfZet84AkAVr"; // The field containing all statuses -const STATUS_FIELD_ID = "PVTSSF_lADOALGKNs4AjuckzgcCutQ"; +const STATUS_FIELD_ID = "PVTSSF_lAHOAfZet84AkAVrzgcR5Tc"; const Emergent_Requests = "Emergent Requests"; const New_Issue_Approval = "New Issue Approval"; @@ -49,8 +49,8 @@ async function main({ g, c }, { shouldPost, issueNum }) { assignee = await getLatestAssignee(); // If the previous action returns false, stop here - if(shouldPost === false) - return; + // if(shouldPost === false) + // return; // Check if developer is allowed to work on this issue const isAdminOrMerge = await memberOfAdminOrMergeTeam(); From 51f546510365904e79fe04193ecdeb7e99afbfb3 Mon Sep 17 00:00:00 2001 From: Moaz Ali <32923319+moazDev1@users.noreply.github.com> Date: Tue, 2 Jul 2024 16:40:20 -0700 Subject: [PATCH 36/62] Revert "test" --- .github/workflows/issue-trigger.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/issue-trigger.yml b/.github/workflows/issue-trigger.yml index 36e2f93d4c..14323a68b9 100644 --- a/.github/workflows/issue-trigger.yml +++ b/.github/workflows/issue-trigger.yml @@ -15,7 +15,6 @@ jobs: id: check-labels uses: actions/github-script@v7 with: - github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} script: | const script = require('./github-actions/trigger-issue/add-missing-labels-to-issues/check-labels.js') const checkLabels = script({g: github, c: context}) @@ -53,7 +52,6 @@ jobs: uses: actions/github-script@v7 id: check-labels-prelim with: - github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} script: | const script = require('./github-actions/trigger-issue/add-preliminary-comment/check-label-preliminary-update.js') const checklabels = script({g: github, c: context}) From b2e1ef4de2c2039357ce1843849d5ac14d7bd6da Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Tue, 2 Jul 2024 16:42:16 -0700 Subject: [PATCH 37/62] test --- .github/workflows/issue-trigger.yml | 2 + .../preliminary-update-comment.js | 408 ++++++++++++++---- 2 files changed, 334 insertions(+), 76 deletions(-) diff --git a/.github/workflows/issue-trigger.yml b/.github/workflows/issue-trigger.yml index 14323a68b9..a1e67225fe 100644 --- a/.github/workflows/issue-trigger.yml +++ b/.github/workflows/issue-trigger.yml @@ -15,6 +15,7 @@ jobs: id: check-labels uses: actions/github-script@v7 with: + github-token: ${{ secrets.GITHUB_TOKEN }} script: | const script = require('./github-actions/trigger-issue/add-missing-labels-to-issues/check-labels.js') const checkLabels = script({g: github, c: context}) @@ -52,6 +53,7 @@ jobs: uses: actions/github-script@v7 id: check-labels-prelim with: + github-token: ${{ secrets.GITHUB_TOKEN }} script: | const script = require('./github-actions/trigger-issue/add-preliminary-comment/check-label-preliminary-update.js') const checklabels = script({g: github, c: context}) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index e890bb8a3b..8335d458c3 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -5,101 +5,357 @@ const formatComment = require('../../utils/format-comment'); const getTimeline = require('../../utils/get-timeline'); // Global variables -var github; -var context; +let github; +let context; +let assignee; + +const PROJECT_ID = "PVT_kwHOAfZet84AkAVr"; + +// The field containing all statuses +const STATUS_FIELD_ID = "PVTSSF_lAHOAfZet84AkAVrzgcR5Tc"; + +const Emergent_Requests = "Emergent Requests"; +const New_Issue_Approval = "New Issue Approval"; +const Prioritized_Backlog = "Prioritized backlog"; +const In_Progress = "In progress (actively working)"; + +const statusesValues = new Map([ + [Emergent_Requests, "d468e876"], + [New_Issue_Approval, "83187325"], + [Prioritized_Backlog, "434304a8"], + [In_Progress, "9a878e9c"], +]); + +const READY_FOR_DEV_LABEL = "ready for dev lead"; /** - * @description - This function is the entry point into the javascript file, it formats the md file based on the result of the previous step and then posts it to the issue + * @description This function is the entry point into the JavaScript file. It formats the + * markdown file based on the result of the previous step, checks if the developer is allowed + * to be assigned to this issue, and performs the following actions: + * - If the developer is not allowed, posts an "unassigned" comment, unassigns the developer, + * and updates the item status. + * - Posts the formatted markdown to the issue. * @param {Object} g - GitHub object - * @param {Object} c - context object - * @param {Boolean} actionResult - the previous gh-action's result - * @param {Number} issueNum - the number of the issue where the post will be made + * @param {Object} c - Context object + * @param {Boolean} shouldPost - The previous GitHub action's result + * @param {Number} issueNum - The number of the issue where the post will be made */ -async function main({ g, c }, { shouldPost, issueNum }){ - github = g; - context = c; - // If the previous action returned a false, stop here - if (shouldPost === false) { - console.log('Issue creator not a team member, no need to post comment.'); - return; +async function main({ g, c }, { shouldPost, issueNum }) { + try { + github = g; + context = c; + + // Get the lates developer in case there are multiple assignees + assignee = await getLatestAssignee(); + + // If the previous action returns false, stop here + // if(shouldPost === false) + // return; + + // Check if developer is allowed to work on this issue + const isAdminOrMerge = await memberOfAdminOrMergeTeam(); + const isAssignedToAnotherIssues = await assignedToAnotherIssue(); + + // If developer is not in Admin or Merge Teams + // and assigned to another issue/s, do the following: + if(!isAdminOrMerge && isAssignedToAnotherIssues) { + + // Create and post a comment using the template in this file + const fileName = "multiple-issue-reminder.md"; + const filePath = './github-actions/trigger-issue/add-preliminary-comment/' + fileName; + const unAssigningComment = createComment(filePath); + await postComment(issueNum, unAssigningComment, github, context); + + await unAssignDev(); // Unassign the developer + await addLabel(READY_FOR_DEV_LABEL); // Add 'ready for dev lead' label + + // Update item status to "New Issue Approval" + const item = await getItemInfo(); + await updateItemStatus(item.id, statusesValues.get(New_Issue_Approval)); + } + // Otherwise, post the normal comment + else { + const instructions = await makeComment(); + if(instructions !== null){ + // the actual creation of the comment in github + await postComment(issueNum, instructions, github, context); + + // Update item status to "In progress (actively working)" + const item = await getItemInfo(); + await updateItemStatus(item.id, statusesValues.get(In_Progress)); + } + } + } catch (error) { + console.log(error); } - // Else we make the comment with the issue creator's GitHub handle instead of the placeholder - else { - const instructions = await makeComment(); - if (instructions !== null) { - // The actual creation of the comment in GitHub - await postComment(issueNum, instructions, github, context); +} + +/** + * @description - This function makes the comment with the issue developer's GitHub handle using the raw preliminary.md file + * @returns {string} - Comment to be posted with the issue developer's name in it!!! + */ +async function makeComment(){ + try { + // Get status name + const statusName = (await getItemInfo()).statusName; + + const isPrework = context.payload.issue.labels.find((label) => label.name == 'Complexity: Prework') ? true : false; + const isDraft = context.payload.issue.labels.find((label) => label.name == 'Draft') ? true : false; + + let filename = 'preliminary-update.md'; + + if (statusName == New_Issue_Approval && !isDraft && !isPrework) { + // If author = developer, remind them to add draft label, otherwise unnasign and comment + if (context.payload.issue.user.login == assignee) { + filename = 'draft-label-reminder.md'; + } else { + filename = 'unassign-from-NIA.md'; + + // Unassign the developer + await unAssignDev(); + } } + + const filePath = './github-actions/trigger-issue/add-preliminary-comment/' + filename; + + const comment = createComment(filePath); + return comment; + } catch (error) { + console.log(error); + } +} + +/** + * @description - This function Check if developer is in the Admin or Merge Team + * @returns {Boolean} - return true if developer is member of Admin/Merge team, false otherwise + */ +async function memberOfAdminOrMergeTeam() { + try { + // Get all members in Admin Team + const websiteAdminsMembers = (await github.rest.teams.listMembersInOrg({ + team_slug: "website-admins", + org: context.repo.owner + })).data.map(member => member.login); + + // Get all members in Merge Team + const websiteMergeMembers = (await github.rest.teams.listMembersInOrg({ + team_slug: "website-merge", + org: context.repo.owner + })).data.map(member => member.login); + + // Return true if developer is a member of the Admin or Merge Teams + return (websiteAdminsMembers.includes(assignee) || websiteMergeMembers.includes(assignee)); + } catch (error) { + console.log("Error getting membership status: ", error); } } /** - * @description - This function makes the comment with the issue assignee's GitHub handle using the raw preliminary.md file - * @returns {string} - Comment to be posted with the issue assignee's name in it!!! + * @description - Check whether developer is assigned to another issue + * @returns {Boolean} - return true if developer is assinged to another issue/s */ -async function makeComment() { - // Setting all the variables which formatComment is to be called with - let issueAssignee = context.payload.issue.assignee.login; - let filename = 'preliminary-update.md'; - const eventdescriptions = await getTimeline(context.payload.issue.number, github, context); - - // Adding the code to find out the latest person assigned the issue - for (var i = eventdescriptions.length - 1 ; i>=0; i-=1) { - if (eventdescriptions[i].event == 'assigned') { - issueAssignee = eventdescriptions[i].assignee.login; - break; +async function assignedToAnotherIssue() { + try { + const issues = (await github.rest.issues.listForRepo({ + owner: context.repo.owner, + repo: context.repo.repo, + assignee: assignee, + state: "open", // Only fetch opened issues + })).data; + + const otherIssues = []; + + for(const issue of issues) { + // Check is it's an "Agenda" issue + const isAgendaIssue = issue.labels.some(label => label.name === "feature: agenda"); + + // Check if it's a "Prework" issue + const isPreWork = issue.labels.some(label => label.name === "Complexity: Prework"); + + // Check if it exists in "Emergent Request" Status + const inEmergentRequestStatus = (await getItemInfo()).statusName === Emergent_Requests; + + // Check if it exists in "New Issue Approval" Status + const inNewIssueApprovalStatus = (await getItemInfo()).statusName === New_Issue_Approval; + + // Include the issue only if none of the conditions are met + if(!(isAgendaIssue || isPreWork || inEmergentRequestStatus || inNewIssueApprovalStatus)) + otherIssues.push(issue); } + + // If developer is assigned to another issue/s, return true + return otherIssues.length > 0; + } catch (error) { + console.log("Error getting other issues: ", error); + } +} + +/** + * @description - Unassign developer from the issue + */ +async function unAssignDev() { + try { + await github.rest.issues.removeAssignees({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.issue.number, + assignees: [assignee], + }); + } catch (error) { + console.log("Error unassigning developer: ", error); } +} - // BELOW through line 89 +/-, disabling the 'column' checks becaues these are not compatible - // with Projects Beta. This code needs to be refactored using GraphQL, ProjectsV2, and 'status' field. - /* - // Getting the issue's Project Board column name - const queryColumn = `query($owner:String!, $name:String!, $number:Int!) { - repository(owner:$owner, name:$name) { - issue(number:$number) { - projectCards { nodes { column { name } } } +/** + * @description - Create a comment using the template of the file in 'filePath' + * @param {String} filePath - file path for the used template + * @returns {String} - return fromatted comment + */ +function createComment(filePath) { + try { + const commentObject = { + replacementString: assignee, + placeholderString: '${assignee}', + filePathToFormat: filePath, + textToFormat: null + } + + // Return teh formatted comment + const fromattedComment = formatComment(commentObject, fs); + return fromattedComment; + } catch (error) { + console.log("Error creating comment: ", error); + } +} + +/** + * @description - Add 'ready for dev lead' label to the issue + * @param {String} labelName - Name of the label to add + */ +async function addLabel(labelName) { + try { + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.issue.number, + labels: [labelName], + }); + } catch (error) { + console.log("Error Adding label: ", error); + } +} + +/** + * @description - Get latest assignee, in case there are multimple assignees to the issue + * @returns {String} - return the username of the latest assignee + */ +async function getLatestAssignee() { + try { + let issueAssignee = context.payload.issue.assignee.login; + + const eventdescriptions = await getTimeline(context.payload.issue.number, github, context); + + // Find out the latest developer assigned to the issue + for(let i = eventdescriptions.length - 1 ; i>=0; i-=1){ + if(eventdescriptions[i].event == 'assigned'){ + issueAssignee = eventdescriptions[i].assignee.login + break } } - }`; + + return issueAssignee; + } catch (error) { + console.log("Error getting last assignee: ", error); + } +} + +/** + * @description - Get item info using its issue number + * @param {Number} issueNum - Issue number linked to the item + * @returns {Object} - An object containing the item ID and its status name + */ +async function getItemInfo() { + try { + const query = `query($owner: String!, $repo: String!, $issueNum: Int!) { + repository(owner: $owner, name: $repo) { + issue(number: $issueNum) { + id + projectItems(first: 100) { + nodes { + id + fieldValues(first: 100) { + nodes { + ... on ProjectV2ItemFieldSingleSelectValue { + name + } + } + } + } + } + } + } + }`; + const variables = { owner: context.repo.owner, - name: context.repo.repo, - number: context.payload.issue.number + repo: context.repo.repo, + issueNum: context.payload.issue.number }; - const resColumn = await github.graphql(queryColumn, variables); - const columnName = resColumn.repository.issue.projectCards.nodes[0].column.name; - const isPrework = context.payload.issue.labels.find((label) => label.name == 'Complexity: Prework') ? true : false; - const isDraft = context.payload.issue.labels.find((label) => label.name == 'Draft') ? true : false; - - if (columnName == 'New Issue Approval' && !isDraft && !isPrework) { - // If author == assignee, remind them to add `Draft` label, otherwise unnasign and comment - if (context.payload.issue.user.login == issueAssignee) { - filename = 'draft-label-reminder.md'; - } else { - filename = 'unassign-from-NIA.md'; - - await github.rest.issues.removeAssignees({ - owner: variables.owner, - repo: variables.name, - issue_number: variables.number, - assignees: [issueAssignee], - }); - } + + const response = await github.graphql(query, variables); + + // Extract the list of project items associated with the issue + const projectItems = response.repository.issue.projectItems.nodes; + + // Since there is always one item associated with the issue, + // directly get the item's ID from the first index + const id = projectItems[0].id; + + // Iterate through the field values of the first project item + // and find the node that contains the 'name' property, then get its 'name' value + const statusName = projectItems[0].fieldValues.nodes.find(item => item.hasOwnProperty('name')).name; + + return {id, statusName}; + + } catch (error) { + console.log("Error getting item info: ", error); } - */ - - let filePathToFormat = './github-actions/trigger-issue/add-preliminary-comment/' + filename; - const commentObject = { - replacementString: issueAssignee, - placeholderString: '${issueAssignee}', - filePathToFormat: filePathToFormat, - textToFormat: null - }; +} + +/** + * @description - Update item to a new status + * @param {String} itemId - The ID of the item to be updated + * @param {String} newStatusValue - The new status value to be assigned to the item + */ +async function updateItemStatus(itemId, newStatusValue) { + try { + const mutation = `mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $value: String!) { + updateProjectV2ItemFieldValue(input: { + projectId: $projectId, + itemId: $itemId, + fieldId: $fieldId, + value: { + singleSelectOptionId: $value + } + }) { + projectV2Item { + id + } + } + }` - // Creating the comment with issue assignee's name and returning it! - const commentWithIssueAssignee = formatComment(commentObject, fs); - return commentWithIssueAssignee; + const variables = { + projectId: PROJECT_ID, + itemId: itemId, + fieldId: STATUS_FIELD_ID, + value: newStatusValue + }; + + await github.graphql(mutation, variables); + + } catch (error) { + console.log("Error moving item: ", error); + } } - -module.exports = main; + +module.exports = main; \ No newline at end of file From fcb2cfec661c8e6d2f89e971587f4f166e61eea9 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Tue, 2 Jul 2024 16:44:11 -0700 Subject: [PATCH 38/62] test --- .github/workflows/issue-trigger.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/issue-trigger.yml b/.github/workflows/issue-trigger.yml index a1e67225fe..36e2f93d4c 100644 --- a/.github/workflows/issue-trigger.yml +++ b/.github/workflows/issue-trigger.yml @@ -15,7 +15,7 @@ jobs: id: check-labels uses: actions/github-script@v7 with: - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} script: | const script = require('./github-actions/trigger-issue/add-missing-labels-to-issues/check-labels.js') const checkLabels = script({g: github, c: context}) @@ -53,7 +53,7 @@ jobs: uses: actions/github-script@v7 id: check-labels-prelim with: - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} script: | const script = require('./github-actions/trigger-issue/add-preliminary-comment/check-label-preliminary-update.js') const checklabels = script({g: github, c: context}) From df3ffdd15a26f41139ff275ac69e80425d551a39 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Tue, 2 Jul 2024 16:52:10 -0700 Subject: [PATCH 39/62] test --- .github/workflows/issue-trigger.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/issue-trigger.yml b/.github/workflows/issue-trigger.yml index 36e2f93d4c..6b53500b9a 100644 --- a/.github/workflows/issue-trigger.yml +++ b/.github/workflows/issue-trigger.yml @@ -15,7 +15,6 @@ jobs: id: check-labels uses: actions/github-script@v7 with: - github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} script: | const script = require('./github-actions/trigger-issue/add-missing-labels-to-issues/check-labels.js') const checkLabels = script({g: github, c: context}) @@ -64,12 +63,12 @@ jobs: id: assigned-comment uses: actions/github-script@v7 with: + github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} script: | const results = ${{ steps.check-labels-prelim.outputs.result }} const script = require('./github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js') script({g: github, c:context}, results) - # The following steps only apply to issues with `Feature: Feature Branch` label # Note: These steps will be unnecessary and should be removed once Feature Branch goes live Add-Feature-Branch-Comment: From b428d51025a1660ddc086c0c4f419c9e098ef63c Mon Sep 17 00:00:00 2001 From: Moaz Ali <32923319+moazDev1@users.noreply.github.com> Date: Tue, 2 Jul 2024 16:55:03 -0700 Subject: [PATCH 40/62] Revert "test" --- .github/workflows/issue-trigger.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/issue-trigger.yml b/.github/workflows/issue-trigger.yml index 6b53500b9a..36e2f93d4c 100644 --- a/.github/workflows/issue-trigger.yml +++ b/.github/workflows/issue-trigger.yml @@ -15,6 +15,7 @@ jobs: id: check-labels uses: actions/github-script@v7 with: + github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} script: | const script = require('./github-actions/trigger-issue/add-missing-labels-to-issues/check-labels.js') const checkLabels = script({g: github, c: context}) @@ -63,12 +64,12 @@ jobs: id: assigned-comment uses: actions/github-script@v7 with: - github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} script: | const results = ${{ steps.check-labels-prelim.outputs.result }} const script = require('./github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js') script({g: github, c:context}, results) + # The following steps only apply to issues with `Feature: Feature Branch` label # Note: These steps will be unnecessary and should be removed once Feature Branch goes live Add-Feature-Branch-Comment: From 96550b1ad1880727353fbc97abae5dc2a8c61206 Mon Sep 17 00:00:00 2001 From: Moaz Ali <32923319+moazDev1@users.noreply.github.com> Date: Tue, 2 Jul 2024 16:55:37 -0700 Subject: [PATCH 41/62] Revert "Test" --- .github/workflows/issue-trigger.yml | 2 - .../preliminary-update-comment.js | 408 ++++-------------- 2 files changed, 76 insertions(+), 334 deletions(-) diff --git a/.github/workflows/issue-trigger.yml b/.github/workflows/issue-trigger.yml index 36e2f93d4c..14323a68b9 100644 --- a/.github/workflows/issue-trigger.yml +++ b/.github/workflows/issue-trigger.yml @@ -15,7 +15,6 @@ jobs: id: check-labels uses: actions/github-script@v7 with: - github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} script: | const script = require('./github-actions/trigger-issue/add-missing-labels-to-issues/check-labels.js') const checkLabels = script({g: github, c: context}) @@ -53,7 +52,6 @@ jobs: uses: actions/github-script@v7 id: check-labels-prelim with: - github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} script: | const script = require('./github-actions/trigger-issue/add-preliminary-comment/check-label-preliminary-update.js') const checklabels = script({g: github, c: context}) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index 8335d458c3..e890bb8a3b 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -5,357 +5,101 @@ const formatComment = require('../../utils/format-comment'); const getTimeline = require('../../utils/get-timeline'); // Global variables -let github; -let context; -let assignee; - -const PROJECT_ID = "PVT_kwHOAfZet84AkAVr"; - -// The field containing all statuses -const STATUS_FIELD_ID = "PVTSSF_lAHOAfZet84AkAVrzgcR5Tc"; - -const Emergent_Requests = "Emergent Requests"; -const New_Issue_Approval = "New Issue Approval"; -const Prioritized_Backlog = "Prioritized backlog"; -const In_Progress = "In progress (actively working)"; - -const statusesValues = new Map([ - [Emergent_Requests, "d468e876"], - [New_Issue_Approval, "83187325"], - [Prioritized_Backlog, "434304a8"], - [In_Progress, "9a878e9c"], -]); - -const READY_FOR_DEV_LABEL = "ready for dev lead"; +var github; +var context; /** - * @description This function is the entry point into the JavaScript file. It formats the - * markdown file based on the result of the previous step, checks if the developer is allowed - * to be assigned to this issue, and performs the following actions: - * - If the developer is not allowed, posts an "unassigned" comment, unassigns the developer, - * and updates the item status. - * - Posts the formatted markdown to the issue. + * @description - This function is the entry point into the javascript file, it formats the md file based on the result of the previous step and then posts it to the issue * @param {Object} g - GitHub object - * @param {Object} c - Context object - * @param {Boolean} shouldPost - The previous GitHub action's result - * @param {Number} issueNum - The number of the issue where the post will be made + * @param {Object} c - context object + * @param {Boolean} actionResult - the previous gh-action's result + * @param {Number} issueNum - the number of the issue where the post will be made */ -async function main({ g, c }, { shouldPost, issueNum }) { - try { - github = g; - context = c; - - // Get the lates developer in case there are multiple assignees - assignee = await getLatestAssignee(); - - // If the previous action returns false, stop here - // if(shouldPost === false) - // return; - - // Check if developer is allowed to work on this issue - const isAdminOrMerge = await memberOfAdminOrMergeTeam(); - const isAssignedToAnotherIssues = await assignedToAnotherIssue(); - - // If developer is not in Admin or Merge Teams - // and assigned to another issue/s, do the following: - if(!isAdminOrMerge && isAssignedToAnotherIssues) { - - // Create and post a comment using the template in this file - const fileName = "multiple-issue-reminder.md"; - const filePath = './github-actions/trigger-issue/add-preliminary-comment/' + fileName; - const unAssigningComment = createComment(filePath); - await postComment(issueNum, unAssigningComment, github, context); - - await unAssignDev(); // Unassign the developer - await addLabel(READY_FOR_DEV_LABEL); // Add 'ready for dev lead' label - - // Update item status to "New Issue Approval" - const item = await getItemInfo(); - await updateItemStatus(item.id, statusesValues.get(New_Issue_Approval)); - } - // Otherwise, post the normal comment - else { - const instructions = await makeComment(); - if(instructions !== null){ - // the actual creation of the comment in github - await postComment(issueNum, instructions, github, context); - - // Update item status to "In progress (actively working)" - const item = await getItemInfo(); - await updateItemStatus(item.id, statusesValues.get(In_Progress)); - } - } - } catch (error) { - console.log(error); +async function main({ g, c }, { shouldPost, issueNum }){ + github = g; + context = c; + // If the previous action returned a false, stop here + if (shouldPost === false) { + console.log('Issue creator not a team member, no need to post comment.'); + return; } -} - -/** - * @description - This function makes the comment with the issue developer's GitHub handle using the raw preliminary.md file - * @returns {string} - Comment to be posted with the issue developer's name in it!!! - */ -async function makeComment(){ - try { - // Get status name - const statusName = (await getItemInfo()).statusName; - - const isPrework = context.payload.issue.labels.find((label) => label.name == 'Complexity: Prework') ? true : false; - const isDraft = context.payload.issue.labels.find((label) => label.name == 'Draft') ? true : false; - - let filename = 'preliminary-update.md'; - - if (statusName == New_Issue_Approval && !isDraft && !isPrework) { - // If author = developer, remind them to add draft label, otherwise unnasign and comment - if (context.payload.issue.user.login == assignee) { - filename = 'draft-label-reminder.md'; - } else { - filename = 'unassign-from-NIA.md'; - - // Unassign the developer - await unAssignDev(); - } + // Else we make the comment with the issue creator's GitHub handle instead of the placeholder + else { + const instructions = await makeComment(); + if (instructions !== null) { + // The actual creation of the comment in GitHub + await postComment(issueNum, instructions, github, context); } - - const filePath = './github-actions/trigger-issue/add-preliminary-comment/' + filename; - - const comment = createComment(filePath); - return comment; - } catch (error) { - console.log(error); - } -} - -/** - * @description - This function Check if developer is in the Admin or Merge Team - * @returns {Boolean} - return true if developer is member of Admin/Merge team, false otherwise - */ -async function memberOfAdminOrMergeTeam() { - try { - // Get all members in Admin Team - const websiteAdminsMembers = (await github.rest.teams.listMembersInOrg({ - team_slug: "website-admins", - org: context.repo.owner - })).data.map(member => member.login); - - // Get all members in Merge Team - const websiteMergeMembers = (await github.rest.teams.listMembersInOrg({ - team_slug: "website-merge", - org: context.repo.owner - })).data.map(member => member.login); - - // Return true if developer is a member of the Admin or Merge Teams - return (websiteAdminsMembers.includes(assignee) || websiteMergeMembers.includes(assignee)); - } catch (error) { - console.log("Error getting membership status: ", error); } } /** - * @description - Check whether developer is assigned to another issue - * @returns {Boolean} - return true if developer is assinged to another issue/s + * @description - This function makes the comment with the issue assignee's GitHub handle using the raw preliminary.md file + * @returns {string} - Comment to be posted with the issue assignee's name in it!!! */ -async function assignedToAnotherIssue() { - try { - const issues = (await github.rest.issues.listForRepo({ - owner: context.repo.owner, - repo: context.repo.repo, - assignee: assignee, - state: "open", // Only fetch opened issues - })).data; - - const otherIssues = []; - - for(const issue of issues) { - // Check is it's an "Agenda" issue - const isAgendaIssue = issue.labels.some(label => label.name === "feature: agenda"); - - // Check if it's a "Prework" issue - const isPreWork = issue.labels.some(label => label.name === "Complexity: Prework"); - - // Check if it exists in "Emergent Request" Status - const inEmergentRequestStatus = (await getItemInfo()).statusName === Emergent_Requests; - - // Check if it exists in "New Issue Approval" Status - const inNewIssueApprovalStatus = (await getItemInfo()).statusName === New_Issue_Approval; - - // Include the issue only if none of the conditions are met - if(!(isAgendaIssue || isPreWork || inEmergentRequestStatus || inNewIssueApprovalStatus)) - otherIssues.push(issue); +async function makeComment() { + // Setting all the variables which formatComment is to be called with + let issueAssignee = context.payload.issue.assignee.login; + let filename = 'preliminary-update.md'; + const eventdescriptions = await getTimeline(context.payload.issue.number, github, context); + + // Adding the code to find out the latest person assigned the issue + for (var i = eventdescriptions.length - 1 ; i>=0; i-=1) { + if (eventdescriptions[i].event == 'assigned') { + issueAssignee = eventdescriptions[i].assignee.login; + break; } - - // If developer is assigned to another issue/s, return true - return otherIssues.length > 0; - } catch (error) { - console.log("Error getting other issues: ", error); - } -} - -/** - * @description - Unassign developer from the issue - */ -async function unAssignDev() { - try { - await github.rest.issues.removeAssignees({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.issue.number, - assignees: [assignee], - }); - } catch (error) { - console.log("Error unassigning developer: ", error); } -} -/** - * @description - Create a comment using the template of the file in 'filePath' - * @param {String} filePath - file path for the used template - * @returns {String} - return fromatted comment - */ -function createComment(filePath) { - try { - const commentObject = { - replacementString: assignee, - placeholderString: '${assignee}', - filePathToFormat: filePath, - textToFormat: null - } - - // Return teh formatted comment - const fromattedComment = formatComment(commentObject, fs); - return fromattedComment; - } catch (error) { - console.log("Error creating comment: ", error); - } -} - -/** - * @description - Add 'ready for dev lead' label to the issue - * @param {String} labelName - Name of the label to add - */ -async function addLabel(labelName) { - try { - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.issue.number, - labels: [labelName], - }); - } catch (error) { - console.log("Error Adding label: ", error); - } -} - -/** - * @description - Get latest assignee, in case there are multimple assignees to the issue - * @returns {String} - return the username of the latest assignee - */ -async function getLatestAssignee() { - try { - let issueAssignee = context.payload.issue.assignee.login; - - const eventdescriptions = await getTimeline(context.payload.issue.number, github, context); - - // Find out the latest developer assigned to the issue - for(let i = eventdescriptions.length - 1 ; i>=0; i-=1){ - if(eventdescriptions[i].event == 'assigned'){ - issueAssignee = eventdescriptions[i].assignee.login - break + // BELOW through line 89 +/-, disabling the 'column' checks becaues these are not compatible + // with Projects Beta. This code needs to be refactored using GraphQL, ProjectsV2, and 'status' field. + /* + // Getting the issue's Project Board column name + const queryColumn = `query($owner:String!, $name:String!, $number:Int!) { + repository(owner:$owner, name:$name) { + issue(number:$number) { + projectCards { nodes { column { name } } } } } - - return issueAssignee; - } catch (error) { - console.log("Error getting last assignee: ", error); - } -} - -/** - * @description - Get item info using its issue number - * @param {Number} issueNum - Issue number linked to the item - * @returns {Object} - An object containing the item ID and its status name - */ -async function getItemInfo() { - try { - const query = `query($owner: String!, $repo: String!, $issueNum: Int!) { - repository(owner: $owner, name: $repo) { - issue(number: $issueNum) { - id - projectItems(first: 100) { - nodes { - id - fieldValues(first: 100) { - nodes { - ... on ProjectV2ItemFieldSingleSelectValue { - name - } - } - } - } - } - } - } - }`; - + }`; const variables = { owner: context.repo.owner, - repo: context.repo.repo, - issueNum: context.payload.issue.number + name: context.repo.repo, + number: context.payload.issue.number }; - - const response = await github.graphql(query, variables); - - // Extract the list of project items associated with the issue - const projectItems = response.repository.issue.projectItems.nodes; - - // Since there is always one item associated with the issue, - // directly get the item's ID from the first index - const id = projectItems[0].id; - - // Iterate through the field values of the first project item - // and find the node that contains the 'name' property, then get its 'name' value - const statusName = projectItems[0].fieldValues.nodes.find(item => item.hasOwnProperty('name')).name; - - return {id, statusName}; - - } catch (error) { - console.log("Error getting item info: ", error); + const resColumn = await github.graphql(queryColumn, variables); + const columnName = resColumn.repository.issue.projectCards.nodes[0].column.name; + const isPrework = context.payload.issue.labels.find((label) => label.name == 'Complexity: Prework') ? true : false; + const isDraft = context.payload.issue.labels.find((label) => label.name == 'Draft') ? true : false; + + if (columnName == 'New Issue Approval' && !isDraft && !isPrework) { + // If author == assignee, remind them to add `Draft` label, otherwise unnasign and comment + if (context.payload.issue.user.login == issueAssignee) { + filename = 'draft-label-reminder.md'; + } else { + filename = 'unassign-from-NIA.md'; + + await github.rest.issues.removeAssignees({ + owner: variables.owner, + repo: variables.name, + issue_number: variables.number, + assignees: [issueAssignee], + }); + } } -} - -/** - * @description - Update item to a new status - * @param {String} itemId - The ID of the item to be updated - * @param {String} newStatusValue - The new status value to be assigned to the item - */ -async function updateItemStatus(itemId, newStatusValue) { - try { - const mutation = `mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $value: String!) { - updateProjectV2ItemFieldValue(input: { - projectId: $projectId, - itemId: $itemId, - fieldId: $fieldId, - value: { - singleSelectOptionId: $value - } - }) { - projectV2Item { - id - } - } - }` - - const variables = { - projectId: PROJECT_ID, - itemId: itemId, - fieldId: STATUS_FIELD_ID, - value: newStatusValue - }; - - await github.graphql(mutation, variables); + */ + + let filePathToFormat = './github-actions/trigger-issue/add-preliminary-comment/' + filename; + const commentObject = { + replacementString: issueAssignee, + placeholderString: '${issueAssignee}', + filePathToFormat: filePathToFormat, + textToFormat: null + }; - } catch (error) { - console.log("Error moving item: ", error); - } + // Creating the comment with issue assignee's name and returning it! + const commentWithIssueAssignee = formatComment(commentObject, fs); + return commentWithIssueAssignee; } - -module.exports = main; \ No newline at end of file + +module.exports = main; From 65af2192185a8f8184fc9e1a125d21d868fec821 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Tue, 2 Jul 2024 17:00:50 -0700 Subject: [PATCH 42/62] update to ProjectV2 --- .github/workflows/issue-trigger.yml | 3 +-- .../add-preliminary-comment/preliminary-update-comment.js | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/issue-trigger.yml b/.github/workflows/issue-trigger.yml index 6b53500b9a..14323a68b9 100644 --- a/.github/workflows/issue-trigger.yml +++ b/.github/workflows/issue-trigger.yml @@ -52,7 +52,6 @@ jobs: uses: actions/github-script@v7 id: check-labels-prelim with: - github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} script: | const script = require('./github-actions/trigger-issue/add-preliminary-comment/check-label-preliminary-update.js') const checklabels = script({g: github, c: context}) @@ -63,12 +62,12 @@ jobs: id: assigned-comment uses: actions/github-script@v7 with: - github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} script: | const results = ${{ steps.check-labels-prelim.outputs.result }} const script = require('./github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js') script({g: github, c:context}, results) + # The following steps only apply to issues with `Feature: Feature Branch` label # Note: These steps will be unnecessary and should be removed once Feature Branch goes live Add-Feature-Branch-Comment: diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index 8335d458c3..09e3d19524 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -9,10 +9,10 @@ let github; let context; let assignee; -const PROJECT_ID = "PVT_kwHOAfZet84AkAVr"; +const PROJECT_ID = "PVT_kwDOALGKNs4Ajuck"; // The field containing all statuses -const STATUS_FIELD_ID = "PVTSSF_lAHOAfZet84AkAVrzgcR5Tc"; +const STATUS_FIELD_ID = "PVTSSF_lADOALGKNs4AjuckzgcCutQ"; const Emergent_Requests = "Emergent Requests"; const New_Issue_Approval = "New Issue Approval"; @@ -49,8 +49,8 @@ async function main({ g, c }, { shouldPost, issueNum }) { assignee = await getLatestAssignee(); // If the previous action returns false, stop here - // if(shouldPost === false) - // return; + if(shouldPost === false) + return; // Check if developer is allowed to work on this issue const isAdminOrMerge = await memberOfAdminOrMergeTeam(); From 969896b70ccf35699cfbdc6227607f2f04040487 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Tue, 9 Jul 2024 16:32:18 -0700 Subject: [PATCH 43/62] update --- .github/workflows/issue-trigger.yml | 4 ++-- .../preliminary-update-comment.js | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/issue-trigger.yml b/.github/workflows/issue-trigger.yml index 6b53500b9a..50fdc6727b 100644 --- a/.github/workflows/issue-trigger.yml +++ b/.github/workflows/issue-trigger.yml @@ -52,7 +52,7 @@ jobs: uses: actions/github-script@v7 id: check-labels-prelim with: - github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} + github-token: ${{ secrets.HACKFORLA_GRAPHQL_TOKEN }} script: | const script = require('./github-actions/trigger-issue/add-preliminary-comment/check-label-preliminary-update.js') const checklabels = script({g: github, c: context}) @@ -63,7 +63,7 @@ jobs: id: assigned-comment uses: actions/github-script@v7 with: - github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} + github-token: ${{ secrets.HACKFORLA_GRAPHQL_TOKEN }} script: | const results = ${{ steps.check-labels-prelim.outputs.result }} const script = require('./github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js') diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index f3286d85cc..be690deaa1 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -48,8 +48,8 @@ async function main({ g, c }, { shouldPost, issueNum }) { assignee = await getLatestAssignee(); // If the previous action returns false, stop here - if(shouldPost === false) - return; + // if(shouldPost === false) + // return; // Check if developer is allowed to work on this issue const isAdminOrMerge = await memberOfAdminOrMergeTeam(); @@ -211,10 +211,11 @@ async function unAssignDev() { * @returns {String} - return fromatted comment */ function createComment(filePath) { + issueAssignee = assignee; try { const commentObject = { - replacementString: assignee, - placeholderString: '${assignee}', + replacementString: issueAssignee, + placeholderString: '${issueAssignee}', filePathToFormat: filePath, textToFormat: null } From 5ad852579ecf06e6a95d6b164b3463c0319e2361 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Tue, 9 Jul 2024 16:57:50 -0700 Subject: [PATCH 44/62] update --- .../add-preliminary-comment/preliminary-update-comment.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index be690deaa1..6b47e93f70 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -211,10 +211,9 @@ async function unAssignDev() { * @returns {String} - return fromatted comment */ function createComment(filePath) { - issueAssignee = assignee; try { const commentObject = { - replacementString: issueAssignee, + replacementString: assignee, placeholderString: '${issueAssignee}', filePathToFormat: filePath, textToFormat: null From fc85681202a9be5dcb83a7ddee76009e67267793 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Tue, 9 Jul 2024 17:26:44 -0700 Subject: [PATCH 45/62] fix some issues --- .github/workflows/issue-trigger.yml | 2 ++ .../add-preliminary-comment/multiple-issue-reminder.md | 6 ++++++ .../add-preliminary-comment/preliminary-update-comment.js | 6 +++--- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 github-actions/trigger-issue/add-preliminary-comment/multiple-issue-reminder.md diff --git a/.github/workflows/issue-trigger.yml b/.github/workflows/issue-trigger.yml index 14323a68b9..402157828e 100644 --- a/.github/workflows/issue-trigger.yml +++ b/.github/workflows/issue-trigger.yml @@ -52,6 +52,7 @@ jobs: uses: actions/github-script@v7 id: check-labels-prelim with: + github-token: ${{ secrets.HACKFORLA_GRAPHQL_TOKEN }} script: | const script = require('./github-actions/trigger-issue/add-preliminary-comment/check-label-preliminary-update.js') const checklabels = script({g: github, c: context}) @@ -62,6 +63,7 @@ jobs: id: assigned-comment uses: actions/github-script@v7 with: + github-token: ${{ secrets.HACKFORLA_GRAPHQL_TOKEN }} script: | const results = ${{ steps.check-labels-prelim.outputs.result }} const script = require('./github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js') diff --git a/github-actions/trigger-issue/add-preliminary-comment/multiple-issue-reminder.md b/github-actions/trigger-issue/add-preliminary-comment/multiple-issue-reminder.md new file mode 100644 index 0000000000..f05ab4820d --- /dev/null +++ b/github-actions/trigger-issue/add-preliminary-comment/multiple-issue-reminder.md @@ -0,0 +1,6 @@ + +Hello @${issueAssignee}, we appreciate you taking on this issue, however it looks like you're already working on another issue at this time. Please wait until your current issue is merged before taking on another issue. :) + +We are going to unassign you from this issue so you can focus on your current issue. + +Hfla appreciates you! :) \ No newline at end of file diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index 09e3d19524..248fd45c1e 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -49,8 +49,8 @@ async function main({ g, c }, { shouldPost, issueNum }) { assignee = await getLatestAssignee(); // If the previous action returns false, stop here - if(shouldPost === false) - return; + // if(shouldPost === false) + // return; // Check if developer is allowed to work on this issue const isAdminOrMerge = await memberOfAdminOrMergeTeam(); @@ -215,7 +215,7 @@ function createComment(filePath) { try { const commentObject = { replacementString: assignee, - placeholderString: '${assignee}', + placeholderString: '${issueAssignee}', filePathToFormat: filePath, textToFormat: null } From 49f04f6cd58b63a0877e4418e700a2fd1567f049 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Tue, 9 Jul 2024 17:28:06 -0700 Subject: [PATCH 46/62] test --- .../add-preliminary-comment/preliminary-update-comment.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index 248fd45c1e..b42cc462d6 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -9,10 +9,12 @@ let github; let context; let assignee; -const PROJECT_ID = "PVT_kwDOALGKNs4Ajuck"; +// const PROJECT_ID = "PVT_kwDOALGKNs4Ajuck"; +const PROJECT_ID = "PVT_kwHOAfZet84AkAVr"; // The field containing all statuses -const STATUS_FIELD_ID = "PVTSSF_lADOALGKNs4AjuckzgcCutQ"; +// const STATUS_FIELD_ID = "PVTSSF_lADOALGKNs4AjuckzgcCutQ"; +const STATUS_FIELD_ID = "PVTSSF_lAHOAfZet84AkAVrzgcR5Tc"; const Emergent_Requests = "Emergent Requests"; const New_Issue_Approval = "New Issue Approval"; From 5818000764a1720601d7789846e393c4edb5ff32 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Tue, 9 Jul 2024 17:32:05 -0700 Subject: [PATCH 47/62] test --- .../add-preliminary-comment/preliminary-update-comment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index b42cc462d6..359ed05550 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -186,7 +186,7 @@ async function assignedToAnotherIssue() { } // If developer is assigned to another issue/s, return true - return otherIssues.length > 0; + return otherIssues.length > 1; } catch (error) { console.log("Error getting other issues: ", error); } From de51b1188a3392ecdfb26793091408fd25f8f7a8 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Tue, 9 Jul 2024 17:56:44 -0700 Subject: [PATCH 48/62] update --- .../preliminary-update-comment.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index 6b47e93f70..886d7d5050 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -3,6 +3,7 @@ const fs = require("fs"); const postComment = require('../../utils/post-issue-comment'); const formatComment = require('../../utils/format-comment'); const getTimeline = require('../../utils/get-timeline'); +const getTeamMembers = require('../../utils/get-team-members'); // Global variables let github; @@ -131,19 +132,13 @@ async function makeComment(){ async function memberOfAdminOrMergeTeam() { try { // Get all members in Admin Team - const websiteAdminsMembers = (await github.rest.teams.listMembersInOrg({ - team_slug: "website-admins", - org: "hackforla" - })).data.map(member => member.login); + const websiteAdminsMembers = await getTeamMembers(github, context, "website-admins"); // Get all members in Merge Team - const websiteMergeMembers = (await github.rest.teams.listMembersInOrg({ - team_slug: "website-merge", - org: "hackforla" - })).data.map(member => member.login); + const websiteMergeMembers = await getTeamMembers(github, context, "website-merge"); // Return true if developer is a member of the Admin or Merge Teams - return (websiteAdminsMembers.includes(assignee) || websiteMergeMembers.includes(assignee)); + return (assignee in websiteAdminsMembers || assignee in websiteMergeMembers); } catch (error) { console.log("Error getting membership status: ", error); } @@ -183,7 +178,7 @@ async function assignedToAnotherIssue() { } // If developer is assigned to another issue/s, return true - return otherIssues.length > 0; + return otherIssues.length > 1; } catch (error) { console.log("Error getting other issues: ", error); } From 88f06375a2684df2a08200a8fcd0d1c6a4d56486 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Tue, 9 Jul 2024 17:58:00 -0700 Subject: [PATCH 49/62] update memberOfAdminOrMergeTeam function --- .../preliminary-update-comment.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index 359ed05550..6478ba29b3 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -134,19 +134,13 @@ async function makeComment(){ async function memberOfAdminOrMergeTeam() { try { // Get all members in Admin Team - const websiteAdminsMembers = (await github.rest.teams.listMembersInOrg({ - team_slug: "website-admins", - org: context.repo.owner - })).data.map(member => member.login); + const websiteAdminsMembers = await getTeamMembers(github, context, "website-admins"); // Get all members in Merge Team - const websiteMergeMembers = (await github.rest.teams.listMembersInOrg({ - team_slug: "website-merge", - org: context.repo.owner - })).data.map(member => member.login); + const websiteMergeMembers = await getTeamMembers(github, context, "website-merge"); // Return true if developer is a member of the Admin or Merge Teams - return (websiteAdminsMembers.includes(assignee) || websiteMergeMembers.includes(assignee)); + return (assignee in websiteAdminsMembers || assignee in websiteMergeMembers); } catch (error) { console.log("Error getting membership status: ", error); } From b0ad778c50d08f535ce74760b6519e27e0e1642d Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Tue, 9 Jul 2024 18:05:49 -0700 Subject: [PATCH 50/62] update --- .../preliminary-update-comment.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index 6478ba29b3..d8835ae6ed 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -9,12 +9,10 @@ let github; let context; let assignee; -// const PROJECT_ID = "PVT_kwDOALGKNs4Ajuck"; -const PROJECT_ID = "PVT_kwHOAfZet84AkAVr"; +const PROJECT_ID = "PVT_kwDOALGKNs4Ajuck"; // The field containing all statuses -// const STATUS_FIELD_ID = "PVTSSF_lADOALGKNs4AjuckzgcCutQ"; -const STATUS_FIELD_ID = "PVTSSF_lAHOAfZet84AkAVrzgcR5Tc"; +const STATUS_FIELD_ID = "PVTSSF_lADOALGKNs4AjuckzgcCutQ"; const Emergent_Requests = "Emergent Requests"; const New_Issue_Approval = "New Issue Approval"; @@ -51,8 +49,8 @@ async function main({ g, c }, { shouldPost, issueNum }) { assignee = await getLatestAssignee(); // If the previous action returns false, stop here - // if(shouldPost === false) - // return; + if(shouldPost === false) + return; // Check if developer is allowed to work on this issue const isAdminOrMerge = await memberOfAdminOrMergeTeam(); @@ -267,7 +265,6 @@ async function getLatestAssignee() { /** * @description - Get item info using its issue number - * @param {Number} issueNum - Issue number linked to the item * @returns {Object} - An object containing the item ID and its status name */ async function getItemInfo() { From 5fe93ef0b885836bb5f7303458f57b5ffd1ebb3e Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Thu, 11 Jul 2024 20:43:07 -0700 Subject: [PATCH 51/62] test --- .../preliminary-update-comment.js | 161 ++++++++---------- 1 file changed, 68 insertions(+), 93 deletions(-) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index 886d7d5050..bbc8e2a486 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -20,7 +20,7 @@ const New_Issue_Approval = "New Issue Approval"; const Prioritized_Backlog = "Prioritized backlog"; const In_Progress = "In progress (actively working)"; -const statusesValues = new Map([ +const statusValues = new Map([ [Emergent_Requests, "d468e876"], [New_Issue_Approval, "83187325"], [Prioritized_Backlog, "434304a8"], @@ -42,86 +42,45 @@ const READY_FOR_DEV_LABEL = "ready for dev lead"; * @param {Number} issueNum - The number of the issue where the post will be made */ async function main({ g, c }, { shouldPost, issueNum }) { - try { - github = g; - context = c; - // Get the lates developer in case there are multiple assignees - assignee = await getLatestAssignee(); - - // If the previous action returns false, stop here - // if(shouldPost === false) - // return; + shouldPost = true; + + github = g; + context = c; + + // If the previous action returns false, stop here + if (shouldPost === false) { + console.log('Issue creator not a team member, no need to post comment.'); + return; + } + // Get the latest developer in case there are multiple assignees + assignee = await getLatestAssignee(); + + try { // Check if developer is allowed to work on this issue - const isAdminOrMerge = await memberOfAdminOrMergeTeam(); + const isAdminOrMerge = await memberOfAdminOrMergeTeams(); const isAssignedToAnotherIssues = await assignedToAnotherIssue(); - // If developer is not in Admin or Merge Teams - // and assigned to another issue/s, do the following: - if(!isAdminOrMerge && isAssignedToAnotherIssues) { + // If developer is not in Admin or Merge Teams and assigned to another issue/s, do the following: + if (!isAdminOrMerge && isAssignedToAnotherIssues) { + const comment = await createComment("multiple-issue-reminder.md"); + await postComment(issueNum, comment, github, context); - // Create and post a comment using the template in this file - const fileName = "multiple-issue-reminder.md"; - const filePath = './github-actions/trigger-issue/add-preliminary-comment/' + fileName; - const unAssigningComment = createComment(filePath); - await postComment(issueNum, unAssigningComment, github, context); - await unAssignDev(); // Unassign the developer await addLabel(READY_FOR_DEV_LABEL); // Add 'ready for dev lead' label - - // Update item status to "New Issue Approval" - const item = await getItemInfo(); - await updateItemStatus(item.id, statusesValues.get(New_Issue_Approval)); - } - // Otherwise, post the normal comment - else { - const instructions = await makeComment(); - if(instructions !== null){ - // the actual creation of the comment in github - await postComment(issueNum, instructions, github, context); - - // Update item status to "In progress (actively working)" - const item = await getItemInfo(); - await updateItemStatus(item.id, statusesValues.get(In_Progress)); - } - } - } catch (error) { - console.log(error); - } -} - -/** - * @description - This function makes the comment with the issue developer's GitHub handle using the raw preliminary.md file - * @returns {string} - Comment to be posted with the issue developer's name in it!!! - */ -async function makeComment(){ - try { - // Get status name - const statusName = (await getItemInfo()).statusName; - const isPrework = context.payload.issue.labels.find((label) => label.name == 'Complexity: Prework') ? true : false; - const isDraft = context.payload.issue.labels.find((label) => label.name == 'Draft') ? true : false; + // Update item's status to "New Issue Approval" + const itemInfo = await getItemInfo(); + await updateItemStatus(itemInfo.id, statusValues.get(New_Issue_Approval)); + } - let filename = 'preliminary-update.md'; - - if (statusName == New_Issue_Approval && !isDraft && !isPrework) { - // If author = developer, remind them to add draft label, otherwise unnasign and comment - if (context.payload.issue.user.login == assignee) { - filename = 'draft-label-reminder.md'; - } else { - filename = 'unassign-from-NIA.md'; - - // Unassign the developer - await unAssignDev(); - } + // Otherwise, post the normal comment + else { + const comment = await createComment("preliminary-update.md"); + await postComment(issueNum, comment, github, context); } - - const filePath = './github-actions/trigger-issue/add-preliminary-comment/' + filename; - - const comment = createComment(filePath); - return comment; } catch (error) { - console.log(error); + throw new Error(error); } } @@ -140,7 +99,7 @@ async function memberOfAdminOrMergeTeam() { // Return true if developer is a member of the Admin or Merge Teams return (assignee in websiteAdminsMembers || assignee in websiteMergeMembers); } catch (error) { - console.log("Error getting membership status: ", error); + throw new Error("Error getting membership status: " + error); } } @@ -151,8 +110,8 @@ async function memberOfAdminOrMergeTeam() { async function assignedToAnotherIssue() { try { const issues = (await github.rest.issues.listForRepo({ - owner: "moazDev1", - repo: "website", + owner: context.repo.owner, + repo: context.repo.repo, assignee: assignee, state: "open", // Only fetch opened issues })).data; @@ -180,7 +139,7 @@ async function assignedToAnotherIssue() { // If developer is assigned to another issue/s, return true return otherIssues.length > 1; } catch (error) { - console.log("Error getting other issues: ", error); + throw new Error("Error getting other issues: " + error); } } @@ -190,35 +149,51 @@ async function assignedToAnotherIssue() { async function unAssignDev() { try { await github.rest.issues.removeAssignees({ - owner: "moazDev1", - repo: "website", + owner: context.repo.owner, + repo: context.repo.repo, issue_number: context.payload.issue.number, assignees: [assignee], }); } catch (error) { - console.log("Error unassigning developer: ", error); + throw new Error("Error unassigning developer: " + error); } } /** - * @description - Create a comment using the template of the file in 'filePath' - * @param {String} filePath - file path for the used template + * @description - Create a comment using the template + * of the filenName in "add-preliminary-comment" directory + * @param {String} fileName - the file name of the used template * @returns {String} - return fromatted comment */ -function createComment(filePath) { +async function createComment(fileName) { try { + const { statusName } = await getItemInfo(); + + const isPrework = context.payload.issue.labels.some((label) => label.name === 'Complexity: Prework'); + const isDraft = context.payload.issue.labels.some((label) => label.name === 'Draft'); + + if (statusName === New_Issue_Approval && !isDraft && !isPrework) { + if (context.payload.issue.user.login === assignee) { + fileName = 'draft-label-reminder.md'; + } else { + fileName = 'unassign-from-NIA.md'; + await unAssignDev(); + } + } + + const filePath = './github-actions/trigger-issue/add-preliminary-comment/' + fileName; const commentObject = { replacementString: assignee, placeholderString: '${issueAssignee}', filePathToFormat: filePath, textToFormat: null - } + }; - // Return teh formatted comment - const fromattedComment = formatComment(commentObject, fs); - return fromattedComment; + // Return the formatted comment + const formattedComment = formatComment(commentObject, fs); + return formattedComment; } catch (error) { - console.log("Error creating comment: ", error); + throw new Error("Error creating comment: " + error); } } @@ -229,13 +204,13 @@ function createComment(filePath) { async function addLabel(labelName) { try { await github.rest.issues.addLabels({ - owner: "moazDev1", - repo: "website", + owner: context.repo.owner, + repo: context.repo.repo, issue_number: context.payload.issue.number, labels: [labelName], }); } catch (error) { - console.log("Error Adding label: ", error); + throw new Error("Error Adding label: " + error); } } @@ -259,7 +234,7 @@ async function getLatestAssignee() { return issueAssignee; } catch (error) { - console.log("Error getting last assignee: ", error); + throw new Error("Error getting last assignee: " + error); } } @@ -291,8 +266,8 @@ async function getItemInfo() { }`; const variables = { - owner: "moazDev1", - repo: "website", + owner: context.repo.owner, + repo: context.repo.repo, issueNum: context.payload.issue.number }; @@ -312,7 +287,7 @@ async function getItemInfo() { return {id, statusName}; } catch (error) { - console.log("Error getting item info: ", error); + throw new Error("Error getting item info: " + error); } } @@ -348,7 +323,7 @@ async function updateItemStatus(itemId, newStatusValue) { await github.graphql(mutation, variables); } catch (error) { - console.log("Error moving item: ", error); + throw new Error("Error updating item's status: " + error); } } From 7295e4b36cf2ddbb7df9fa7468716896017e4171 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Thu, 11 Jul 2024 20:47:06 -0700 Subject: [PATCH 52/62] test --- .../add-preliminary-comment/preliminary-update-comment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index bbc8e2a486..9865c9077f 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -58,7 +58,7 @@ async function main({ g, c }, { shouldPost, issueNum }) { try { // Check if developer is allowed to work on this issue - const isAdminOrMerge = await memberOfAdminOrMergeTeams(); + const isAdminOrMerge = await memberOfAdminOrMergeTeam(); const isAssignedToAnotherIssues = await assignedToAnotherIssue(); // If developer is not in Admin or Merge Teams and assigned to another issue/s, do the following: From 0439fef898d2406f58528d16eec637580befea73 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Thu, 11 Jul 2024 20:49:29 -0700 Subject: [PATCH 53/62] test --- github-actions/utils/get-team-members.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github-actions/utils/get-team-members.js b/github-actions/utils/get-team-members.js index a9a02d3808..07d607d763 100644 --- a/github-actions/utils/get-team-members.js +++ b/github-actions/utils/get-team-members.js @@ -13,7 +13,7 @@ async function getTeamMembers(github, context, team){ // Get all members of team. Note: if total members exceed 100, we need to 'flip' pages while(true){ const teamMembers = await github.request('GET /orgs/{org}/teams/{team_slug}/members', { - org: context.repo.owner, + org: "hackforla", team_slug: team, per_page: 100, page: pageNum From 4e416c5e93d215815d4334b8b4d814ba9e5b459e Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Thu, 11 Jul 2024 21:03:28 -0700 Subject: [PATCH 54/62] update --- .../preliminary-update-comment.js | 348 +++++++----------- 1 file changed, 141 insertions(+), 207 deletions(-) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index d8835ae6ed..25af39743f 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -3,6 +3,7 @@ const fs = require("fs"); const postComment = require('../../utils/post-issue-comment'); const formatComment = require('../../utils/format-comment'); const getTimeline = require('../../utils/get-timeline'); +const getTeamMembers = require('../../utils/get-team-members'); // Global variables let github; @@ -19,7 +20,7 @@ const New_Issue_Approval = "New Issue Approval"; const Prioritized_Backlog = "Prioritized backlog"; const In_Progress = "In progress (actively working)"; -const statusesValues = new Map([ +const statusValues = new Map([ [Emergent_Requests, "d468e876"], [New_Issue_Approval, "83187325"], [Prioritized_Backlog, "434304a8"], @@ -41,87 +42,38 @@ const READY_FOR_DEV_LABEL = "ready for dev lead"; * @param {Number} issueNum - The number of the issue where the post will be made */ async function main({ g, c }, { shouldPost, issueNum }) { - try { - github = g; - context = c; - - // Get the lates developer in case there are multiple assignees - assignee = await getLatestAssignee(); - - // If the previous action returns false, stop here - if(shouldPost === false) - return; - - // Check if developer is allowed to work on this issue - const isAdminOrMerge = await memberOfAdminOrMergeTeam(); - const isAssignedToAnotherIssues = await assignedToAnotherIssue(); - - // If developer is not in Admin or Merge Teams - // and assigned to another issue/s, do the following: - if(!isAdminOrMerge && isAssignedToAnotherIssues) { - - // Create and post a comment using the template in this file - const fileName = "multiple-issue-reminder.md"; - const filePath = './github-actions/trigger-issue/add-preliminary-comment/' + fileName; - const unAssigningComment = createComment(filePath); - await postComment(issueNum, unAssigningComment, github, context); - - await unAssignDev(); // Unassign the developer - await addLabel(READY_FOR_DEV_LABEL); // Add 'ready for dev lead' label - - // Update item status to "New Issue Approval" - const item = await getItemInfo(); - await updateItemStatus(item.id, statusesValues.get(New_Issue_Approval)); - } - // Otherwise, post the normal comment - else { - const instructions = await makeComment(); - if(instructions !== null){ - // the actual creation of the comment in github - await postComment(issueNum, instructions, github, context); - - // Update item status to "In progress (actively working)" - const item = await getItemInfo(); - await updateItemStatus(item.id, statusesValues.get(In_Progress)); - } - } - } catch (error) { - console.log(error); + // If the previous action returns false, stop here + if (shouldPost === false) { + console.log('Issue creator not a team member, no need to post comment.'); + return; } -} -/** - * @description - This function makes the comment with the issue developer's GitHub handle using the raw preliminary.md file - * @returns {string} - Comment to be posted with the issue developer's name in it!!! - */ -async function makeComment(){ - try { - // Get status name - const statusName = (await getItemInfo()).statusName; - - const isPrework = context.payload.issue.labels.find((label) => label.name == 'Complexity: Prework') ? true : false; - const isDraft = context.payload.issue.labels.find((label) => label.name == 'Draft') ? true : false; + github = g; + context = c; + // Get the latest developer in case there are multiple assignees + assignee = await getLatestAssignee(); - let filename = 'preliminary-update.md'; + // Check if developer is allowed to work on this issue + const isAdminOrMerge = await memberOfAdminOrMergeTeam(); + const isAssignedToAnotherIssues = await assignedToAnotherIssue(); - if (statusName == New_Issue_Approval && !isDraft && !isPrework) { - // If author = developer, remind them to add draft label, otherwise unnasign and comment - if (context.payload.issue.user.login == assignee) { - filename = 'draft-label-reminder.md'; - } else { - filename = 'unassign-from-NIA.md'; + // If developer is not in Admin or Merge Teams and assigned to another issue/s, do the following: + if (!isAdminOrMerge && isAssignedToAnotherIssues) { + const comment = await createComment("multiple-issue-reminder.md"); + await postComment(issueNum, comment, github, context); - // Unassign the developer - await unAssignDev(); - } - } + await unAssignDev(); // Unassign the developer + await addLabel(READY_FOR_DEV_LABEL); // Add 'ready for dev lead' label - const filePath = './github-actions/trigger-issue/add-preliminary-comment/' + filename; + // Update item's status to "New Issue Approval" + const itemInfo = await getItemInfo(); + await updateItemStatus(itemInfo.id, statusValues.get(New_Issue_Approval)); + } - const comment = createComment(filePath); - return comment; - } catch (error) { - console.log(error); + // Otherwise, post the normal comment + else { + const comment = await createComment("preliminary-update.md"); + await postComment(issueNum, comment, github, context); } } @@ -130,96 +82,96 @@ async function makeComment(){ * @returns {Boolean} - return true if developer is member of Admin/Merge team, false otherwise */ async function memberOfAdminOrMergeTeam() { - try { - // Get all members in Admin Team - const websiteAdminsMembers = await getTeamMembers(github, context, "website-admins"); + // Get all members in Admin Team + const websiteAdminsMembers = await getTeamMembers(github, context, "website-admins"); - // Get all members in Merge Team - const websiteMergeMembers = await getTeamMembers(github, context, "website-merge"); + // Get all members in Merge Team + const websiteMergeMembers = await getTeamMembers(github, context, "website-merge"); - // Return true if developer is a member of the Admin or Merge Teams - return (assignee in websiteAdminsMembers || assignee in websiteMergeMembers); - } catch (error) { - console.log("Error getting membership status: ", error); - } + // Return true if developer is a member of the Admin or Merge Teams + return (assignee in websiteAdminsMembers || assignee in websiteMergeMembers); } /** * @description - Check whether developer is assigned to another issue - * @returns {Boolean} - return true if developer is assinged to another issue/s + * @returns {Boolean} - return true if developer is assigned to another issue/s */ async function assignedToAnotherIssue() { - try { - const issues = (await github.rest.issues.listForRepo({ - owner: context.repo.owner, - repo: context.repo.repo, - assignee: assignee, - state: "open", // Only fetch opened issues - })).data; + const issues = (await github.rest.issues.listForRepo({ + owner: context.repo.owner, + repo: context.repo.repo, + assignee: assignee, + state: "open", // Only fetch opened issues + })).data; - const otherIssues = []; + const otherIssues = []; - for(const issue of issues) { - // Check is it's an "Agenda" issue - const isAgendaIssue = issue.labels.some(label => label.name === "feature: agenda"); + for(const issue of issues) { + // Check is it's an "Agenda" issue + const isAgendaIssue = issue.labels.some(label => label.name === "feature: agenda"); - // Check if it's a "Prework" issue - const isPreWork = issue.labels.some(label => label.name === "Complexity: Prework"); + // Check if it's a "Prework" issue + const isPreWork = issue.labels.some(label => label.name === "Complexity: Prework"); - // Check if it exists in "Emergent Request" Status - const inEmergentRequestStatus = (await getItemInfo()).statusName === Emergent_Requests; + // Check if it exists in "Emergent Request" Status + const inEmergentRequestStatus = (await getItemInfo()).statusName === Emergent_Requests; - // Check if it exists in "New Issue Approval" Status - const inNewIssueApprovalStatus = (await getItemInfo()).statusName === New_Issue_Approval; + // Check if it exists in "New Issue Approval" Status + const inNewIssueApprovalStatus = (await getItemInfo()).statusName === New_Issue_Approval; - // Include the issue only if none of the conditions are met - if(!(isAgendaIssue || isPreWork || inEmergentRequestStatus || inNewIssueApprovalStatus)) - otherIssues.push(issue); - } - - // If developer is assigned to another issue/s, return true - return otherIssues.length > 1; - } catch (error) { - console.log("Error getting other issues: ", error); + // Include the issue only if none of the conditions are met + if(!(isAgendaIssue || isPreWork || inEmergentRequestStatus || inNewIssueApprovalStatus)) + otherIssues.push(issue); } + + // If developer is assigned to another issue/s, return true + return otherIssues.length > 1; } /** * @description - Unassign developer from the issue */ async function unAssignDev() { - try { - await github.rest.issues.removeAssignees({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.issue.number, - assignees: [assignee], - }); - } catch (error) { - console.log("Error unassigning developer: ", error); - } + await github.rest.issues.removeAssignees({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.issue.number, + assignees: [assignee], + }); } /** - * @description - Create a comment using the template of the file in 'filePath' - * @param {String} filePath - file path for the used template - * @returns {String} - return fromatted comment + * @description - Create a comment using the template + * of the filenName in "add-preliminary-comment" directory + * @param {String} fileName - the file name of the used template + * @returns {String} - return formatted comment */ -function createComment(filePath) { - try { - const commentObject = { - replacementString: assignee, - placeholderString: '${issueAssignee}', - filePathToFormat: filePath, - textToFormat: null +async function createComment(fileName) { + const { statusName } = await getItemInfo(); + + const isPrework = context.payload.issue.labels.some((label) => label.name === 'Complexity: Prework'); + const isDraft = context.payload.issue.labels.some((label) => label.name === 'Draft'); + + if (statusName === New_Issue_Approval && !isDraft && !isPrework) { + if (context.payload.issue.user.login === assignee) { + fileName = 'draft-label-reminder.md'; + } else { + fileName = 'unassign-from-NIA.md'; + await unAssignDev(); } - - // Return teh formatted comment - const fromattedComment = formatComment(commentObject, fs); - return fromattedComment; - } catch (error) { - console.log("Error creating comment: ", error); } + + const filePath = './github-actions/trigger-issue/add-preliminary-comment/' + fileName; + const commentObject = { + replacementString: assignee, + placeholderString: '${issueAssignee}', + filePathToFormat: filePath, + textToFormat: null + }; + + // Return the formatted comment + const formattedComment = formatComment(commentObject, fs); + return formattedComment; } /** @@ -227,40 +179,32 @@ function createComment(filePath) { * @param {String} labelName - Name of the label to add */ async function addLabel(labelName) { - try { - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.issue.number, - labels: [labelName], - }); - } catch (error) { - console.log("Error Adding label: ", error); - } + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.issue.number, + labels: [labelName], + }); } /** - * @description - Get latest assignee, in case there are multimple assignees to the issue + * @description - Get latest assignee, in case there are multiple assignees to the issue * @returns {String} - return the username of the latest assignee */ async function getLatestAssignee() { - try { - let issueAssignee = context.payload.issue.assignee.login; + let issueAssignee = context.payload.issue.assignee.login; - const eventdescriptions = await getTimeline(context.payload.issue.number, github, context); + const eventdescriptions = await getTimeline(context.payload.issue.number, github, context); - // Find out the latest developer assigned to the issue - for(let i = eventdescriptions.length - 1 ; i>=0; i-=1){ - if(eventdescriptions[i].event == 'assigned'){ - issueAssignee = eventdescriptions[i].assignee.login - break - } + // Find out the latest developer assigned to the issue + for(let i = eventdescriptions.length - 1 ; i>=0; i-=1){ + if(eventdescriptions[i].event == 'assigned'){ + issueAssignee = eventdescriptions[i].assignee.login; + break; } - - return issueAssignee; - } catch (error) { - console.log("Error getting last assignee: ", error); } + + return issueAssignee; } /** @@ -268,27 +212,26 @@ async function getLatestAssignee() { * @returns {Object} - An object containing the item ID and its status name */ async function getItemInfo() { - try { - const query = `query($owner: String!, $repo: String!, $issueNum: Int!) { - repository(owner: $owner, name: $repo) { - issue(number: $issueNum) { - id - projectItems(first: 100) { - nodes { - id - fieldValues(first: 100) { - nodes { - ... on ProjectV2ItemFieldSingleSelectValue { - name - } + const query = `query($owner: String!, $repo: String!, $issueNum: Int!) { + repository(owner: $owner, name: $repo) { + issue(number: $issueNum) { + id + projectItems(first: 100) { + nodes { + id + fieldValues(first: 100) { + nodes { + ... on ProjectV2ItemFieldSingleSelectValue { + name } } } } } } - }`; - + } + }`; + const variables = { owner: context.repo.owner, repo: context.repo.repo, @@ -308,11 +251,7 @@ async function getItemInfo() { // and find the node that contains the 'name' property, then get its 'name' value const statusName = projectItems[0].fieldValues.nodes.find(item => item.hasOwnProperty('name')).name; - return {id, statusName}; - - } catch (error) { - console.log("Error getting item info: ", error); - } + return { id, statusName }; } /** @@ -321,34 +260,29 @@ async function getItemInfo() { * @param {String} newStatusValue - The new status value to be assigned to the item */ async function updateItemStatus(itemId, newStatusValue) { - try { - const mutation = `mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $value: String!) { - updateProjectV2ItemFieldValue(input: { - projectId: $projectId, - itemId: $itemId, - fieldId: $fieldId, - value: { - singleSelectOptionId: $value - } - }) { - projectV2Item { - id - } + const mutation = `mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $value: String!) { + updateProjectV2ItemFieldValue(input: { + projectId: $projectId, + itemId: $itemId, + fieldId: $fieldId, + value: { + singleSelectOptionId: $value } - }` - - const variables = { - projectId: PROJECT_ID, - itemId: itemId, - fieldId: STATUS_FIELD_ID, - value: newStatusValue - }; + }) { + projectV2Item { + id + } + } + }`; - await github.graphql(mutation, variables); + const variables = { + projectId: PROJECT_ID, + itemId: itemId, + fieldId: STATUS_FIELD_ID, + value: newStatusValue + }; - } catch (error) { - console.log("Error moving item: ", error); - } + await github.graphql(mutation, variables); } module.exports = main; \ No newline at end of file From ac67600fb4502e77a89000b08a30a79a95d8dcba Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Thu, 11 Jul 2024 21:09:52 -0700 Subject: [PATCH 55/62] update main function & remove makeComment function --- .../add-preliminary-comment/preliminary-update-comment.js | 1 + 1 file changed, 1 insertion(+) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index 25af39743f..b5792ea656 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -42,6 +42,7 @@ const READY_FOR_DEV_LABEL = "ready for dev lead"; * @param {Number} issueNum - The number of the issue where the post will be made */ async function main({ g, c }, { shouldPost, issueNum }) { + // If the previous action returns false, stop here if (shouldPost === false) { console.log('Issue creator not a team member, no need to post comment.'); From e8fa628a7f8106b7b84144797ee11c4b4dc85811 Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Fri, 12 Jul 2024 01:25:17 -0700 Subject: [PATCH 56/62] fix github-data.json conflict --- _data/external/github-data.json | 1230 ++++++++++++++----------------- 1 file changed, 567 insertions(+), 663 deletions(-) diff --git a/_data/external/github-data.json b/_data/external/github-data.json index ec617d57ed..27631651f3 100644 --- a/_data/external/github-data.json +++ b/_data/external/github-data.json @@ -1764,11 +1764,7 @@ "github_url": "https://github.com/HackforLABot", "avatar_url": "https://avatars.githubusercontent.com/u/64623632?v=4", "gravatar_id": "", -<<<<<<< HEAD - "contributions": 2531 -======= "contributions": 2538 ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 }, { "id": 37763229, @@ -1831,7 +1827,7 @@ "github_url": "https://github.com/t-will-gillis", "avatar_url": "https://avatars.githubusercontent.com/u/40799239?v=4", "gravatar_id": "", - "contributions": 49 + "contributions": 50 }, { "id": 50648001, @@ -2913,7 +2909,7 @@ }, { "id": 98272636, - "github_url": "https://github.com/Benji-Montgomery", + "github_url": "https://github.com/maybleMyers", "avatar_url": "https://avatars.githubusercontent.com/u/98272636?v=4", "gravatar_id": "", "contributions": 4 @@ -2961,16 +2957,23 @@ "contributions": 4 }, { - "id": 100797135, - "github_url": "https://github.com/LOSjr4", - "avatar_url": "https://avatars.githubusercontent.com/u/100797135?v=4", + "id": 11392776, + "github_url": "https://github.com/heylittlehouse", + "avatar_url": "https://avatars.githubusercontent.com/u/11392776?v=4", "gravatar_id": "", "contributions": 4 }, { - "id": 103547011, - "github_url": "https://github.com/lilyarj", - "avatar_url": "https://avatars.githubusercontent.com/u/103547011?v=4", + "id": 63900848, + "github_url": "https://github.com/mehmehmehlol", + "avatar_url": "https://avatars.githubusercontent.com/u/63900848?v=4", + "gravatar_id": "", + "contributions": 4 + }, + { + "id": 38057626, + "github_url": "https://github.com/Mattre7", + "avatar_url": "https://avatars.githubusercontent.com/u/38057626?v=4", "gravatar_id": "", "contributions": 4 }, @@ -2982,9 +2985,16 @@ "contributions": 4 }, { - "id": 38057626, - "github_url": "https://github.com/Mattre7", - "avatar_url": "https://avatars.githubusercontent.com/u/38057626?v=4", + "id": 100797135, + "github_url": "https://github.com/LOSjr4", + "avatar_url": "https://avatars.githubusercontent.com/u/100797135?v=4", + "gravatar_id": "", + "contributions": 4 + }, + { + "id": 103547011, + "github_url": "https://github.com/lilyarj", + "avatar_url": "https://avatars.githubusercontent.com/u/103547011?v=4", "gravatar_id": "", "contributions": 4 }, @@ -3009,13 +3019,6 @@ "gravatar_id": "", "contributions": 4 }, - { - "id": 63900848, - "github_url": "https://github.com/mehmehmehlol", - "avatar_url": "https://avatars.githubusercontent.com/u/63900848?v=4", - "gravatar_id": "", - "contributions": 4 - }, { "id": 29113012, "github_url": "https://github.com/kotynskm", @@ -3031,23 +3034,30 @@ "contributions": 4 }, { - "id": 11392776, - "github_url": "https://github.com/heylittlehouse", - "avatar_url": "https://avatars.githubusercontent.com/u/11392776?v=4", + "id": 97845061, + "github_url": "https://github.com/janice87", + "avatar_url": "https://avatars.githubusercontent.com/u/97845061?v=4", "gravatar_id": "", "contributions": 4 }, { - "id": 63170710, - "github_url": "https://github.com/josiehandeveloper", - "avatar_url": "https://avatars.githubusercontent.com/u/63170710?v=4", + "id": 42814942, + "github_url": "https://github.com/JasonY188", + "avatar_url": "https://avatars.githubusercontent.com/u/42814942?v=4", "gravatar_id": "", "contributions": 4 }, { - "id": 69279538, - "github_url": "https://github.com/Skydodle", - "avatar_url": "https://avatars.githubusercontent.com/u/69279538?v=4", + "id": 58538332, + "github_url": "https://github.com/jamesberke", + "avatar_url": "https://avatars.githubusercontent.com/u/58538332?v=4", + "gravatar_id": "", + "contributions": 4 + }, + { + "id": 34320199, + "github_url": "https://github.com/iancooperman", + "avatar_url": "https://avatars.githubusercontent.com/u/34320199?v=4", "gravatar_id": "", "contributions": 4 }, @@ -3059,23 +3069,23 @@ "contributions": 4 }, { - "id": 42814942, - "github_url": "https://github.com/JasonY188", - "avatar_url": "https://avatars.githubusercontent.com/u/42814942?v=4", + "id": 69279538, + "github_url": "https://github.com/Skydodle", + "avatar_url": "https://avatars.githubusercontent.com/u/69279538?v=4", "gravatar_id": "", "contributions": 4 }, { - "id": 97845061, - "github_url": "https://github.com/janice87", - "avatar_url": "https://avatars.githubusercontent.com/u/97845061?v=4", + "id": 63170710, + "github_url": "https://github.com/josiehandeveloper", + "avatar_url": "https://avatars.githubusercontent.com/u/63170710?v=4", "gravatar_id": "", "contributions": 4 }, { - "id": 58538332, - "github_url": "https://github.com/jamesberke", - "avatar_url": "https://avatars.githubusercontent.com/u/58538332?v=4", + "id": 133067265, + "github_url": "https://github.com/heejung-hong", + "avatar_url": "https://avatars.githubusercontent.com/u/133067265?v=4", "gravatar_id": "", "contributions": 4 }, @@ -3087,51 +3097,37 @@ "contributions": 4 }, { - "id": 34320199, - "github_url": "https://github.com/iancooperman", - "avatar_url": "https://avatars.githubusercontent.com/u/34320199?v=4", - "gravatar_id": "", - "contributions": 4 - }, - { - "id": 133067265, - "github_url": "https://github.com/heejung-hong", - "avatar_url": "https://avatars.githubusercontent.com/u/133067265?v=4", - "gravatar_id": "", - "contributions": 4 - }, - { - "id": 41170744, - "github_url": "https://github.com/poorvi4", - "avatar_url": "https://avatars.githubusercontent.com/u/41170744?v=4", + "id": 99108792, + "github_url": "https://github.com/se7en-illa", + "avatar_url": "https://avatars.githubusercontent.com/u/99108792?v=4", "gravatar_id": "", "contributions": 3 }, { - "id": 104021517, - "github_url": "https://github.com/ramitaarora", - "avatar_url": "https://avatars.githubusercontent.com/u/104021517?v=4", + "id": 53095957, + "github_url": "https://github.com/santisecco", + "avatar_url": "https://avatars.githubusercontent.com/u/53095957?v=4", "gravatar_id": "", "contributions": 3 }, { - "id": 97300861, - "github_url": "https://github.com/GRK1998", - "avatar_url": "https://avatars.githubusercontent.com/u/97300861?v=4", + "id": 73435094, + "github_url": "https://github.com/SZwerling", + "avatar_url": "https://avatars.githubusercontent.com/u/73435094?v=4", "gravatar_id": "", "contributions": 3 }, { - "id": 59513509, - "github_url": "https://github.com/LRenDO", - "avatar_url": "https://avatars.githubusercontent.com/u/59513509?v=4", + "id": 47019139, + "github_url": "https://github.com/siddhanthiyer-99", + "avatar_url": "https://avatars.githubusercontent.com/u/47019139?v=4", "gravatar_id": "", "contributions": 3 }, { - "id": 109993270, - "github_url": "https://github.com/richardmundyiii", - "avatar_url": "https://avatars.githubusercontent.com/u/109993270?v=4", + "id": 105510284, + "github_url": "https://github.com/RyanGehris", + "avatar_url": "https://avatars.githubusercontent.com/u/105510284?v=4", "gravatar_id": "", "contributions": 3 }, @@ -3143,37 +3139,37 @@ "contributions": 3 }, { - "id": 105510284, - "github_url": "https://github.com/RyanGehris", - "avatar_url": "https://avatars.githubusercontent.com/u/105510284?v=4", + "id": 109993270, + "github_url": "https://github.com/richardmundyiii", + "avatar_url": "https://avatars.githubusercontent.com/u/109993270?v=4", "gravatar_id": "", "contributions": 3 }, { - "id": 73435094, - "github_url": "https://github.com/SZwerling", - "avatar_url": "https://avatars.githubusercontent.com/u/73435094?v=4", + "id": 59513509, + "github_url": "https://github.com/LRenDO", + "avatar_url": "https://avatars.githubusercontent.com/u/59513509?v=4", "gravatar_id": "", "contributions": 3 }, { - "id": 53095957, - "github_url": "https://github.com/santisecco", - "avatar_url": "https://avatars.githubusercontent.com/u/53095957?v=4", + "id": 97300861, + "github_url": "https://github.com/GRK1998", + "avatar_url": "https://avatars.githubusercontent.com/u/97300861?v=4", "gravatar_id": "", "contributions": 3 }, { - "id": 99108792, - "github_url": "https://github.com/se7en-illa", - "avatar_url": "https://avatars.githubusercontent.com/u/99108792?v=4", + "id": 104021517, + "github_url": "https://github.com/ramitaarora", + "avatar_url": "https://avatars.githubusercontent.com/u/104021517?v=4", "gravatar_id": "", "contributions": 3 }, { - "id": 40847839, - "github_url": "https://github.com/sakibian", - "avatar_url": "https://avatars.githubusercontent.com/u/40847839?v=4", + "id": 41170744, + "github_url": "https://github.com/poorvi4", + "avatar_url": "https://avatars.githubusercontent.com/u/41170744?v=4", "gravatar_id": "", "contributions": 3 }, @@ -3261,6 +3257,13 @@ "gravatar_id": "", "contributions": 3 }, + { + "id": 111899522, + "github_url": "https://github.com/MatthewBozin", + "avatar_url": "https://avatars.githubusercontent.com/u/111899522?v=4", + "gravatar_id": "", + "contributions": 3 + }, { "id": 113082803, "github_url": "https://github.com/MattChau01", @@ -3269,9 +3272,9 @@ "contributions": 3 }, { - "id": 111899522, - "github_url": "https://github.com/MatthewBozin", - "avatar_url": "https://avatars.githubusercontent.com/u/111899522?v=4", + "id": 40847839, + "github_url": "https://github.com/sakibian", + "avatar_url": "https://avatars.githubusercontent.com/u/40847839?v=4", "gravatar_id": "", "contributions": 3 }, @@ -3324,6 +3327,13 @@ "gravatar_id": "", "contributions": 3 }, + { + "id": 85697744, + "github_url": "https://github.com/vanessasinam", + "avatar_url": "https://avatars.githubusercontent.com/u/85697744?v=4", + "gravatar_id": "", + "contributions": 3 + }, { "id": 97491762, "github_url": "https://github.com/samuelusc", @@ -3368,7 +3378,7 @@ }, { "id": 111248453, - "github_url": "https://github.com/lateral-neck-stretch", + "github_url": "https://github.com/antho-zng", "avatar_url": "https://avatars.githubusercontent.com/u/111248453?v=4", "gravatar_id": "", "contributions": 3 @@ -3464,20 +3474,6 @@ "gravatar_id": "", "contributions": 3 }, - { - "id": 47019139, - "github_url": "https://github.com/siddhanthiyer-99", - "avatar_url": "https://avatars.githubusercontent.com/u/47019139?v=4", - "gravatar_id": "", - "contributions": 3 - }, - { - "id": 109241790, - "github_url": "https://github.com/mariareeves", - "avatar_url": "https://avatars.githubusercontent.com/u/109241790?v=4", - "gravatar_id": "", - "contributions": 3 - }, { "id": 59514779, "github_url": "https://github.com/DorianDeptuch", @@ -3506,6 +3502,13 @@ "gravatar_id": "", "contributions": 3 }, + { + "id": 62191468, + "github_url": "https://github.com/DrAcula27", + "avatar_url": "https://avatars.githubusercontent.com/u/62191468?v=4", + "gravatar_id": "", + "contributions": 3 + }, { "id": 54155014, "github_url": "https://github.com/DanielekPark", @@ -3688,6 +3691,13 @@ "gravatar_id": "", "contributions": 3 }, + { + "id": 79176075, + "github_url": "https://github.com/mrodz", + "avatar_url": "https://avatars.githubusercontent.com/u/79176075?v=4", + "gravatar_id": "", + "contributions": 3 + }, { "id": 98199834, "github_url": "https://github.com/liamtirney", @@ -3696,9 +3706,9 @@ "contributions": 3 }, { - "id": 79176075, - "github_url": "https://github.com/mrodz", - "avatar_url": "https://avatars.githubusercontent.com/u/79176075?v=4", + "id": 109241790, + "github_url": "https://github.com/mariareeves", + "avatar_url": "https://avatars.githubusercontent.com/u/109241790?v=4", "gravatar_id": "", "contributions": 3 }, @@ -3779,55 +3789,6 @@ "gravatar_id": "", "contributions": 3 }, - { - "id": 1521996, - "github_url": "https://github.com/joshuazrobins", - "avatar_url": "https://avatars.githubusercontent.com/u/1521996?v=4", - "gravatar_id": "", - "contributions": 3 - }, - { - "id": 81275727, - "github_url": "https://github.com/Johnnie007", - "avatar_url": "https://avatars.githubusercontent.com/u/81275727?v=4", - "gravatar_id": "", - "contributions": 3 - }, - { - "id": 44798179, - "github_url": "https://github.com/JohnJBarrett22", - "avatar_url": "https://avatars.githubusercontent.com/u/44798179?v=4", - "gravatar_id": "", - "contributions": 3 - }, - { - "id": 80556079, - "github_url": "https://github.com/jenny-alexander", - "avatar_url": "https://avatars.githubusercontent.com/u/80556079?v=4", - "gravatar_id": "", - "contributions": 3 - }, - { - "id": 137461800, - "github_url": "https://github.com/Jperparas", - "avatar_url": "https://avatars.githubusercontent.com/u/137461800?v=4", - "gravatar_id": "", - "contributions": 3 - }, - { - "id": 12547172, - "github_url": "https://github.com/jefflueck", - "avatar_url": "https://avatars.githubusercontent.com/u/12547172?v=4", - "gravatar_id": "", - "contributions": 3 - }, - { - "id": 119633800, - "github_url": "https://github.com/jleung7158", - "avatar_url": "https://avatars.githubusercontent.com/u/119633800?v=4", - "gravatar_id": "", - "contributions": 3 - }, { "id": 137654369, "github_url": "https://github.com/dustinowen", @@ -3850,9 +3811,23 @@ "contributions": 3 }, { - "id": 37560463, - "github_url": "https://github.com/muninnhugin", - "avatar_url": "https://avatars.githubusercontent.com/u/37560463?v=4", + "id": 69206621, + "github_url": "https://github.com/edeneault", + "avatar_url": "https://avatars.githubusercontent.com/u/69206621?v=4", + "gravatar_id": "", + "contributions": 3 + }, + { + "id": 7707247, + "github_url": "https://github.com/frankstepanski", + "avatar_url": "https://avatars.githubusercontent.com/u/7707247?v=4", + "gravatar_id": "", + "contributions": 3 + }, + { + "id": 22206381, + "github_url": "https://github.com/hit1st", + "avatar_url": "https://avatars.githubusercontent.com/u/22206381?v=4", "gravatar_id": "", "contributions": 3 }, @@ -3864,44 +3839,65 @@ "contributions": 3 }, { - "id": 69206621, - "github_url": "https://github.com/edeneault", - "avatar_url": "https://avatars.githubusercontent.com/u/69206621?v=4", + "id": 37560463, + "github_url": "https://github.com/muninnhugin", + "avatar_url": "https://avatars.githubusercontent.com/u/37560463?v=4", "gravatar_id": "", "contributions": 3 }, { - "id": 22206381, - "github_url": "https://github.com/hit1st", - "avatar_url": "https://avatars.githubusercontent.com/u/22206381?v=4", + "id": 119633800, + "github_url": "https://github.com/jleung7158", + "avatar_url": "https://avatars.githubusercontent.com/u/119633800?v=4", "gravatar_id": "", "contributions": 3 }, { - "id": 7707247, - "github_url": "https://github.com/frankstepanski", - "avatar_url": "https://avatars.githubusercontent.com/u/7707247?v=4", + "id": 12547172, + "github_url": "https://github.com/jefflueck", + "avatar_url": "https://avatars.githubusercontent.com/u/12547172?v=4", "gravatar_id": "", "contributions": 3 }, { - "id": 56055132, - "github_url": "https://github.com/steven-positive-tran", - "avatar_url": "https://avatars.githubusercontent.com/u/56055132?v=4", + "id": 137461800, + "github_url": "https://github.com/Jperparas", + "avatar_url": "https://avatars.githubusercontent.com/u/137461800?v=4", "gravatar_id": "", - "contributions": 2 + "contributions": 3 }, { - "id": 20288105, - "github_url": "https://github.com/wongstephen", - "avatar_url": "https://avatars.githubusercontent.com/u/20288105?v=4", + "id": 80556079, + "github_url": "https://github.com/jenny-alexander", + "avatar_url": "https://avatars.githubusercontent.com/u/80556079?v=4", "gravatar_id": "", - "contributions": 2 + "contributions": 3 }, { - "id": 43686529, - "github_url": "https://github.com/segbuniwe", - "avatar_url": "https://avatars.githubusercontent.com/u/43686529?v=4", + "id": 44798179, + "github_url": "https://github.com/JohnJBarrett22", + "avatar_url": "https://avatars.githubusercontent.com/u/44798179?v=4", + "gravatar_id": "", + "contributions": 3 + }, + { + "id": 81275727, + "github_url": "https://github.com/Johnnie007", + "avatar_url": "https://avatars.githubusercontent.com/u/81275727?v=4", + "gravatar_id": "", + "contributions": 3 + }, + { + "id": 1521996, + "github_url": "https://github.com/joshuazrobins", + "avatar_url": "https://avatars.githubusercontent.com/u/1521996?v=4", + "gravatar_id": "", + "contributions": 3 + }, + { + "id": 18178289, + "github_url": "https://github.com/McRawly", + "avatar_url": "https://avatars.githubusercontent.com/u/18178289?v=4", "gravatar_id": "", "contributions": 2 }, @@ -3913,9 +3909,9 @@ "contributions": 2 }, { - "id": 18178289, - "github_url": "https://github.com/McRawly", - "avatar_url": "https://avatars.githubusercontent.com/u/18178289?v=4", + "id": 43686529, + "github_url": "https://github.com/segbuniwe", + "avatar_url": "https://avatars.githubusercontent.com/u/43686529?v=4", "gravatar_id": "", "contributions": 2 }, @@ -3926,6 +3922,20 @@ "gravatar_id": "", "contributions": 2 }, + { + "id": 20288105, + "github_url": "https://github.com/wongstephen", + "avatar_url": "https://avatars.githubusercontent.com/u/20288105?v=4", + "gravatar_id": "", + "contributions": 2 + }, + { + "id": 56055132, + "github_url": "https://github.com/steven-positive-tran", + "avatar_url": "https://avatars.githubusercontent.com/u/56055132?v=4", + "gravatar_id": "", + "contributions": 2 + }, { "id": 98753789, "github_url": "https://github.com/aramattamara", @@ -3969,16 +3979,16 @@ "contributions": 2 }, { - "id": 94583613, - "github_url": "https://github.com/vanessavun", - "avatar_url": "https://avatars.githubusercontent.com/u/94583613?v=4", + "id": 21973799, + "github_url": "https://github.com/rankdjr", + "avatar_url": "https://avatars.githubusercontent.com/u/21973799?v=4", "gravatar_id": "", "contributions": 2 }, { - "id": 104741653, - "github_url": "https://github.com/homeroochoa47", - "avatar_url": "https://avatars.githubusercontent.com/u/104741653?v=4", + "id": 157540251, + "github_url": "https://github.com/melissam640", + "avatar_url": "https://avatars.githubusercontent.com/u/157540251?v=4", "gravatar_id": "", "contributions": 2 }, @@ -4094,13 +4104,6 @@ "gravatar_id": "", "contributions": 2 }, - { - "id": 21973799, - "github_url": "https://github.com/rankdjr", - "avatar_url": "https://avatars.githubusercontent.com/u/21973799?v=4", - "gravatar_id": "", - "contributions": 2 - }, { "id": 19783179, "github_url": "https://github.com/ajb176", @@ -4122,13 +4125,6 @@ "gravatar_id": "", "contributions": 2 }, - { - "id": 85697744, - "github_url": "https://github.com/vanessasinam", - "avatar_url": "https://avatars.githubusercontent.com/u/85697744?v=4", - "gravatar_id": "", - "contributions": 2 - }, { "id": 112468285, "github_url": "https://github.com/str-xjua24", @@ -4311,6 +4307,20 @@ "gravatar_id": "", "contributions": 2 }, + { + "id": 94583613, + "github_url": "https://github.com/vanessavun", + "avatar_url": "https://avatars.githubusercontent.com/u/94583613?v=4", + "gravatar_id": "", + "contributions": 2 + }, + { + "id": 104741653, + "github_url": "https://github.com/homeroochoa47", + "avatar_url": "https://avatars.githubusercontent.com/u/104741653?v=4", + "gravatar_id": "", + "contributions": 2 + }, { "id": 52048653, "github_url": "https://github.com/h3nry-m", @@ -4409,13 +4419,6 @@ "gravatar_id": "", "contributions": 2 }, - { - "id": 62191468, - "github_url": "https://github.com/DrAcula27", - "avatar_url": "https://avatars.githubusercontent.com/u/62191468?v=4", - "gravatar_id": "", - "contributions": 2 - }, { "id": 64837366, "github_url": "https://github.com/cchrizzle", @@ -4528,13 +4531,6 @@ "gravatar_id": "", "contributions": 2 }, - { - "id": 157540251, - "github_url": "https://github.com/melissam640", - "avatar_url": "https://avatars.githubusercontent.com/u/157540251?v=4", - "gravatar_id": "", - "contributions": 2 - }, { "id": 38964454, "github_url": "https://github.com/mcspach", @@ -4957,22 +4953,14 @@ "github_url": "https://github.com/apps/github-actions", "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", "gravatar_id": "", -<<<<<<< HEAD - "contributions": 16562 -======= "contributions": 16617 ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 }, { "id": 37763229, "github_url": "https://github.com/ExperimentsInHonesty", "avatar_url": "https://avatars.githubusercontent.com/u/37763229?v=4", "gravatar_id": "", -<<<<<<< HEAD - "contributions": 3791 -======= "contributions": 3809 ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 }, { "id": 31293603, @@ -4986,11 +4974,7 @@ "github_url": "https://github.com/roslynwythe", "avatar_url": "https://avatars.githubusercontent.com/u/5314153?v=4", "gravatar_id": "", -<<<<<<< HEAD - "contributions": 1854 -======= "contributions": 1871 ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 }, { "id": 843538, @@ -5004,11 +4988,7 @@ "github_url": "https://github.com/t-will-gillis", "avatar_url": "https://avatars.githubusercontent.com/u/40799239?v=4", "gravatar_id": "", -<<<<<<< HEAD - "contributions": 809 -======= "contributions": 833 ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 }, { "id": 88953806, @@ -5122,18 +5102,18 @@ "gravatar_id": "", "contributions": 181 }, - { - "id": 81049661, - "github_url": "https://github.com/kathrynsilvaconway", - "avatar_url": "https://avatars.githubusercontent.com/u/81049661?v=4", - "gravatar_id": "", - "contributions": 173 - }, { "id": 122488603, "github_url": "https://github.com/Thinking-Panda", "avatar_url": "https://avatars.githubusercontent.com/u/122488603?v=4", "gravatar_id": "", + "contributions": 174 + }, + { + "id": 81049661, + "github_url": "https://github.com/kathrynsilvaconway", + "avatar_url": "https://avatars.githubusercontent.com/u/81049661?v=4", + "gravatar_id": "", "contributions": 173 }, { @@ -5316,11 +5296,7 @@ "github_url": "https://github.com/jyaymie", "avatar_url": "https://avatars.githubusercontent.com/u/104411072?v=4", "gravatar_id": "", -<<<<<<< HEAD - "contributions": 85 -======= "contributions": 87 ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 }, { "id": 86996158, @@ -5337,18 +5313,18 @@ "contributions": 76 }, { - "id": 103547011, - "github_url": "https://github.com/lilyarj", - "avatar_url": "https://avatars.githubusercontent.com/u/103547011?v=4", + "id": 16524851, + "github_url": "https://github.com/tony1ee", + "avatar_url": "https://avatars.githubusercontent.com/u/16524851?v=4", "gravatar_id": "", "contributions": 75 }, { - "id": 16524851, - "github_url": "https://github.com/tony1ee", - "avatar_url": "https://avatars.githubusercontent.com/u/16524851?v=4", + "id": 103547011, + "github_url": "https://github.com/lilyarj", + "avatar_url": "https://avatars.githubusercontent.com/u/103547011?v=4", "gravatar_id": "", - "contributions": 74 + "contributions": 75 }, { "id": 67438372, @@ -5707,6 +5683,13 @@ "gravatar_id": "", "contributions": 41 }, + { + "id": 104021517, + "github_url": "https://github.com/ramitaarora", + "avatar_url": "https://avatars.githubusercontent.com/u/104021517?v=4", + "gravatar_id": "", + "contributions": 41 + }, { "id": 105128681, "github_url": "https://github.com/karengcecena", @@ -5736,11 +5719,6 @@ "contributions": 40 }, { -<<<<<<< HEAD - "id": 104021517, - "github_url": "https://github.com/ramitaarora", - "avatar_url": "https://avatars.githubusercontent.com/u/104021517?v=4", -======= "id": 107867458, "github_url": "https://github.com/del9ra", "avatar_url": "https://avatars.githubusercontent.com/u/107867458?v=4", @@ -5751,7 +5729,6 @@ "id": 122063836, "github_url": "https://github.com/colin-macrae", "avatar_url": "https://avatars.githubusercontent.com/u/122063836?v=4", ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 "gravatar_id": "", "contributions": 40 }, @@ -5784,16 +5761,6 @@ "contributions": 39 }, { -<<<<<<< HEAD - "id": 122063836, - "github_url": "https://github.com/colin-macrae", - "avatar_url": "https://avatars.githubusercontent.com/u/122063836?v=4", - "gravatar_id": "", - "contributions": 39 - }, - { -======= ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 "id": 98370780, "github_url": "https://github.com/mxajPrice", "avatar_url": "https://avatars.githubusercontent.com/u/98370780?v=4", @@ -5807,13 +5774,6 @@ "gravatar_id": "", "contributions": 38 }, - { - "id": 107867458, - "github_url": "https://github.com/del9ra", - "avatar_url": "https://avatars.githubusercontent.com/u/107867458?v=4", - "gravatar_id": "", - "contributions": 38 - }, { "id": 12547172, "github_url": "https://github.com/jefflueck", @@ -5828,6 +5788,13 @@ "gravatar_id": "", "contributions": 37 }, + { + "id": 64623632, + "github_url": "https://github.com/HackforLABot", + "avatar_url": "https://avatars.githubusercontent.com/u/64623632?v=4", + "gravatar_id": "", + "contributions": 37 + }, { "id": 78514700, "github_url": "https://github.com/nnr-nnr", @@ -5954,6 +5921,13 @@ "gravatar_id": "", "contributions": 32 }, + { + "id": 37560463, + "github_url": "https://github.com/muninnhugin", + "avatar_url": "https://avatars.githubusercontent.com/u/37560463?v=4", + "gravatar_id": "", + "contributions": 32 + }, { "id": 63771558, "github_url": "https://github.com/R-Tomas-Gonzalez", @@ -6017,13 +5991,6 @@ "gravatar_id": "", "contributions": 30 }, - { - "id": 37560463, - "github_url": "https://github.com/muninnhugin", - "avatar_url": "https://avatars.githubusercontent.com/u/37560463?v=4", - "gravatar_id": "", - "contributions": 30 - }, { "id": 44449168, "github_url": "https://github.com/Unity7", @@ -6332,13 +6299,6 @@ "gravatar_id": "", "contributions": 25 }, - { - "id": 64623632, - "github_url": "https://github.com/HackforLABot", - "avatar_url": "https://avatars.githubusercontent.com/u/64623632?v=4", - "gravatar_id": "", - "contributions": 25 - }, { "id": 73557586, "github_url": "https://github.com/mattmalane", @@ -6647,13 +6607,6 @@ "gravatar_id": "", "contributions": 20 }, - { - "id": 32923319, - "github_url": "https://github.com/moazDev1", - "avatar_url": "https://avatars.githubusercontent.com/u/32923319?v=4", - "gravatar_id": "", - "contributions": 20 - }, { "id": 54752231, "github_url": "https://github.com/hannahlivnat", @@ -6969,6 +6922,13 @@ "gravatar_id": "", "contributions": 16 }, + { + "id": 102435078, + "github_url": "https://github.com/terrencejihoonjung", + "avatar_url": "https://avatars.githubusercontent.com/u/102435078?v=4", + "gravatar_id": "", + "contributions": 16 + }, { "id": 106640032, "github_url": "https://github.com/RobenusW", @@ -7060,13 +7020,6 @@ "gravatar_id": "", "contributions": 15 }, - { - "id": 102435078, - "github_url": "https://github.com/terrencejihoonjung", - "avatar_url": "https://avatars.githubusercontent.com/u/102435078?v=4", - "gravatar_id": "", - "contributions": 15 - }, { "id": 118769667, "github_url": "https://github.com/naveenmallemala5", @@ -7459,6 +7412,13 @@ "gravatar_id": "", "contributions": 12 }, + { + "id": 80426069, + "github_url": "https://github.com/Limeload", + "avatar_url": "https://avatars.githubusercontent.com/u/80426069?v=4", + "gravatar_id": "", + "contributions": 12 + }, { "id": 81582376, "github_url": "https://github.com/GRISONRF", @@ -7571,6 +7531,13 @@ "gravatar_id": "", "contributions": 11 }, + { + "id": 64837366, + "github_url": "https://github.com/cchrizzle", + "avatar_url": "https://avatars.githubusercontent.com/u/64837366?v=4", + "gravatar_id": "", + "contributions": 11 + }, { "id": 69092521, "github_url": "https://github.com/SteeRevo", @@ -7599,13 +7566,6 @@ "gravatar_id": "", "contributions": 11 }, - { - "id": 80426069, - "github_url": "https://github.com/Limeload", - "avatar_url": "https://avatars.githubusercontent.com/u/80426069?v=4", - "gravatar_id": "", - "contributions": 11 - }, { "id": 85596471, "github_url": "https://github.com/nssensalo", @@ -7725,13 +7685,6 @@ "gravatar_id": "", "contributions": 10 }, - { - "id": 64837366, - "github_url": "https://github.com/cchrizzle", - "avatar_url": "https://avatars.githubusercontent.com/u/64837366?v=4", - "gravatar_id": "", - "contributions": 10 - }, { "id": 72041281, "github_url": "https://github.com/jennisung", @@ -7795,6 +7748,13 @@ "gravatar_id": "", "contributions": 10 }, + { + "id": 96549871, + "github_url": "https://github.com/eyaaoo", + "avatar_url": "https://avatars.githubusercontent.com/u/96549871?v=4", + "gravatar_id": "", + "contributions": 10 + }, { "id": 96844527, "github_url": "https://github.com/troyfreed", @@ -7886,13 +7846,6 @@ "gravatar_id": "", "contributions": 9 }, - { - "id": 96549871, - "github_url": "https://github.com/eyaaoo", - "avatar_url": "https://avatars.githubusercontent.com/u/96549871?v=4", - "gravatar_id": "", - "contributions": 9 - }, { "id": 96758417, "github_url": "https://github.com/tamalatrinh", @@ -8439,6 +8392,13 @@ "gravatar_id": "", "contributions": 6 }, + { + "id": 49626349, + "github_url": "https://github.com/zkamenov", + "avatar_url": "https://avatars.githubusercontent.com/u/49626349?v=4", + "gravatar_id": "", + "contributions": 6 + }, { "id": 50788013, "github_url": "https://github.com/isletprogramiz", @@ -8670,13 +8630,6 @@ "gravatar_id": "", "contributions": 5 }, - { - "id": 49626349, - "github_url": "https://github.com/zkamenov", - "avatar_url": "https://avatars.githubusercontent.com/u/49626349?v=4", - "gravatar_id": "", - "contributions": 5 - }, { "id": 50456734, "github_url": "https://github.com/imsoumya18", @@ -8817,6 +8770,13 @@ "gravatar_id": "", "contributions": 5 }, + { + "id": 104811751, + "github_url": "https://github.com/daras-cu", + "avatar_url": "https://avatars.githubusercontent.com/u/104811751?v=4", + "gravatar_id": "", + "contributions": 5 + }, { "id": 105326514, "github_url": "https://github.com/aksanna", @@ -9097,6 +9057,13 @@ "gravatar_id": "", "contributions": 4 }, + { + "id": 103794936, + "github_url": "https://github.com/Hsan2022", + "avatar_url": "https://avatars.githubusercontent.com/u/103794936?v=4", + "gravatar_id": "", + "contributions": 4 + }, { "id": 104045720, "github_url": "https://github.com/Sk-223", @@ -9111,13 +9078,6 @@ "gravatar_id": "", "contributions": 4 }, - { - "id": 104811751, - "github_url": "https://github.com/daras-cu", - "avatar_url": "https://avatars.githubusercontent.com/u/104811751?v=4", - "gravatar_id": "", - "contributions": 4 - }, { "id": 107448777, "github_url": "https://github.com/olivioso", @@ -9153,6 +9113,13 @@ "gravatar_id": "", "contributions": 4 }, + { + "id": 126136711, + "github_url": "https://github.com/taylorbeee", + "avatar_url": "https://avatars.githubusercontent.com/u/126136711?v=4", + "gravatar_id": "", + "contributions": 4 + }, { "id": 129595375, "github_url": "https://github.com/nikunjgupta609", @@ -9174,6 +9141,13 @@ "gravatar_id": "", "contributions": 4 }, + { + "id": 157540251, + "github_url": "https://github.com/melissam640", + "avatar_url": "https://avatars.githubusercontent.com/u/157540251?v=4", + "gravatar_id": "", + "contributions": 4 + }, { "id": 4373031, "github_url": "https://github.com/breyell", @@ -9461,13 +9435,6 @@ "gravatar_id": "", "contributions": 3 }, - { - "id": 103794936, - "github_url": "https://github.com/Hsan2022", - "avatar_url": "https://avatars.githubusercontent.com/u/103794936?v=4", - "gravatar_id": "", - "contributions": 3 - }, { "id": 103966682, "github_url": "https://github.com/palomasoltys", @@ -9524,13 +9491,6 @@ "gravatar_id": "", "contributions": 3 }, - { - "id": 126136711, - "github_url": "https://github.com/taylorbeee", - "avatar_url": "https://avatars.githubusercontent.com/u/126136711?v=4", - "gravatar_id": "", - "contributions": 3 - }, { "id": 126523797, "github_url": "https://github.com/Shikha0428", @@ -9539,9 +9499,9 @@ "contributions": 3 }, { - "id": 157540251, - "github_url": "https://github.com/melissam640", - "avatar_url": "https://avatars.githubusercontent.com/u/157540251?v=4", + "id": 156951671, + "github_url": "https://github.com/izma-mujeeb", + "avatar_url": "https://avatars.githubusercontent.com/u/156951671?v=4", "gravatar_id": "", "contributions": 3 }, @@ -10182,13 +10142,6 @@ "gravatar_id": "", "contributions": 2 }, - { - "id": 156951671, - "github_url": "https://github.com/izma-mujeeb", - "avatar_url": "https://avatars.githubusercontent.com/u/156951671?v=4", - "gravatar_id": "", - "contributions": 2 - }, { "id": 168019558, "github_url": "https://github.com/harith-aaron", @@ -10497,6 +10450,13 @@ "gravatar_id": "", "contributions": 1 }, + { + "id": 50345919, + "github_url": "https://github.com/DexinJ", + "avatar_url": "https://avatars.githubusercontent.com/u/50345919?v=4", + "gravatar_id": "", + "contributions": 1 + }, { "id": 50446690, "github_url": "https://github.com/pradeeptosarkar", @@ -11057,6 +11017,13 @@ "gravatar_id": "", "contributions": 1 }, + { + "id": 114508173, + "github_url": "https://github.com/siddharthpvaghela", + "avatar_url": "https://avatars.githubusercontent.com/u/114508173?v=4", + "gravatar_id": "", + "contributions": 1 + }, { "id": 114620432, "github_url": "https://github.com/KamakshiOjha", @@ -11171,22 +11138,14 @@ "github_url": "https://github.com/apps/github-actions", "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", "gravatar_id": "", -<<<<<<< HEAD - "contributions": 16562 -======= "contributions": 16617 ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 }, { "id": 37763229, "github_url": "https://github.com/ExperimentsInHonesty", "avatar_url": "https://avatars.githubusercontent.com/u/37763229?v=4", "gravatar_id": "", -<<<<<<< HEAD - "contributions": 3923 -======= "contributions": 3941 ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 }, { "id": 31293603, @@ -11200,22 +11159,14 @@ "github_url": "https://github.com/HackforLABot", "avatar_url": "https://avatars.githubusercontent.com/u/64623632?v=4", "gravatar_id": "", -<<<<<<< HEAD - "contributions": 2556 -======= "contributions": 2575 ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 }, { "id": 5314153, "github_url": "https://github.com/roslynwythe", "avatar_url": "https://avatars.githubusercontent.com/u/5314153?v=4", "gravatar_id": "", -<<<<<<< HEAD - "contributions": 1866 -======= "contributions": 1883 ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 }, { "id": 843538, @@ -11229,11 +11180,7 @@ "github_url": "https://github.com/t-will-gillis", "avatar_url": "https://avatars.githubusercontent.com/u/40799239?v=4", "gravatar_id": "", -<<<<<<< HEAD - "contributions": 858 -======= "contributions": 883 ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 }, { "id": 88953806, @@ -11359,7 +11306,7 @@ "github_url": "https://github.com/Thinking-Panda", "avatar_url": "https://avatars.githubusercontent.com/u/122488603?v=4", "gravatar_id": "", - "contributions": 180 + "contributions": 181 }, { "id": 81049661, @@ -11562,11 +11509,7 @@ "github_url": "https://github.com/tunglinn", "avatar_url": "https://avatars.githubusercontent.com/u/86996158?v=4", "gravatar_id": "", -<<<<<<< HEAD - "contributions": 88 -======= "contributions": 90 ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 }, { "id": 67438372, @@ -11589,6 +11532,13 @@ "gravatar_id": "", "contributions": 79 }, + { + "id": 16524851, + "github_url": "https://github.com/tony1ee", + "avatar_url": "https://avatars.githubusercontent.com/u/16524851?v=4", + "gravatar_id": "", + "contributions": 78 + }, { "id": 77373777, "github_url": "https://github.com/d-perez-8", @@ -11603,13 +11553,6 @@ "gravatar_id": "", "contributions": 78 }, - { - "id": 16524851, - "github_url": "https://github.com/tony1ee", - "avatar_url": "https://avatars.githubusercontent.com/u/16524851?v=4", - "gravatar_id": "", - "contributions": 77 - }, { "id": 7821047, "github_url": "https://github.com/abregorivas", @@ -11960,6 +11903,13 @@ "gravatar_id": "", "contributions": 44 }, + { + "id": 104021517, + "github_url": "https://github.com/ramitaarora", + "avatar_url": "https://avatars.githubusercontent.com/u/104021517?v=4", + "gravatar_id": "", + "contributions": 44 + }, { "id": 105128681, "github_url": "https://github.com/karengcecena", @@ -11967,6 +11917,13 @@ "gravatar_id": "", "contributions": 44 }, + { + "id": 122063836, + "github_url": "https://github.com/colin-macrae", + "avatar_url": "https://avatars.githubusercontent.com/u/122063836?v=4", + "gravatar_id": "", + "contributions": 44 + }, { "id": 18585836, "github_url": "https://github.com/angieyan", @@ -12003,22 +11960,9 @@ "contributions": 43 }, { -<<<<<<< HEAD - "id": 104021517, - "github_url": "https://github.com/ramitaarora", - "avatar_url": "https://avatars.githubusercontent.com/u/104021517?v=4", - "gravatar_id": "", - "contributions": 43 - }, - { - "id": 122063836, - "github_url": "https://github.com/colin-macrae", - "avatar_url": "https://avatars.githubusercontent.com/u/122063836?v=4", -======= "id": 107867458, "github_url": "https://github.com/del9ra", "avatar_url": "https://avatars.githubusercontent.com/u/107867458?v=4", ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 "gravatar_id": "", "contributions": 43 }, @@ -12057,13 +12001,6 @@ "gravatar_id": "", "contributions": 41 }, - { - "id": 107867458, - "github_url": "https://github.com/del9ra", - "avatar_url": "https://avatars.githubusercontent.com/u/107867458?v=4", - "gravatar_id": "", - "contributions": 41 - }, { "id": 12547172, "github_url": "https://github.com/jefflueck", @@ -12211,6 +12148,13 @@ "gravatar_id": "", "contributions": 36 }, + { + "id": 37560463, + "github_url": "https://github.com/muninnhugin", + "avatar_url": "https://avatars.githubusercontent.com/u/37560463?v=4", + "gravatar_id": "", + "contributions": 35 + }, { "id": 95503033, "github_url": "https://github.com/kiwookim", @@ -12296,9 +12240,9 @@ "contributions": 33 }, { - "id": 37560463, - "github_url": "https://github.com/muninnhugin", - "avatar_url": "https://avatars.githubusercontent.com/u/37560463?v=4", + "id": 62191468, + "github_url": "https://github.com/DrAcula27", + "avatar_url": "https://avatars.githubusercontent.com/u/62191468?v=4", "gravatar_id": "", "contributions": 33 }, @@ -12358,13 +12302,6 @@ "gravatar_id": "", "contributions": 32 }, - { - "id": 62191468, - "github_url": "https://github.com/DrAcula27", - "avatar_url": "https://avatars.githubusercontent.com/u/62191468?v=4", - "gravatar_id": "", - "contributions": 32 - }, { "id": 95264760, "github_url": "https://github.com/ShrutiMukherjee", @@ -12883,13 +12820,6 @@ "gravatar_id": "", "contributions": 23 }, - { - "id": 32923319, - "github_url": "https://github.com/moazDev1", - "avatar_url": "https://avatars.githubusercontent.com/u/32923319?v=4", - "gravatar_id": "", - "contributions": 23 - }, { "id": 40847248, "github_url": "https://github.com/Lol-Whut", @@ -12911,6 +12841,13 @@ "gravatar_id": "", "contributions": 23 }, + { + "id": 85697744, + "github_url": "https://github.com/vanessasinam", + "avatar_url": "https://avatars.githubusercontent.com/u/85697744?v=4", + "gravatar_id": "", + "contributions": 23 + }, { "id": 92824407, "github_url": "https://github.com/cng008", @@ -12995,13 +12932,6 @@ "gravatar_id": "", "contributions": 22 }, - { - "id": 85697744, - "github_url": "https://github.com/vanessasinam", - "avatar_url": "https://avatars.githubusercontent.com/u/85697744?v=4", - "gravatar_id": "", - "contributions": 22 - }, { "id": 98001447, "github_url": "https://github.com/cwvivianlin", @@ -13018,7 +12948,7 @@ }, { "id": 111248453, - "github_url": "https://github.com/lateral-neck-stretch", + "github_url": "https://github.com/antho-zng", "avatar_url": "https://avatars.githubusercontent.com/u/111248453?v=4", "gravatar_id": "", "contributions": 22 @@ -13135,6 +13065,13 @@ "gravatar_id": "", "contributions": 20 }, + { + "id": 102435078, + "github_url": "https://github.com/terrencejihoonjung", + "avatar_url": "https://avatars.githubusercontent.com/u/102435078?v=4", + "gravatar_id": "", + "contributions": 20 + }, { "id": 121644228, "github_url": "https://github.com/Jung-GunSong", @@ -13212,13 +13149,6 @@ "gravatar_id": "", "contributions": 19 }, - { - "id": 102435078, - "github_url": "https://github.com/terrencejihoonjung", - "avatar_url": "https://avatars.githubusercontent.com/u/102435078?v=4", - "gravatar_id": "", - "contributions": 19 - }, { "id": 107211477, "github_url": "https://github.com/michaelmagen", @@ -13779,6 +13709,13 @@ "gravatar_id": "", "contributions": 13 }, + { + "id": 64837366, + "github_url": "https://github.com/cchrizzle", + "avatar_url": "https://avatars.githubusercontent.com/u/64837366?v=4", + "gravatar_id": "", + "contributions": 13 + }, { "id": 74014488, "github_url": "https://github.com/pattshreds", @@ -13926,13 +13863,6 @@ "gravatar_id": "", "contributions": 12 }, - { - "id": 64837366, - "github_url": "https://github.com/cchrizzle", - "avatar_url": "https://avatars.githubusercontent.com/u/64837366?v=4", - "gravatar_id": "", - "contributions": 12 - }, { "id": 69663209, "github_url": "https://github.com/Arjayellis", @@ -13947,6 +13877,13 @@ "gravatar_id": "", "contributions": 12 }, + { + "id": 80426069, + "github_url": "https://github.com/Limeload", + "avatar_url": "https://avatars.githubusercontent.com/u/80426069?v=4", + "gravatar_id": "", + "contributions": 12 + }, { "id": 84137250, "github_url": "https://github.com/attali-david", @@ -14073,13 +14010,6 @@ "gravatar_id": "", "contributions": 11 }, - { - "id": 80426069, - "github_url": "https://github.com/Limeload", - "avatar_url": "https://avatars.githubusercontent.com/u/80426069?v=4", - "gravatar_id": "", - "contributions": 11 - }, { "id": 82304192, "github_url": "https://github.com/aconstas", @@ -14096,7 +14026,7 @@ }, { "id": 98272636, - "github_url": "https://github.com/Benji-Montgomery", + "github_url": "https://github.com/maybleMyers", "avatar_url": "https://avatars.githubusercontent.com/u/98272636?v=4", "gravatar_id": "", "contributions": 11 @@ -14241,6 +14171,13 @@ "gravatar_id": "", "contributions": 10 }, + { + "id": 96549871, + "github_url": "https://github.com/eyaaoo", + "avatar_url": "https://avatars.githubusercontent.com/u/96549871?v=4", + "gravatar_id": "", + "contributions": 10 + }, { "id": 96844527, "github_url": "https://github.com/troyfreed", @@ -14374,13 +14311,6 @@ "gravatar_id": "", "contributions": 9 }, - { - "id": 96549871, - "github_url": "https://github.com/eyaaoo", - "avatar_url": "https://avatars.githubusercontent.com/u/96549871?v=4", - "gravatar_id": "", - "contributions": 9 - }, { "id": 96758417, "github_url": "https://github.com/tamalatrinh", @@ -14780,6 +14710,13 @@ "gravatar_id": "", "contributions": 7 }, + { + "id": 104811751, + "github_url": "https://github.com/daras-cu", + "avatar_url": "https://avatars.githubusercontent.com/u/104811751?v=4", + "gravatar_id": "", + "contributions": 7 + }, { "id": 105249508, "github_url": "https://github.com/EmilyTat", @@ -14941,6 +14878,13 @@ "gravatar_id": "", "contributions": 6 }, + { + "id": 49626349, + "github_url": "https://github.com/zkamenov", + "avatar_url": "https://avatars.githubusercontent.com/u/49626349?v=4", + "gravatar_id": "", + "contributions": 6 + }, { "id": 50788013, "github_url": "https://github.com/isletprogramiz", @@ -15018,13 +14962,6 @@ "gravatar_id": "", "contributions": 6 }, - { - "id": 104811751, - "github_url": "https://github.com/daras-cu", - "avatar_url": "https://avatars.githubusercontent.com/u/104811751?v=4", - "gravatar_id": "", - "contributions": 6 - }, { "id": 110261731, "github_url": "https://github.com/curbeammonae", @@ -15047,8 +14984,6 @@ "contributions": 6 }, { -<<<<<<< HEAD -======= "id": 126136711, "github_url": "https://github.com/taylorbeee", "avatar_url": "https://avatars.githubusercontent.com/u/126136711?v=4", @@ -15070,7 +15005,6 @@ "contributions": 6 }, { ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 "id": 10860384, "github_url": "https://github.com/bingr001", "avatar_url": "https://avatars1.githubusercontent.com/u/10860384?v=4", @@ -15119,13 +15053,6 @@ "gravatar_id": "", "contributions": 5 }, - { - "id": 49626349, - "github_url": "https://github.com/zkamenov", - "avatar_url": "https://avatars.githubusercontent.com/u/49626349?v=4", - "gravatar_id": "", - "contributions": 5 - }, { "id": 50222149, "github_url": "https://github.com/klfregoso", @@ -15315,13 +15242,6 @@ "gravatar_id": "", "contributions": 5 }, - { - "id": 126136711, - "github_url": "https://github.com/taylorbeee", - "avatar_url": "https://avatars.githubusercontent.com/u/126136711?v=4", - "gravatar_id": "", - "contributions": 5 - }, { "id": 135405041, "github_url": "https://github.com/aidenjlee4321", @@ -15336,13 +15256,6 @@ "gravatar_id": "", "contributions": 5 }, - { - "id": 157540251, - "github_url": "https://github.com/melissam640", - "avatar_url": "https://avatars.githubusercontent.com/u/157540251?v=4", - "gravatar_id": "", - "contributions": 5 - }, { "id": 4373031, "github_url": "https://github.com/breyell", @@ -15525,6 +15438,13 @@ "gravatar_id": "", "contributions": 4 }, + { + "id": 103794936, + "github_url": "https://github.com/Hsan2022", + "avatar_url": "https://avatars.githubusercontent.com/u/103794936?v=4", + "gravatar_id": "", + "contributions": 4 + }, { "id": 104045720, "github_url": "https://github.com/Sk-223", @@ -15819,13 +15739,6 @@ "gravatar_id": "", "contributions": 3 }, - { - "id": 103794936, - "github_url": "https://github.com/Hsan2022", - "avatar_url": "https://avatars.githubusercontent.com/u/103794936?v=4", - "gravatar_id": "", - "contributions": 3 - }, { "id": 106640672, "github_url": "https://github.com/a-sana", @@ -15868,6 +15781,13 @@ "gravatar_id": "", "contributions": 3 }, + { + "id": 156951671, + "github_url": "https://github.com/izma-mujeeb", + "avatar_url": "https://avatars.githubusercontent.com/u/156951671?v=4", + "gravatar_id": "", + "contributions": 3 + }, { "id": 165424716, "github_url": "https://github.com/amnak613", @@ -16477,13 +16397,6 @@ "gravatar_id": "", "contributions": 2 }, - { - "id": 156951671, - "github_url": "https://github.com/izma-mujeeb", - "avatar_url": "https://avatars.githubusercontent.com/u/156951671?v=4", - "gravatar_id": "", - "contributions": 2 - }, { "id": 168019558, "github_url": "https://github.com/harith-aaron", @@ -16771,6 +16684,13 @@ "gravatar_id": "", "contributions": 1 }, + { + "id": 50345919, + "github_url": "https://github.com/DexinJ", + "avatar_url": "https://avatars.githubusercontent.com/u/50345919?v=4", + "gravatar_id": "", + "contributions": 1 + }, { "id": 50446690, "github_url": "https://github.com/pradeeptosarkar", @@ -17324,6 +17244,13 @@ "gravatar_id": "", "contributions": 1 }, + { + "id": 114508173, + "github_url": "https://github.com/siddharthpvaghela", + "avatar_url": "https://avatars.githubusercontent.com/u/114508173?v=4", + "gravatar_id": "", + "contributions": 1 + }, { "id": 114620432, "github_url": "https://github.com/KamakshiOjha", @@ -20667,6 +20594,13 @@ "gravatar_id": "", "contributions": 8 }, + { + "id": 62191468, + "github_url": "https://github.com/DrAcula27", + "avatar_url": "https://avatars.githubusercontent.com/u/62191468?v=4", + "gravatar_id": "", + "contributions": 8 + }, { "id": 16641980, "github_url": "https://github.com/traycn", @@ -20745,16 +20679,16 @@ "contributions": 4 }, { - "id": 32428793, - "github_url": "https://github.com/nikpap123", - "avatar_url": "https://avatars.githubusercontent.com/u/32428793?v=4", + "id": 8894579, + "github_url": "https://github.com/derekmiranda", + "avatar_url": "https://avatars.githubusercontent.com/u/8894579?v=4", "gravatar_id": "", "contributions": 3 }, { - "id": 47489094, - "github_url": "https://github.com/chencc33", - "avatar_url": "https://avatars.githubusercontent.com/u/47489094?v=4", + "id": 121374754, + "github_url": "https://github.com/MBasil03", + "avatar_url": "https://avatars.githubusercontent.com/u/121374754?v=4", "gravatar_id": "", "contributions": 3 }, @@ -20766,30 +20700,23 @@ "contributions": 3 }, { - "id": 121374754, - "github_url": "https://github.com/MBasil03", - "avatar_url": "https://avatars.githubusercontent.com/u/121374754?v=4", + "id": 47489094, + "github_url": "https://github.com/chencc33", + "avatar_url": "https://avatars.githubusercontent.com/u/47489094?v=4", "gravatar_id": "", "contributions": 3 }, { - "id": 8894579, - "github_url": "https://github.com/derekmiranda", - "avatar_url": "https://avatars.githubusercontent.com/u/8894579?v=4", + "id": 32428793, + "github_url": "https://github.com/nikpap123", + "avatar_url": "https://avatars.githubusercontent.com/u/32428793?v=4", "gravatar_id": "", "contributions": 3 }, { - "id": 143574036, - "github_url": "https://github.com/bberhane", - "avatar_url": "https://avatars.githubusercontent.com/u/143574036?v=4", - "gravatar_id": "", - "contributions": 2 - }, - { - "id": 20729686, - "github_url": "https://github.com/EchoProject", - "avatar_url": "https://avatars.githubusercontent.com/u/20729686?v=4", + "id": 26595150, + "github_url": "https://github.com/Ykaros", + "avatar_url": "https://avatars.githubusercontent.com/u/26595150?v=4", "gravatar_id": "", "contributions": 2 }, @@ -20801,18 +20728,18 @@ "contributions": 2 }, { - "id": 26595150, - "github_url": "https://github.com/Ykaros", - "avatar_url": "https://avatars.githubusercontent.com/u/26595150?v=4", + "id": 20729686, + "github_url": "https://github.com/EchoProject", + "avatar_url": "https://avatars.githubusercontent.com/u/20729686?v=4", "gravatar_id": "", "contributions": 2 }, { - "id": 62191468, - "github_url": "https://github.com/DrAcula27", - "avatar_url": "https://avatars.githubusercontent.com/u/62191468?v=4", + "id": 143574036, + "github_url": "https://github.com/bberhane", + "avatar_url": "https://avatars.githubusercontent.com/u/143574036?v=4", "gravatar_id": "", - "contributions": 1 + "contributions": 2 }, { "id": 39573679, @@ -20879,7 +20806,7 @@ "github_url": "https://github.com/ryanfchase", "avatar_url": "https://avatars.githubusercontent.com/u/6414668?v=4", "gravatar_id": "", - "contributions": 538 + "contributions": 540 }, { "id": 20729686, @@ -20914,7 +20841,7 @@ "github_url": "https://github.com/ExperimentsInHonesty", "avatar_url": "https://avatars.githubusercontent.com/u/37763229?v=4", "gravatar_id": "", - "contributions": 162 + "contributions": 164 }, { "id": 41898282, @@ -21695,7 +21622,7 @@ "github_url": "https://github.com/ryanfchase", "avatar_url": "https://avatars.githubusercontent.com/u/6414668?v=4", "gravatar_id": "", - "contributions": 560 + "contributions": 562 }, { "id": 10199792, @@ -21772,7 +21699,7 @@ "github_url": "https://github.com/ExperimentsInHonesty", "avatar_url": "https://avatars.githubusercontent.com/u/37763229?v=4", "gravatar_id": "", - "contributions": 169 + "contributions": 171 }, { "id": 41898282, @@ -21970,6 +21897,13 @@ "gravatar_id": "", "contributions": 19 }, + { + "id": 62191468, + "github_url": "https://github.com/DrAcula27", + "avatar_url": "https://avatars.githubusercontent.com/u/62191468?v=4", + "gravatar_id": "", + "contributions": 17 + }, { "id": 12424467, "github_url": "https://github.com/kiranofans", @@ -22075,13 +22009,6 @@ "gravatar_id": "", "contributions": 10 }, - { - "id": 62191468, - "github_url": "https://github.com/DrAcula27", - "avatar_url": "https://avatars.githubusercontent.com/u/62191468?v=4", - "gravatar_id": "", - "contributions": 10 - }, { "id": 14864231, "github_url": "https://github.com/kdow", @@ -22627,7 +22554,7 @@ "github_url": "https://github.com/entrotech", "avatar_url": "https://avatars.githubusercontent.com/u/9939032?v=4", "gravatar_id": "", - "contributions": 1002 + "contributions": 1005 }, { "id": 45305029, @@ -23671,7 +23598,7 @@ "github_url": "https://github.com/entrotech", "avatar_url": "https://avatars.githubusercontent.com/u/9939032?v=4", "gravatar_id": "", - "contributions": 1333 + "contributions": 1336 }, { "id": 98936028, @@ -25048,7 +24975,7 @@ }, { "id": 111248453, - "github_url": "https://github.com/lateral-neck-stretch", + "github_url": "https://github.com/antho-zng", "avatar_url": "https://avatars.githubusercontent.com/u/111248453?v=4", "gravatar_id": "", "contributions": 4 @@ -25174,11 +25101,7 @@ "github_url": "https://github.com/fancyham", "avatar_url": "https://avatars.githubusercontent.com/u/3376957?v=4", "gravatar_id": "", -<<<<<<< HEAD - "contributions": 521 -======= "contributions": 528 ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 }, { "id": 98001560, @@ -25726,6 +25649,13 @@ "gravatar_id": "", "contributions": 3 }, + { + "id": 124107401, + "github_url": "https://github.com/danvgar", + "avatar_url": "https://avatars.githubusercontent.com/u/124107401?v=4", + "gravatar_id": "", + "contributions": 3 + }, { "id": 124115512, "github_url": "https://github.com/jordan-a-turner", @@ -25852,13 +25782,6 @@ "gravatar_id": "", "contributions": 2 }, - { - "id": 124107401, - "github_url": "https://github.com/danvgar", - "avatar_url": "https://avatars.githubusercontent.com/u/124107401?v=4", - "gravatar_id": "", - "contributions": 2 - }, { "id": 1160105, "github_url": "https://github.com/fyliu", @@ -26155,11 +26078,7 @@ "github_url": "https://github.com/fancyham", "avatar_url": "https://avatars.githubusercontent.com/u/3376957?v=4", "gravatar_id": "", -<<<<<<< HEAD - "contributions": 539 -======= "contributions": 546 ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 }, { "id": 98001560, @@ -26632,7 +26551,7 @@ }, { "id": 111248453, - "github_url": "https://github.com/lateral-neck-stretch", + "github_url": "https://github.com/antho-zng", "avatar_url": "https://avatars.githubusercontent.com/u/111248453?v=4", "gravatar_id": "", "contributions": 7 @@ -26798,6 +26717,13 @@ "gravatar_id": "", "contributions": 3 }, + { + "id": 124107401, + "github_url": "https://github.com/danvgar", + "avatar_url": "https://avatars.githubusercontent.com/u/124107401?v=4", + "gravatar_id": "", + "contributions": 3 + }, { "id": 124115512, "github_url": "https://github.com/jordan-a-turner", @@ -26931,13 +26857,6 @@ "gravatar_id": "", "contributions": 2 }, - { - "id": 124107401, - "github_url": "https://github.com/danvgar", - "avatar_url": "https://avatars.githubusercontent.com/u/124107401?v=4", - "gravatar_id": "", - "contributions": 2 - }, { "id": 1521996, "github_url": "https://github.com/joshuazrobins", @@ -28346,7 +28265,7 @@ "github_url": "https://github.com/sydneywalcoff", "avatar_url": "https://avatars.githubusercontent.com/u/75542938?v=4", "gravatar_id": "", - "contributions": 285 + "contributions": 299 }, { "id": 35116846, @@ -28381,7 +28300,7 @@ "github_url": "https://github.com/apps/dependabot", "avatar_url": "https://avatars.githubusercontent.com/in/29110?v=4", "gravatar_id": "", - "contributions": 38 + "contributions": 45 }, { "id": 146603843, @@ -28574,9 +28493,6 @@ "github_url": "https://github.com/apps/github-actions", "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", "gravatar_id": "", -<<<<<<< HEAD - "contributions": 363 -======= "contributions": 395 }, { @@ -28585,7 +28501,6 @@ "avatar_url": "https://avatars.githubusercontent.com/u/105686896?v=4", "gravatar_id": "", "contributions": 390 ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 }, { "id": 57149590, @@ -28599,11 +28514,7 @@ "github_url": "https://github.com/sydneywalcoff", "avatar_url": "https://avatars.githubusercontent.com/u/75542938?v=4", "gravatar_id": "", -<<<<<<< HEAD - "contributions": 181 -======= "contributions": 184 ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 }, { "id": 121915896, @@ -28624,7 +28535,7 @@ "github_url": "https://github.com/sylvia-nam", "avatar_url": "https://avatars.githubusercontent.com/u/156871663?v=4", "gravatar_id": "", - "contributions": 119 + "contributions": 120 }, { "id": 46510558, @@ -28843,6 +28754,13 @@ "gravatar_id": "", "contributions": 11 }, + { + "id": 49699333, + "github_url": "https://github.com/apps/dependabot", + "avatar_url": "https://avatars.githubusercontent.com/in/29110?v=4", + "gravatar_id": "", + "contributions": 10 + }, { "id": 15892775, "github_url": "https://github.com/cayd", @@ -28864,13 +28782,6 @@ "gravatar_id": "", "contributions": 8 }, - { - "id": 49699333, - "github_url": "https://github.com/apps/dependabot", - "avatar_url": "https://avatars.githubusercontent.com/in/29110?v=4", - "gravatar_id": "", - "contributions": 7 - }, { "id": 65548779, "github_url": "https://github.com/Thomas-Pietruszewski", @@ -29191,8 +29102,6 @@ "contributorsComplete": { "data": [ { -<<<<<<< HEAD -======= "id": 75542938, "github_url": "https://github.com/sydneywalcoff", "avatar_url": "https://avatars.githubusercontent.com/u/75542938?v=4", @@ -29200,7 +29109,6 @@ "contributions": 483 }, { ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 "id": 87077650, "github_url": "https://github.com/SamHyler", "avatar_url": "https://avatars.githubusercontent.com/u/87077650?v=4", @@ -29208,30 +29116,10 @@ "contributions": 479 }, { -<<<<<<< HEAD - "id": 75542938, - "github_url": "https://github.com/sydneywalcoff", - "avatar_url": "https://avatars.githubusercontent.com/u/75542938?v=4", - "gravatar_id": "", - "contributions": 466 - }, - { - "id": 105686896, - "github_url": "https://github.com/anitadesigns", - "avatar_url": "https://avatars.githubusercontent.com/u/105686896?v=4", - "gravatar_id": "", - "contributions": 388 - }, - { -======= ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 "id": 41898282, "github_url": "https://github.com/apps/github-actions", "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", "gravatar_id": "", -<<<<<<< HEAD - "contributions": 363 -======= "contributions": 395 }, { @@ -29240,7 +29128,6 @@ "avatar_url": "https://avatars.githubusercontent.com/u/105686896?v=4", "gravatar_id": "", "contributions": 391 ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 }, { "id": 57149590, @@ -29289,7 +29176,7 @@ "github_url": "https://github.com/sylvia-nam", "avatar_url": "https://avatars.githubusercontent.com/u/156871663?v=4", "gravatar_id": "", - "contributions": 119 + "contributions": 120 }, { "id": 46510558, @@ -29347,13 +29234,6 @@ "gravatar_id": "", "contributions": 51 }, - { - "id": 49699333, - "github_url": "https://github.com/apps/dependabot", - "avatar_url": "https://avatars.githubusercontent.com/in/29110?v=4", - "gravatar_id": "", - "contributions": 45 - }, { "id": 78319934, "github_url": "https://github.com/Andan-Eddy", @@ -29883,7 +29763,7 @@ "github_url": "https://github.com/ddfridley", "avatar_url": "https://avatars.githubusercontent.com/u/3317487?v=4", "gravatar_id": "", - "contributions": 1991 + "contributions": 2003 }, { "id": 1662766, @@ -30081,6 +29961,13 @@ "gravatar_id": "", "contributions": 7 }, + { + "id": 49116017, + "github_url": "https://github.com/MingyiXu11", + "avatar_url": "https://avatars.githubusercontent.com/u/49116017?v=4", + "gravatar_id": "", + "contributions": 7 + }, { "id": 93889575, "github_url": "https://github.com/Punjabi2021", @@ -30167,11 +30054,7 @@ "github_url": "https://github.com/ddfridley", "avatar_url": "https://avatars.githubusercontent.com/u/3317487?v=4", "gravatar_id": "", -<<<<<<< HEAD - "contributions": 676 -======= "contributions": 681 ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 }, { "id": 57958253, @@ -30665,11 +30548,7 @@ "github_url": "https://github.com/ddfridley", "avatar_url": "https://avatars.githubusercontent.com/u/3317487?v=4", "gravatar_id": "", -<<<<<<< HEAD - "contributions": 2667 -======= "contributions": 2684 ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 }, { "id": 1662766, @@ -30888,6 +30767,13 @@ "gravatar_id": "", "contributions": 12 }, + { + "id": 49116017, + "github_url": "https://github.com/MingyiXu11", + "avatar_url": "https://avatars.githubusercontent.com/u/49116017?v=4", + "gravatar_id": "", + "contributions": 11 + }, { "id": 113366368, "github_url": "https://github.com/Ngan-Nikki-Tran", @@ -30987,23 +30873,6 @@ "contributions": 4 }, { -<<<<<<< HEAD - "id": 49116017, - "github_url": "https://github.com/MingyiXu11", - "avatar_url": "https://avatars.githubusercontent.com/u/49116017?v=4", - "gravatar_id": "", - "contributions": 4 - }, - { - "id": 93106740, - "github_url": "https://github.com/Chenxuan-Liu", - "avatar_url": "https://avatars.githubusercontent.com/u/93106740?v=4", - "gravatar_id": "", - "contributions": 4 - }, - { -======= ->>>>>>> ded157c425fffd3ae9337f85cc35ae190bce2173 "id": 95101485, "github_url": "https://github.com/justEstif", "avatar_url": "https://avatars.githubusercontent.com/u/95101485?v=4", @@ -31543,7 +31412,7 @@ "github_url": "https://github.com/Spiteless", "avatar_url": "https://avatars.githubusercontent.com/u/5898009?v=4", "gravatar_id": "", - "contributions": 140 + "contributions": 141 }, { "id": 68244054, @@ -31867,6 +31736,13 @@ "gravatar_id": "", "contributions": 1 }, + { + "id": 28342886, + "github_url": "https://github.com/ntrehan", + "avatar_url": "https://avatars.githubusercontent.com/u/28342886?v=4", + "gravatar_id": "", + "contributions": 1 + }, { "id": 55468908, "github_url": "https://github.com/rmpcoding", @@ -31925,7 +31801,7 @@ "github_url": "https://github.com/apps/github-actions", "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", "gravatar_id": "", - "contributions": 135 + "contributions": 137 }, { "id": 5898009, @@ -32529,6 +32405,13 @@ "gravatar_id": "", "contributions": 1 }, + { + "id": 28342886, + "github_url": "https://github.com/ntrehan", + "avatar_url": "https://avatars.githubusercontent.com/u/28342886?v=4", + "gravatar_id": "", + "contributions": 1 + }, { "id": 33906590, "github_url": "https://github.com/ruben1s", @@ -32731,6 +32614,13 @@ "avatar_url": "https://avatars.githubusercontent.com/u/121916285?v=4", "gravatar_id": "", "contributions": 1 + }, + { + "id": 147114601, + "github_url": "https://github.com/nora-zajzon", + "avatar_url": "https://avatars.githubusercontent.com/u/147114601?v=4", + "gravatar_id": "", + "contributions": 1 } ] }, @@ -32776,7 +32666,7 @@ "github_url": "https://github.com/Spiteless", "avatar_url": "https://avatars.githubusercontent.com/u/5898009?v=4", "gravatar_id": "", - "contributions": 268 + "contributions": 269 }, { "id": 11644789, @@ -32804,7 +32694,7 @@ "github_url": "https://github.com/apps/github-actions", "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", "gravatar_id": "", - "contributions": 135 + "contributions": 137 }, { "id": 19891365, @@ -33282,6 +33172,13 @@ "gravatar_id": "", "contributions": 2 }, + { + "id": 28342886, + "github_url": "https://github.com/ntrehan", + "avatar_url": "https://avatars.githubusercontent.com/u/28342886?v=4", + "gravatar_id": "", + "contributions": 2 + }, { "id": 36276149, "github_url": "https://github.com/gregpawin", @@ -33610,6 +33507,13 @@ "avatar_url": "https://avatars.githubusercontent.com/u/121916285?v=4", "gravatar_id": "", "contributions": 1 + }, + { + "id": 147114601, + "github_url": "https://github.com/nora-zajzon", + "avatar_url": "https://avatars.githubusercontent.com/u/147114601?v=4", + "gravatar_id": "", + "contributions": 1 } ] } @@ -44370,7 +44274,7 @@ "github_url": "https://github.com/kcoronel", "avatar_url": "https://avatars.githubusercontent.com/u/38144130?v=4", "gravatar_id": "", - "contributions": 456 + "contributions": 457 }, { "id": 62368440, @@ -44426,7 +44330,7 @@ "github_url": "https://github.com/kchotani", "avatar_url": "https://avatars.githubusercontent.com/u/87041811?v=4", "gravatar_id": "", - "contributions": 41 + "contributions": 44 }, { "id": 82855545, @@ -44850,7 +44754,7 @@ "github_url": "https://github.com/kcoronel", "avatar_url": "https://avatars.githubusercontent.com/u/38144130?v=4", "gravatar_id": "", - "contributions": 463 + "contributions": 464 }, { "id": 7094304, @@ -44906,7 +44810,7 @@ "github_url": "https://github.com/kchotani", "avatar_url": "https://avatars.githubusercontent.com/u/87041811?v=4", "gravatar_id": "", - "contributions": 42 + "contributions": 45 }, { "id": 86077274, @@ -47525,7 +47429,7 @@ "github_url": "https://github.com/jinyan0425", "avatar_url": "https://avatars.githubusercontent.com/u/90875339?v=4", "gravatar_id": "", - "contributions": 41 + "contributions": 44 }, { "id": 106640276, @@ -47602,7 +47506,7 @@ "github_url": "https://github.com/mklmrgn", "avatar_url": "https://avatars.githubusercontent.com/u/81997978?v=4", "gravatar_id": "", - "contributions": 18 + "contributions": 19 }, { "id": 99231663, @@ -48145,7 +48049,7 @@ "github_url": "https://github.com/jinyan0425", "avatar_url": "https://avatars.githubusercontent.com/u/90875339?v=4", "gravatar_id": "", - "contributions": 41 + "contributions": 44 }, { "id": 127683817, @@ -48229,7 +48133,7 @@ "github_url": "https://github.com/mklmrgn", "avatar_url": "https://avatars.githubusercontent.com/u/81997978?v=4", "gravatar_id": "", - "contributions": 18 + "contributions": 19 }, { "id": 99231663, From 9cc5ebe78e6afef788d535e3c73167da1826de3c Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Fri, 12 Jul 2024 01:28:27 -0700 Subject: [PATCH 57/62] fix conflicts --- ...nities-of-practice-information-updates.yml | 26 +++++-- cspell.json | 71 ++++++++++--------- 2 files changed, 57 insertions(+), 40 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/communities-of-practice-information-updates.yml b/.github/ISSUE_TEMPLATE/communities-of-practice-information-updates.yml index 0ea1d77aea..0f1bda8e85 100644 --- a/.github/ISSUE_TEMPLATE/communities-of-practice-information-updates.yml +++ b/.github/ISSUE_TEMPLATE/communities-of-practice-information-updates.yml @@ -1,9 +1,8 @@ + name: Communities of Practice information updates description: CoP leads use this issue to make changes to Leadership members and contact info -title: 'Communities of Practice information updates: [INSERT NAME OF Community of - Practice]' +title: 'Communities of Practice information updates: [INSERT NAME OF Community of Practice]' labels: ['role: product', 'P-Feature: Communities of Practice', 'time sensitive', 'Complexity: Missing', 'size: missing'] - body: - type: markdown attributes: @@ -20,9 +19,24 @@ body: - type: markdown attributes: value: "Change Description: NO" - - type: markdown + - type: dropdown + attributes: + label: "Change Leadership Type" + options: + - "YES" + - "NO" + description: "If YES on Change Leadership Type, choose the Leadership Type; if NO, leave the field with the NA value:" + validations: + required: true + - type: dropdown attributes: - value: "Change Leadership Type: NO" + label: "Leadership Type" + options: + - "N/A" + - "Mentor Led" + - "Community Led" + default: 0 + description: "Select the type of leadership if applicable." - type: markdown attributes: value: "Change Slack Link: NO" @@ -65,4 +79,4 @@ body: attributes: value: | folder where files are in the repo: https://github.com/hackforla/website/tree/gh-pages/_data/internal/communities - where you can see the live page: https://www.hackforla.org/communities-of-practice + where you can see the live page: https://www.hackforla.org/communities-of-practice \ No newline at end of file diff --git a/cspell.json b/cspell.json index a56cd04788..1a39efbdca 100644 --- a/cspell.json +++ b/cspell.json @@ -1,35 +1,38 @@ { - "version": "0.2", - "language": "en", - // words - list of words to be always considered correct - "words": [ - "VRMS", - "Westside", - "Cleantech", - "Inclusivity", - "Collabathon", - "Undebate", - "hackforla", - "redirections" - ], - "ignoreWords": [ - "Harish" - ], - "ignorePaths": [ - "node_modules", - ".github", - "test/", - "docker-compose.yml", - "_sass/", - "_data/internal/credits/", - "_includes/design-system-page/examples/", - "_includes/svg/", - "assets/", - "_config.docker.yml", - "_site/", - "github-actions/", - "redirections/", - "surveys/", - "google-apps-scripts/" - ] -} + "version": "0.2", + "language": "en", + // words - list of words to be always considered correct + "words": [ + "VRMS", + "Westside", + "Cleantech", + "Inclusivity", + "Collabathon", + "Undebate", + "hackforla", + "redirections" + ], + "ignoreWords": [ + "Harish" + ], + "ignorePaths": [ + "node_modules", + ".github", + "test/", + "docker-compose.yml", + "_sass/", + "_data/internal/credits/", + "_includes/design-system-page/examples/", + "_includes/svg/", + "assets/", + "_config.docker.yml", + "_site/", + "github-actions/", + "redirections/", + "surveys/", + "google-apps-scripts/" + ], + "ignoreRegExpList": [ + "\\- name:.*$" + ] + } \ No newline at end of file From 48467582946f2b11736870664035c07966c69e1c Mon Sep 17 00:00:00 2001 From: Moaz Ali Date: Sun, 14 Jul 2024 17:45:39 -0700 Subject: [PATCH 58/62] Add try/catch blocks --- .../preliminary-update-comment.js | 335 ++++++++++-------- 1 file changed, 184 insertions(+), 151 deletions(-) diff --git a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js index b5792ea656..78b15002d6 100644 --- a/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js +++ b/github-actions/trigger-issue/add-preliminary-comment/preliminary-update-comment.js @@ -42,39 +42,40 @@ const READY_FOR_DEV_LABEL = "ready for dev lead"; * @param {Number} issueNum - The number of the issue where the post will be made */ async function main({ g, c }, { shouldPost, issueNum }) { + try { + // If the previous action returns false, stop here + if(shouldPost === false) { + console.log("Issue creator not a team member, no need to post comment."); + return; + } - // If the previous action returns false, stop here - if (shouldPost === false) { - console.log('Issue creator not a team member, no need to post comment.'); - return; - } - - github = g; - context = c; - // Get the latest developer in case there are multiple assignees - assignee = await getLatestAssignee(); - - // Check if developer is allowed to work on this issue - const isAdminOrMerge = await memberOfAdminOrMergeTeam(); - const isAssignedToAnotherIssues = await assignedToAnotherIssue(); + github = g; + context = c; + // Get the latest developer in case there are multiple assignees + assignee = await getLatestAssignee(); - // If developer is not in Admin or Merge Teams and assigned to another issue/s, do the following: - if (!isAdminOrMerge && isAssignedToAnotherIssues) { - const comment = await createComment("multiple-issue-reminder.md"); - await postComment(issueNum, comment, github, context); + // Check if developer is allowed to work on this issue + const isAdminOrMerge = await memberOfAdminOrMergeTeam(); + const isAssignedToAnotherIssues = await assignedToAnotherIssue(); - await unAssignDev(); // Unassign the developer - await addLabel(READY_FOR_DEV_LABEL); // Add 'ready for dev lead' label + // If developer is not in Admin or Merge Teams and assigned to another issue/s, do the following: + if(!isAdminOrMerge && isAssignedToAnotherIssues) { + const comment = await createComment("multiple-issue-reminder.md"); + await postComment(issueNum, comment, github, context); - // Update item's status to "New Issue Approval" - const itemInfo = await getItemInfo(); - await updateItemStatus(itemInfo.id, statusValues.get(New_Issue_Approval)); - } + await unAssignDev(); // Unassign the developer + await addLabel(READY_FOR_DEV_LABEL); // Add 'ready for dev lead' label - // Otherwise, post the normal comment - else { - const comment = await createComment("preliminary-update.md"); - await postComment(issueNum, comment, github, context); + // Update item's status to "New Issue Approval" + const itemInfo = await getItemInfo(); + await updateItemStatus(itemInfo.id, statusValues.get(New_Issue_Approval)); + } else { + // Otherwise, post the normal comment + const comment = await createComment("preliminary-update.md"); + await postComment(issueNum, comment, github, context); + } + } catch(error) { + throw new Error(error); } } @@ -83,14 +84,18 @@ async function main({ g, c }, { shouldPost, issueNum }) { * @returns {Boolean} - return true if developer is member of Admin/Merge team, false otherwise */ async function memberOfAdminOrMergeTeam() { - // Get all members in Admin Team - const websiteAdminsMembers = await getTeamMembers(github, context, "website-admins"); + try { + // Get all members in Admin Team + const websiteAdminsMembers = await getTeamMembers(github, context, "website-admins"); - // Get all members in Merge Team - const websiteMergeMembers = await getTeamMembers(github, context, "website-merge"); + // Get all members in Merge Team + const websiteMergeMembers = await getTeamMembers(github, context, "website-merge"); - // Return true if developer is a member of the Admin or Merge Teams - return (assignee in websiteAdminsMembers || assignee in websiteMergeMembers); + // Return true if developer is a member of the Admin or Merge Teams + return(assignee in websiteAdminsMembers || assignee in websiteMergeMembers); + } catch(error) { + throw new Error("Error getting membership status: " + error); + } } /** @@ -98,47 +103,55 @@ async function memberOfAdminOrMergeTeam() { * @returns {Boolean} - return true if developer is assigned to another issue/s */ async function assignedToAnotherIssue() { - const issues = (await github.rest.issues.listForRepo({ - owner: context.repo.owner, - repo: context.repo.repo, - assignee: assignee, - state: "open", // Only fetch opened issues - })).data; + try { + const issues = (await github.rest.issues.listForRepo({ + owner: context.repo.owner, + repo: context.repo.repo, + assignee: assignee, + state: "open", // Only fetch opened issues + })).data; - const otherIssues = []; + const otherIssues = []; - for(const issue of issues) { - // Check is it's an "Agenda" issue - const isAgendaIssue = issue.labels.some(label => label.name === "feature: agenda"); + for(const issue of issues) { + // Check is it's an "Agenda" issue + const isAgendaIssue = issue.labels.some(label => label.name === "feature: agenda"); - // Check if it's a "Prework" issue - const isPreWork = issue.labels.some(label => label.name === "Complexity: Prework"); + // Check if it's a "Prework" issue + const isPreWork = issue.labels.some(label => label.name === "Complexity: Prework"); - // Check if it exists in "Emergent Request" Status - const inEmergentRequestStatus = (await getItemInfo()).statusName === Emergent_Requests; + // Check if it exists in "Emergent Request" Status + const inEmergentRequestStatus = (await getItemInfo()).statusName === Emergent_Requests; - // Check if it exists in "New Issue Approval" Status - const inNewIssueApprovalStatus = (await getItemInfo()).statusName === New_Issue_Approval; + // Check if it exists in "New Issue Approval" Status + const inNewIssueApprovalStatus = (await getItemInfo()).statusName === New_Issue_Approval; - // Include the issue only if none of the conditions are met - if(!(isAgendaIssue || isPreWork || inEmergentRequestStatus || inNewIssueApprovalStatus)) - otherIssues.push(issue); - } + // Include the issue only if none of the conditions are met + if(!(isAgendaIssue || isPreWork || inEmergentRequestStatus || inNewIssueApprovalStatus)) + otherIssues.push(issue); + } - // If developer is assigned to another issue/s, return true - return otherIssues.length > 1; + // If developer is assigned to another issue/s, return true + return otherIssues.length > 1; + } catch(error) { + throw new Error("Error getting other issues: " + error); + } } /** * @description - Unassign developer from the issue */ async function unAssignDev() { - await github.rest.issues.removeAssignees({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.issue.number, - assignees: [assignee], - }); + try { + await github.rest.issues.removeAssignees({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.issue.number, + assignees: [assignee], + }); + } catch(error) { + throw new Error("Error unassigning developer: " + error); + } } /** @@ -148,31 +161,35 @@ async function unAssignDev() { * @returns {String} - return formatted comment */ async function createComment(fileName) { - const { statusName } = await getItemInfo(); - - const isPrework = context.payload.issue.labels.some((label) => label.name === 'Complexity: Prework'); - const isDraft = context.payload.issue.labels.some((label) => label.name === 'Draft'); - - if (statusName === New_Issue_Approval && !isDraft && !isPrework) { - if (context.payload.issue.user.login === assignee) { - fileName = 'draft-label-reminder.md'; - } else { - fileName = 'unassign-from-NIA.md'; - await unAssignDev(); + try { + const { statusName } = await getItemInfo(); + + const isPrework = context.payload.issue.labels.some((label) => label.name === 'Complexity: Prework'); + const isDraft = context.payload.issue.labels.some((label) => label.name === 'Draft'); + + if(statusName === New_Issue_Approval && !isDraft && !isPrework) { + if(context.payload.issue.user.login === assignee) { + fileName = 'draft-label-reminder.md'; + } else { + fileName = 'unassign-from-NIA.md'; + await unAssignDev(); + } } - } - const filePath = './github-actions/trigger-issue/add-preliminary-comment/' + fileName; - const commentObject = { - replacementString: assignee, - placeholderString: '${issueAssignee}', - filePathToFormat: filePath, - textToFormat: null - }; - - // Return the formatted comment - const formattedComment = formatComment(commentObject, fs); - return formattedComment; + const filePath = './github-actions/trigger-issue/add-preliminary-comment/' + fileName; + const commentObject = { + replacementString: assignee, + placeholderString: '${issueAssignee}', + filePathToFormat: filePath, + textToFormat: null + }; + + // Return the formatted comment + const formattedComment = formatComment(commentObject, fs); + return formattedComment; + } catch(error) { + throw new Error("Error creating comment: " + error); + } } /** @@ -180,12 +197,16 @@ async function createComment(fileName) { * @param {String} labelName - Name of the label to add */ async function addLabel(labelName) { - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.issue.number, - labels: [labelName], - }); + try { + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.issue.number, + labels: [labelName], + }); + } catch(error) { + throw new Error("Error Adding label: " + error); + } } /** @@ -193,19 +214,23 @@ async function addLabel(labelName) { * @returns {String} - return the username of the latest assignee */ async function getLatestAssignee() { - let issueAssignee = context.payload.issue.assignee.login; + try { + let issueAssignee = context.payload.issue.assignee.login; - const eventdescriptions = await getTimeline(context.payload.issue.number, github, context); + const eventdescriptions = await getTimeline(context.payload.issue.number, github, context); - // Find out the latest developer assigned to the issue - for(let i = eventdescriptions.length - 1 ; i>=0; i-=1){ - if(eventdescriptions[i].event == 'assigned'){ - issueAssignee = eventdescriptions[i].assignee.login; - break; + // Find out the latest developer assigned to the issue + for(let i = eventdescriptions.length - 1; i >= 0; i -= 1) { + if(eventdescriptions[i].event == 'assigned') { + issueAssignee = eventdescriptions[i].assignee.login; + break; + } } - } - return issueAssignee; + return issueAssignee; + } catch(error) { + throw new Error("Error getting last assignee: " + error); + } } /** @@ -213,46 +238,50 @@ async function getLatestAssignee() { * @returns {Object} - An object containing the item ID and its status name */ async function getItemInfo() { - const query = `query($owner: String!, $repo: String!, $issueNum: Int!) { - repository(owner: $owner, name: $repo) { - issue(number: $issueNum) { - id - projectItems(first: 100) { - nodes { - id - fieldValues(first: 100) { - nodes { - ... on ProjectV2ItemFieldSingleSelectValue { - name + try { + const query = `query($owner: String!, $repo: String!, $issueNum: Int!) { + repository(owner: $owner, name: $repo) { + issue(number: $issueNum) { + id + projectItems(first: 100) { + nodes { + id + fieldValues(first: 100) { + nodes { + ... on ProjectV2ItemFieldSingleSelectValue { + name + } } } } } } } - } - }`; + }`; - const variables = { - owner: context.repo.owner, - repo: context.repo.repo, - issueNum: context.payload.issue.number - }; + const variables = { + owner: context.repo.owner, + repo: context.repo.repo, + issueNum: context.payload.issue.number + }; - const response = await github.graphql(query, variables); + const response = await github.graphql(query, variables); - // Extract the list of project items associated with the issue - const projectItems = response.repository.issue.projectItems.nodes; - - // Since there is always one item associated with the issue, - // directly get the item's ID from the first index - const id = projectItems[0].id; + // Extract the list of project items associated with the issue + const projectItems = response.repository.issue.projectItems.nodes; + + // Since there is always one item associated with the issue, + // directly get the item's ID from the first index + const id = projectItems[0].id; - // Iterate through the field values of the first project item - // and find the node that contains the 'name' property, then get its 'name' value - const statusName = projectItems[0].fieldValues.nodes.find(item => item.hasOwnProperty('name')).name; + // Iterate through the field values of the first project item + // and find the node that contains the 'name' property, then get its 'name' value + const statusName = projectItems[0].fieldValues.nodes.find(item => item.hasOwnProperty('name')).name; - return { id, statusName }; + return { id, statusName }; + } catch(error) { + throw new Error("Error updating item's status: " + error); + } } /** @@ -261,29 +290,33 @@ async function getItemInfo() { * @param {String} newStatusValue - The new status value to be assigned to the item */ async function updateItemStatus(itemId, newStatusValue) { - const mutation = `mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $value: String!) { - updateProjectV2ItemFieldValue(input: { - projectId: $projectId, - itemId: $itemId, - fieldId: $fieldId, - value: { - singleSelectOptionId: $value - } - }) { - projectV2Item { - id + try { + const mutation = `mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $value: String!) { + updateProjectV2ItemFieldValue(input: { + projectId: $projectId, + itemId: $itemId, + fieldId: $fieldId, + value: { + singleSelectOptionId: $value + } + }) { + projectV2Item { + id + } } - } - }`; - - const variables = { - projectId: PROJECT_ID, - itemId: itemId, - fieldId: STATUS_FIELD_ID, - value: newStatusValue - }; - - await github.graphql(mutation, variables); + }`; + + const variables = { + projectId: PROJECT_ID, + itemId: itemId, + fieldId: STATUS_FIELD_ID, + value: newStatusValue + }; + + await github.graphql(mutation, variables); + } catch(error) { + throw new Error("Error in updateItemStatus function: " + error); + } } module.exports = main; \ No newline at end of file From ab93b972bee152afcb9c0fc89512b3f526fb0185 Mon Sep 17 00:00:00 2001 From: Moaz Ali <32923319+moazDev1@users.noreply.github.com> Date: Sun, 14 Jul 2024 17:49:22 -0700 Subject: [PATCH 59/62] Update communities-of-practice-information-updates.yml --- .../communities-of-practice-information-updates.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/communities-of-practice-information-updates.yml b/.github/ISSUE_TEMPLATE/communities-of-practice-information-updates.yml index 0f1bda8e85..3098d2544f 100644 --- a/.github/ISSUE_TEMPLATE/communities-of-practice-information-updates.yml +++ b/.github/ISSUE_TEMPLATE/communities-of-practice-information-updates.yml @@ -1,4 +1,3 @@ - name: Communities of Practice information updates description: CoP leads use this issue to make changes to Leadership members and contact info title: 'Communities of Practice information updates: [INSERT NAME OF Community of Practice]' @@ -79,4 +78,4 @@ body: attributes: value: | folder where files are in the repo: https://github.com/hackforla/website/tree/gh-pages/_data/internal/communities - where you can see the live page: https://www.hackforla.org/communities-of-practice \ No newline at end of file + where you can see the live page: https://www.hackforla.org/communities-of-practice From 2de5ef951509a613a8089479f32c6b7ff6ce114f Mon Sep 17 00:00:00 2001 From: Moaz Ali <32923319+moazDev1@users.noreply.github.com> Date: Sun, 14 Jul 2024 17:51:03 -0700 Subject: [PATCH 60/62] Update cspell.json --- cspell.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cspell.json b/cspell.json index 1a39efbdca..babfe08658 100644 --- a/cspell.json +++ b/cspell.json @@ -1,7 +1,12 @@ { "version": "0.2", "language": "en", - // words - list of words to be always considered correct + ⚠ +Error: Parse error on line 3: +...anguage": "en", // words - list of w +----------------------^ +Expecting 'STRING', got 'undefined' +// words - list of words to be always considered correct "words": [ "VRMS", "Westside", @@ -35,4 +40,4 @@ "ignoreRegExpList": [ "\\- name:.*$" ] - } \ No newline at end of file + } From f1e8aec624ac165f6f0e7fff68b4b6bf6cb44d0e Mon Sep 17 00:00:00 2001 From: Moaz Ali <32923319+moazDev1@users.noreply.github.com> Date: Sun, 14 Jul 2024 17:52:49 -0700 Subject: [PATCH 61/62] Update cspell.json --- cspell.json | 79 +++++++++++++++++++++++++---------------------------- 1 file changed, 37 insertions(+), 42 deletions(-) diff --git a/cspell.json b/cspell.json index babfe08658..438bc52a9e 100644 --- a/cspell.json +++ b/cspell.json @@ -1,43 +1,38 @@ { - "version": "0.2", - "language": "en", - ⚠ -Error: Parse error on line 3: -...anguage": "en", // words - list of w -----------------------^ -Expecting 'STRING', got 'undefined' -// words - list of words to be always considered correct - "words": [ - "VRMS", - "Westside", - "Cleantech", - "Inclusivity", - "Collabathon", - "Undebate", - "hackforla", - "redirections" - ], - "ignoreWords": [ - "Harish" - ], - "ignorePaths": [ - "node_modules", - ".github", - "test/", - "docker-compose.yml", - "_sass/", - "_data/internal/credits/", - "_includes/design-system-page/examples/", - "_includes/svg/", - "assets/", - "_config.docker.yml", - "_site/", - "github-actions/", - "redirections/", - "surveys/", - "google-apps-scripts/" - ], - "ignoreRegExpList": [ - "\\- name:.*$" - ] - } + "version": "0.2", + "language": "en", + // words - list of words to be always considered correct + "words": [ + "VRMS", + "Westside", + "Cleantech", + "Inclusivity", + "Collabathon", + "Undebate", + "hackforla", + "redirections" + ], + "ignoreWords": [ + "Harish" + ], + "ignorePaths": [ + "node_modules", + ".github", + "test/", + "docker-compose.yml", + "_sass/", + "_data/internal/credits/", + "_includes/design-system-page/examples/", + "_includes/svg/", + "assets/", + "_config.docker.yml", + "_site/", + "github-actions/", + "redirections/", + "surveys/", + "google-apps-scripts/" + ], + "ignoreRegExpList": [ + "\\- name:.*$" + ] +} From d237f85d7b7c41651cce4df6ba917ddf2a2f7429 Mon Sep 17 00:00:00 2001 From: Moaz Ali <32923319+moazDev1@users.noreply.github.com> Date: Sun, 14 Jul 2024 17:54:07 -0700 Subject: [PATCH 62/62] Update issue-trigger.yml --- .github/workflows/issue-trigger.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/issue-trigger.yml b/.github/workflows/issue-trigger.yml index 402157828e..3c029be6df 100644 --- a/.github/workflows/issue-trigger.yml +++ b/.github/workflows/issue-trigger.yml @@ -52,7 +52,6 @@ jobs: uses: actions/github-script@v7 id: check-labels-prelim with: - github-token: ${{ secrets.HACKFORLA_GRAPHQL_TOKEN }} script: | const script = require('./github-actions/trigger-issue/add-preliminary-comment/check-label-preliminary-update.js') const checklabels = script({g: github, c: context})