manifesto icon indicating copy to clipboard operation
manifesto copied to clipboard

List of participants to coq-community is not easy to find and not visible enough.

Open Zimmi48 opened this issue 6 years ago • 5 comments

Meta-issue

To show to the outer world that coq-community is an active organization, it would be useful to be able to show the list of participants, in particular the list of principal maintainers. For now, people can easily browse the list of hosted projects. Some of these projects provide a meta.yml and README.md with the maintainer information but that is not the case for all, and even when it is the case, it requires opening every project.

A solution could be to put this list on the coq-community website once we have one.

Another solution would be to adopt the coding used in https://github.com/nix-community/ which includes [maintainer=@user] in the description of each project, so the list of maintainer can be aggregated from the page with the repositories.

Zimmi48 avatar Apr 09 '19 15:04 Zimmi48

Hi @Zimmi48, I vote for the last solution you propose, as maintaining the list of maintainers (no pun intended) could be easier if the number of information sources to update manually is limited…

For example, one can retrieve the list of @user mentioned in the description of the nix-community organization repos by running (after installing curl and jq):

curl -fsS https://api.github.com/orgs/nix-community/repos | \
 jq 'map({url: .html_url, maintainer: .description | scan("maintainer=(@[a-zA-Z0-9-]+)")[0]})'

which yields:

[
  {
    "url": "https://github.com/nix-community/nixbox",
    "maintainer": "@zimbatm"
  },
…
]

erikmd avatar Apr 14 '19 22:04 erikmd

Nice! What to do for repositories with several principal maintainers? Should we extend the syntax or select a single representative? What would be a good way of extending the syntax that remains compatible with such a jq-based parsing?

Zimmi48 avatar Apr 15 '19 11:04 Zimmi48

@Zimmi48

What to do for repositories with several principal maintainers?

good question;

Should we extend the syntax or select a single representative?

The latter solution might be a bit unfair if there are several principal maintainers… so the former solution may seem preferable.

Regarding the syntax of GitHub usernames (cf. https://github.com/shinnn/github-username-regex) it amounts to (ASCII) alphanumeric characters and hyphens, so it is easy to extend the syntax to have no ambiguity => I propose:

  • [maintainer=@maint] in case of 1 principal maintainer;
  • [maintainers=@maint1,@maint2] in case of 2 principal maintainers, accepting an optional space after the comma.

What would be a good way of extending the syntax that remains compatible with such a jq-based parsing?

The following snippet should work (the bulk of the work is actually done by jq's support of regexps):

curl -fsS https://api.github.com/orgs/nix-community/repos \
  | jq 'map({url: .html_url, maintainers: .description | scan("maintainers?=[@a-zA-Z0-9, -]+") | [ scan("@[a-zA-Z0-9-]+")]})'

erikmd avatar Apr 15 '19 15:04 erikmd

If we select this idea, one may also want to write either:

  • a small script to turn the JSON output automatically in a Markdown table (if one wants to put the list of maintainers in a README.md or a wiki page…);
  • or keep the JSON format as is, and write some JS or Vue.js code to turn it into an HTML table…

erikmd avatar Apr 15 '19 15:04 erikmd

I have implemented the suggested solution. I am fond of the idea of a script to generate a Markdown table. I would put it in a specific file in the repository, or in the wiki.

Zimmi48 avatar Apr 17 '19 14:04 Zimmi48