python / python/devguide

Add a workflow to regularly run `make linkcheck`

Ouverte
#917 1 commentaire 4 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

infra type-feature
Langage dominant
Python
Étoiles
2.1k
Forks
1k
Merge moyen
2 j 12 h
PR mergées (30 j)
12

Description

This is a follow-up of #727 and related to #681. Since make linkcheck is somewhat unreliable and can't be required for regular PR, the idea is to use a workflow to run it regularly and create (or update) an issue when a link is unreachable. Note that make linkcheck is already run for PRs, but the result is only visible by looking at the logs.

@AlexWaygood shared a similar workflow in https://github.com/python/devguide/pull/727#issuecomment-1100939982:

Over at typeshed, we have a test that runs every night. If it fails, a bot auto-creates an issue for us. It works pretty well!

Here's the .yml file: https://github.com/python/typeshed/blob/master/.github/workflows/daily.yml

And here's an example of an issue that the bot auto-created when the test failed: https://github.com/python/typeshed/issues/7572

This workflow creates a new issue every time, and it might be ok if it's run weekly/monthly however -- if we want to run it more frequently -- updating an existing issue might be a better approach.

@hugovk also raised a concern in https://github.com/python/devguide/pull/727#issuecomment-1100912440

One concern: if the cron is often failing (which it might, and often), we don't want it to show the repo as failed at the top:

If this sounds useful we can agree on the details, fix the currently broken links, and adapt the workflow linked above.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Examinez le workflow de PR existant qui exécute make linkcheck et comparez-le au fichier typeshed référencé .github/workflows/daily.yml. Déterminez si le workflow planifié doit créer de nouvelles issues ou mettre à jour une issue existante, et assurez-vous que les échecs de liens sont signalés sans faire échouer les vérifications PR habituelles du dépôt.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
github-actions, python
Domaine
ci-cd, documentation
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
28/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.