Skip to content

Find repositories by topic and open the listing pull request for them #26

Description

@Maximilian-Nesslauer

Listing your content is a hand-written TOML file today. GitHub can list every repository carrying a given topic, so a scheduled job could find the ones that want to be indexed and open the listing pull request itself.

The topic becomes one generic ksa-index rather than the per-account ksa-index-<username> of RFC 0038.

Only a repository administrator can set a topic at all, so both prove the same thing, that somebody with rights on that repository wants it indexed.

The per-account form additionally bound who may write the listing, and we need to drop that.

How it would run

The bot builds what it can from the repository and opens the pull request here either way.

name, authors, abstract and license come from the repository API. links.forums and compatibility.game_min are required by RFC 0031 and nothing in a GitHub repository carries them, so they come from .github/ksa-content-index.toml, which grows from an ownership marker into a small listing stub.

There should be 2 cases from there:

  • The stub has them. The document is complete, the pull request validates and merges itself.
  • The stub does not. The pull request is opened as a draft and mentions the repository owner, or its top contributor when the repository belongs to an organization, saying which fields are missing and to add them to that same file. The next tick picks the file up, completes the pull request and lets it merge.

What has to change

  • .github/ksa-content-index.toml gains the fields a crawler cannot derive.
  • ownership.verify compares ksa-index-<pull request author> today, so it has to learn the generic topic, and decide.py has to accept a pull request the bot opened itself.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions