Skip to content

Commit

Permalink
Merge branch 'hackforla:gh-pages' into add-github-handle-aleiya-gafar…
Browse files Browse the repository at this point in the history
…-6154
  • Loading branch information
Jperparas authored Mar 19, 2024
2 parents cb07b58 + 37adb4c commit 04a7a2b
Show file tree
Hide file tree
Showing 13 changed files with 1,937 additions and 1,754 deletions.
3,434 changes: 1,777 additions & 1,657 deletions _data/external/github-data.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _data/external/vrms_data.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _guide-pages/2FA.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h5 class="title-left"><strong>Visit and follow <a href="https://docs.github.com
</div>


<div class='section-container'>
<div class="section-container">
<a class="anchor" id="FAQ"></a>
<div class="step-header">
<h3>Frequently Asked Questions</h3>
Expand Down
2 changes: 1 addition & 1 deletion _includes/events-page/right-col-content.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h3 class="event-title title4">
<div class="mobile-dropdown">
<div class="meetup-steps-2">
<div id="img-content">
<img class="step-img-2" src="../assets/images/hack-nights/org-projects.png" alt="" />
<img class="step-img-2" src="../assets/images/hack-nights/org-projects.png" alt="">
</div>
<div id="text-content-1">
<p>
Expand Down
1 change: 1 addition & 0 deletions _projects/100-automations.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ leadership:
github: 'https://github.com/Olivia-Chiong'
picture: 'https://avatars.githubusercontent.com/Olivia-Chiong'
- name: Muhi-Dean Othman
github-handle:
role: Full-Stack Developer
links:
slack: 'https://hackforla.slack.com/team/U01F5K8DDPW'
Expand Down
4 changes: 4 additions & 0 deletions _projects/civic-tech-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ alt: "Civic Tech Index"
image-hero: /assets/images/projects/civic-tech-index-hero.png
leadership:
- name: Bonnie Wolfe
github-handle:
role: Agile Coach and Stakeholder Rep
links:
slack: 'https://hackforla.slack.com/team/UE1UG1YFP'
Expand All @@ -23,6 +24,7 @@ leadership:
github: 'https://github.com/cnk'
picture: https://avatars.githubusercontent.com/cnk
- name: Kevin Phan
github-handle:
role: Product Manager
links:
slack: 'https://hackforla.slack.com/team/U02B90U9FPS'
Expand All @@ -35,6 +37,7 @@ leadership:
github: https://github.com/smsada
picture: https://avatars.githubusercontent.com/smsada
- name: Briana Bennett
github-handle:
role: Product Manager
links:
slack: 'https://hackforla.slack.com/team/U031BRKV59C'
Expand Down Expand Up @@ -89,6 +92,7 @@ leadership:
github: 'https://github.com/Tekkieware'
picture: https://avatars.githubusercontent.com/Tekkieware
- name: Maxwell Countryman Skewes
github-handle:
role: Front End Developer and Tech Lead
links:
slack: 'https://hackforla.slack.com/team/U01R6RWQR3L'
Expand Down
6 changes: 0 additions & 6 deletions _projects/website.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ leadership:
slack: 'https://hackforla.slack.com/team/U043LGHSZFT'
github: 'https://github.com/t-will-gillis'
picture: https://avatars.githubusercontent.com/t-will-gillis
- name: Christina Or
role: Merge Team
links:
slack: 'https://hackforla.slack.com/team/U04J1GBA6QP'
github: 'https://github.com/christinaor'
picture: https://avatars.githubusercontent.com/christinaor
- name: Drake Nguyen
role: Merge Team
links:
Expand Down
40 changes: 29 additions & 11 deletions assets/js/wins.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@
if (document.querySelectorAll('.wins-card').length == 0) {
const page = document.querySelector('.wins-page-contain');
const p = document.createElement('p');
p.textContent = "No one has shared a win yet...be the first!";
page.appendChild(p);
p.innerHTML = "No one has shared a win yet...be the first!";
}
}

Expand Down Expand Up @@ -336,8 +336,26 @@
cloneCardTemplate.querySelector('.wins-card-github-icon').setAttribute('hidden', 'true')
}

cloneCardTemplate.querySelector('.project-inner.wins-card-team').innerHTML = `<span class="wins-team-role-color">Team(s): </span> ${card[team]}`;
cloneCardTemplate.querySelector('.project-inner.wins-card-role').innerHTML = `<span class="wins-team-role-color">Role(s): </span> ${card[role]}`;
// Avoiding using innerHTML due to security risks
// Creating the elements
const teamContainer = cloneCardTemplate.querySelector('.project-inner.wins-card-team');
const roleContainer = cloneCardTemplate.querySelector('.project-inner.wins-card-role');
const teamSpanElement = document.createElement('span');
teamSpanElement.classList.add('wins-team-role-color');
const roleSpanElement = document.createElement('span');
roleSpanElement.classList.add('wins-team-role-color');

// Preparing the text of the elements
teamSpanElement.textContent = "Team(s): ";
const teamTextNode = document.createTextNode(card[team]);
roleSpanElement.textContent = "Role(s): ";
const roleTextNode = document.createTextNode(card[role]);

// Inserting the elements into the DOM
teamContainer.appendChild(teamSpanElement);
teamContainer.appendChild(teamTextNode);
roleContainer.appendChild(roleSpanElement);
roleContainer.appendChild(roleTextNode);

cloneCardTemplate.querySelector('.wins-card-overview').textContent = card[overview];
cloneCardTemplate.querySelector('.wins-icon-container').setAttribute('data-index', index)
Expand Down Expand Up @@ -419,13 +437,13 @@ function changeSeeMoreBtn(x) {
const span = document.querySelectorAll(".see-more-div");
if (x.matches) {
for(let i = 0; i < span.length; i++) {
span[i].innerHTML = ''
span[i].textContent = ''
}
} else {
for(let i = 0; i < span.length; i++) {
// removes show-less-btn class
span[i].setAttribute('class', 'see-more-div');
span[i].innerHTML = "See More";
span[i].textContent = "See More";
}
}
}
Expand Down Expand Up @@ -483,7 +501,7 @@ function changeSeeMoreBtn(x) {
bigQuoteImg.alt = "Quote from " + data[i][name];

const overlayIcons = document.querySelector('#overlay-icons');
overlayIcons.innerHTML = "";
overlayIcons.textContent = "";

if (data[i][linkedin_url].length > 0) {
makeIcon(data[i][linkedin_url], overlayIcons, 'linkedin-icon', '/assets/images/wins-page/icon-linkedin-small.svg', 'LinkedIn profile for ' + data[i][name]);
Expand All @@ -492,16 +510,16 @@ function changeSeeMoreBtn(x) {
}

const overlayName = document.querySelector('#overlay-name');
overlayName.innerHTML = data[i][name];
overlayName.textContent = data[i][name];

const overlayTeams = document.querySelector('#overlay-teams');
overlayTeams.innerHTML = `Team(s): ${data[i][team]}`;
overlayTeams.textContent = `Team(s): ${data[i][team]}`;

const overlayRoles = document.querySelector('#overlay-roles');
overlayRoles.innerHTML = `Role(s): ${data[i][role]}`;
overlayRoles.textContent = `Role(s): ${data[i][role]}`;

const overlayOverview = document.querySelector('#overlay-overview');
overlayOverview.innerHTML = data[i][overview];
overlayOverview.textContent = data[i][overview];

insertIcons('#overlay-info', data[i][win], 'overlay')

Expand All @@ -524,7 +542,7 @@ function changeSeeMoreBtn(x) {

const overlayInfo = document.querySelector('#overlay-info');

overlayInfo.innerHTML = '';
overlayInfo.textContent = '';
}


Expand Down
12 changes: 6 additions & 6 deletions github-actions/trigger-schedule/github-data/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion github-actions/trigger-schedule/github-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/github": "^6.0.0",
"@actions/http-client": ">=2.2.0",
"@actions/http-client": ">=2.2.1",
"@octokit/rest": "^20.0.2",
"lodash": "^4.17.21",
"true-github-contributors": "^1.0.5"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
// Import modules
const fs = require('fs');
const issueTemplateParser = require('../../utils/issue-template-parser');
const postComment = require('../../utils/post-issue-comment');

// Global variables
var github;
var context;

async function main({ g, c }, artifactContent) {
async function main({ g, c }) {
github = g;
context = c;

// Retrieve lists data from json file written in previous step
let inactiveLists = JSON.parse(artifactContent);
const filepath = 'github-actions/utils/_data/inactive-members.json';
const rawData = fs.readFileSync(filepath, 'utf8');
let inactiveLists = JSON.parse(rawData);

const owner = context.repo.owner;
const repo = context.repo.repo;
const agendaIssueNum = 2607; // Issue number of the Dev/PM meeting agenda on Mondays
const inactiveWithOpen = parseInactiveOpen(inactiveLists['cannotRemoveYet']);

// Create a new issue in repo, return the issue id for later: creating the project card linked to this issue
const issue = await createIssue(owner, repo, inactiveLists);
const issueId = issue.id;
const issueNumber = issue.number;
// Get project id, in order to get the column id of `New Issue Approval` in `Project Board`
const projectId = await getProjectId(owner, repo);
// Get column id, in order to create a project card in `Project Board` and place in `New Issue Approval`
const columnId = await getColumnId(projectId);
// Create the project card, which links to the issue created in createIssue() above
await createProjectCard(issueId, columnId);

// Add issue number used to reference the issue and comment on the `Dev/PM Agenda and Notes`
const commentBody = `**Review Inactive Team Members:** #` + issueNumber;
const commentBody = `**Review Inactive Team Members:** #` + issueNumber + inactiveWithOpen;
await postComment(agendaIssueNum, commentBody, github, context);
}

Expand All @@ -49,7 +47,7 @@ const createIssue = async (owner, repo, inactiveLists) => {
per_page: 1,
page: 1,
});
let thisIssueNumber = thisIssuePredict['data'][0]['number'] + 1
let thisIssueNumber = thisIssuePredict['data'][0]['number'] + 1;

// Uses issueTemplateParser to pull the relevant data from the issue template
const pathway = 'github-actions/trigger-schedule/list-inactive-members/inactive-members.md';
Expand Down Expand Up @@ -77,38 +75,16 @@ const createIssue = async (owner, repo, inactiveLists) => {
return issue.data;
};

const getProjectId = async (owner, repo) => {
// Get all projects for the repo
let projects = await github.rest.projects.listForRepo({
owner,
repo,
});
// Select project with name `Project Board` then access the project `id`
let projectId = projects.data.filter((project) => {
return (project.name = "Project Board");
})[0].id;
return projectId;
};

const getColumnId = async (projectId) => {
// Get all columns in the project board
let columns = await github.rest.projects.listColumns({
project_id: projectId,
});
// Select column with name `New Issue Approval` then access the column `id`
let columnId = columns.data.filter((column) => {
return column.name === "New Issue Approval";
})[0].id;
return columnId;
};

const createProjectCard = async (issueId, columnId) => {
const card = await github.rest.projects.createCard({
column_id: columnId,
content_id: issueId,
content_type: "Issue",
});
return card.data;
const parseInactiveOpen = (inactiveOpens) => {
if(Object.keys(inactiveOpens).length === 0){
return '';
} else {
let inactiveOpen = '\r\n\nInactive members with open issues:\r\n';
for(const [key, value] of Object.entries(inactiveOpens)){
inactiveOpen += ' - ' + key + ': # ' + value + '\r\n';
}
return inactiveOpen;
}
};

module.exports = main;
69 changes: 69 additions & 0 deletions github-actions/utils/_data/inactive-members.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"removedContributors": [
"pearlescence-m",
"davidwiese",
"soleilherring",
"Pfulcher26",
"StephenTheDev1001",
"dantor09",
"iris-jeong",
"bphan002",
"erinzz",
"typingtrex",
"aramattamara",
"JpadillaCoding",
"Khwalab3ar",
"mariareeves",
"michelle-jx",
"JoshuaGirgis",
"dustinowen",
"jasonlinlinlin",
"vincentdang",
"vivvvnguyen "
],
"notifiedContributors": [
"jlevot",
"wanyuguan",
"atbalaji",
"adrianang",
"nelsonuprety1",
"Tomomi-K1",
"sopheak012",
"agutiernc",
"jtkabenni",
"kianaeunice",
"djbradleyii",
"blulady",
"n2020h",
"johnApale",
"coding-yost",
"DakuwoN",
"nnr-nnr",
"samuelkhong",
"Josiah-O",
"LukeLowrey2",
"ndmoc",
"ronaldpaek",
"GRK1998",
"liamtirney",
"Joyce750526",
"jackyuan1",
"ortegaa32",
"KyleA99",
"Jfong1218",
"gdkoo",
"Ovando21",
"dimiprousalis",
"allison-truhlar",
"harimwoo",
"kevin31yu",
"james-aguirre",
"colin-macrae",
"anjolaaoluwa",
"JanineSooThow",
"crystallyyy",
"ChrisKildunne",
"tkozek"
],
"cannotRemoveYet": {}
}
Loading

0 comments on commit 04a7a2b

Please sign in to comment.