Platane / snk

🟩⬜ Generates a snake game from a github user contributions graph and output a screen capture as animated svg or gif
https://platane.github.io/snk
4.22k stars 1.03k forks source link

Is there a way to only count commits for a specific repository instead of a specific user? #70

Closed alanhe421 closed 1 year ago

Platane commented 1 year ago

I don't think so. Currently it read the data from the html page at https://github.com/alanhg

However, you could generate the grid yourself (by querying the github rest API for example) , and use


const grid = userContributionToGrid(cells);
const snake = snake4;

const chain = getBestRoute(grid, snake)!;

createSvg(grid, cells, chain, drawOptions, animationOptions);

from https://github.com/Platane/snk/blob/main/packages/action/generateContributionSnake.ts#L9-L51