ljharb / repo-report

CLI to list all repos a user has access to, and report on their configuration in aggregate.
MIT License
24 stars 11 forks source link

add metric: repo allows forking #52

Closed ljharb closed 2 years ago

ljharb commented 2 years ago

https://github.blog/changelog/2021-10-11-set-via-api-whether-a-repository-allows-forking/

The link is about #40, but that means the metric is also readable via the API.

thehanimo commented 2 years ago

forkingAllowed is available. To access it, the GraphQL query should look like this:

nodes {
    name
    nameWithOwner
    forkingAllowed
    ...
}

in https://github.com/ljharb/repo-report/blob/cd56a3926cd5fbdb1b5c7321d981b17ba5884149/src/commands/detail.js#L69-L71

All metric-dependent code has to be updated. (metrics.js, metricNames in commands/detail.js, defaults.json, validate.js)

rosekamallove commented 2 years ago

@ljharb I can work on this as it is pretty similar to #40

ljharb commented 2 years ago

It might also be nice to do a refactor that makes a single source of truth - so that in the future, adding new metrics can be done in a single place? not sure what that would look like tho.

rosekamallove commented 2 years ago

We can discuss that in the meeting this week maybe?