Skip to content

Contributors page only shows contributors to 30 repositories in Source Academy instead of all of them #3296

@mug1wara26

Description

@mug1wara26

The contributors page https://sourceacademy.nus.edu.sg/contributors does not show every repository under the Source Academy GitHub organisation. This is because when getting the list of repositories in

const apiRepoDetails: string = 'https://api.github.com/orgs/source-academy/repos';

The REST API defaults to 30 repositories due to pagination. To fix this, the API endpoint can take in a per_page argument like so:
https://api.github.com/orgs/source-academy/repos?per_page=100
This will work until the organisation has more than 100 repositories.

The Contributors list also has the same issue, where only the top 30 contributors are shown, with dependabot[bot] and dependabot-preview[bot] filtered out, though I'm not sure if we want all contributors to be shown as some repositories have 100+ contributors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions