repolinter
repolinter copied to clipboard
Add rule around checking for git-tags
It's a good practice to tag releases, if a repo doesn't have any tags, this should be a warning.
Is it possible to add a new axiom to check for releases? I am adding this code, using octokit, in my project, but it would be very nice to have something like this implemented as an axiom:
const { Octokit } = require('@octokit/rest')
const octokit = new Octokit() /*lib for GitHub API */
const releases = async function main() {
const r = await octokit.repos.listReleases({
owner: '',
repo: '',
per_page: 100,
})
if (r.data === undefined || r.data.length == 0) {
console.log('🚨 This project has no releases')
} else {
const howManyReleases = r.data.length
console.log('✅ it has ' + howManyReleases + ' releases so far')
}
}
releases()
If it is of the project interest, how could I add it?
A rule to check that releases are present (and/or if they match a certain pattern) might make sense. The main catch, however, is that at the moment Repolinter is hosting agnostic, and does not assume the project is hosted on GitHub. Perhaps if a hosting-provider
axiom were implemented, we could then begin implementing rules that were specifically designed to check GitHub items such as releases?
I makes super sense. Maybe I can share what I am doing as soon as I finish, than it will be easier to think about how to do it? Thank you for your super fast response :)