Aller au contenu
Tous les projets

Open source · modulane

ai-disclosure

v1.0.0

modulane/ai-disclosure

A GitHub Action that fails a pull request until it says whether AI tools were used, and how.

Récupéré depuis GitHub

Étoiles
0
Forks
0
Contributeurs
1
Issues ouvertes
0
Issues fermées
0
PR ouvertes
0
PR fermées
5
Licence
MIT
Mis à jour

En direct de GitHub · synchronisé

Langages

  • JavaScript100,0%

README README complet ↗

Récupéré depuis GitHub

A GitHub Action that fails a pull request until its description says whether AI tools were used, and how.

Reviewers read AI-assisted code differently, and more and more projects ask contributors to say when they used it. A line in the contributing guide is easy to miss. This check makes the question part of every pull request: one box to tick, a few words when AI helped, and nothing for bots.

  • A required answer, not a reminder. As a required status check, it blocks the merge until the author answers, either way.
  • No judgement. It never guesses whether code was written by AI. It only asks the author to say so.
  • Safe on forks. It reads the description from the event: no token, no checkout, no code from the pull request.
  • Plain Markdown. The disclosure is two boxes in your pull request template, worded as you like.

How it works

The pull request template gets an AI use section with two boxes:

## AI use

<!-- Required, for everyone. Tick exactly one box. -->

- [ ] No AI tool was used
- [ ] AI tools were used, as described here:

<!-- If AI tools were used, name each one and what it did. -->

The check passes when exactly one box is ticked. With AI tools were used, the author also writes which tools and what they did, after the box on the same line or on the lines under it. Comments from the template never count as that description, and neither do the boxes or sections around it.

Editing the description runs the check again. Make it a required status check, and a pull request cannot be merged without a disclosure.

The action reads the description from the event. It needs no token and no checkout, and it never runs code from the pull request. Dependabot needs no disclosure, and other bots can be exempted too.

Rechercher sur le site

Accueil/fr
Open source/fr/projets
Projets clients/fr/clients
Compétences/fr/competences
À propos/fr/a-propos
CV/fr/cv
Contact/fr/contact
Déclaration d’accessibilité/fr/accessibilite
Comment le site est construit/fr/comment-le-site-est-construit
Politique de confidentialité/fr/confidentialite
Passer au thème clair
Read this page in English
Copier le lien de cette page