Skip to content

feat: add script to build contributors.md#639

Merged
mcdurdin merged 2 commits intokeymanapp:masterfrom
kingsuper195:feat/contributors
Jan 18, 2026
Merged

feat: add script to build contributors.md#639
mcdurdin merged 2 commits intokeymanapp:masterfrom
kingsuper195:feat/contributors

Conversation

@kingsuper195
Copy link
Contributor

Test-bot: skip

@keymanapp-test-bot
Copy link

User Test Results

Test specification and instructions

User tests are not required

@keymanapp-test-bot keymanapp-test-bot bot added this to the A19S20 milestone Jan 16, 2026
Copy link
Member

@mcdurdin mcdurdin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! A few small changes requested. Can you also add jsdoc comments for significant functions and standard Keyman copyright header?

program.parse(process.argv);

async function main() {
// Header for the markdown file. Can include explaination, title, etc.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Header for the markdown file. Can include explaination, title, etc.
// Header for the markdown file. Can include explanation, title, etc.

if (crowdata.data.status !== "finished") {
// Wait for the report to complete it's generation
console.log("Waiting");
let cdc = await crowdin.reportsApi.checkReportStatus(386703, crowdata.data.identifier);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard-coded values should be consts at top of file

}

export function genCrowdin(data) {
const MAJOR_CONTUBUTION_THRESHOLD = 1000;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Contribution

let major = [];
let minor = [];

// Mondify crowdin data to appear like the github data
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Mondify crowdin data to appear like the github data
// Modify crowdin data to appear like the github data

});

// Get a list of every repo in the keymanapp github organization
let allRepos = await getReposByOrg("keymanapp");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Const hard-coded values please

}

export function genGithub(repo) {
const MAJOR_CONTUBUTION_THRESHOLD = 100;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto


async function getReposByOrg(org) {
// Fetch a list of all repositories belonging to this organization.
console.log("TODO: Github Api Pagination");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be fixed up? Octokit.paginate


async function getAllRepos(allRepos) {
// Fetch the data for the given list of repositories.
console.log("TODO: Github Api Pagination");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dittto

return repos.data.map(repo => repo.name);
}

async function getAllRepos(allRepos) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you rename this to make it clearer what it is doing?

Also adds initial contributors.md file
Copy link
Member

@mcdurdin mcdurdin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mcdurdin mcdurdin added the feat label Jan 18, 2026
@mcdurdin mcdurdin enabled auto-merge January 18, 2026 03:31
@mcdurdin mcdurdin merged commit 1ed35b6 into keymanapp:master Jan 18, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants