Skip to content

Commit

Permalink
Manually add basic alignment to match current style.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nandgopal-R authored Mar 11, 2025
1 parent 552b945 commit 408aba7
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions .github/scripts/vote_tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ module.exports = async ({ github, context, botCommentURL }) => {

if (userInfo) {
voteInfo.isVotedInLast3Months = isVotingWithinLastThreeMonths(voteInfo);
voteInfo.lastParticipatedVoteTime = currentTime;
voteInfo.lastParticipatedVoteTime = currentTime;
voteInfo[
voteChoice === "In favor"
? "agreeCount"
Expand Down Expand Up @@ -234,20 +234,19 @@ module.exports = async ({ github, context, botCommentURL }) => {

// Check if voting duration is within the last three months
function isVotingWithinLastThreeMonths(voteInfo) {
const currentDate = new Date();
let lastVoteDate;

if (voteInfo.lastParticipatedVoteTime && !voteInfo.lastParticipatedVoteTime.includes("Member has not")) {
lastVoteDate = new Date(voteInfo.lastParticipatedVoteTime);
} else {
return false; // No valid voting history
}

const diffInDays = (currentDate - lastVoteDate) / (1000 * 60 * 60 * 24);
return diffInDays <= 90; // 90 days = 3 months
}

// Function to update the voteTrackingFile with updated TSC Members
const currentDate = new Date();
let lastVoteDate;
if (voteInfo.lastParticipatedVoteTime && !voteInfo.lastParticipatedVoteTime.includes("Member has not")) {
lastVoteDate = new Date(voteInfo.lastParticipatedVoteTime);
} else {
return false; // No valid voting history
}

const diffInDays = (currentDate - lastVoteDate) / (1000 * 60 * 60 * 24);
return diffInDays <= 90; // 90 days = 3 months
}

// Function to update the voteTrackingFile with updated TSC Members
async function updateVoteTrackingFile() {
const tscMembers = maintainerInformation.filter(
(entry) => entry.isTscMember
Expand Down

0 comments on commit 408aba7

Please sign in to comment.