repolinter icon indicating copy to clipboard operation
repolinter copied to clipboard

Add rule around checking for git-tags

Open caniszczyk opened this issue 6 years ago • 3 comments

It's a good practice to tag releases, if a repo doesn't have any tags, this should be a warning.

caniszczyk avatar Mar 25 '18 20:03 caniszczyk

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?

discombobulateme avatar Dec 08 '20 10:12 discombobulateme

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?

prototypicalpro avatar Dec 08 '20 22:12 prototypicalpro

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 :)

discombobulateme avatar Dec 10 '20 09:12 discombobulateme