Git Product home page Git Product logo

check-my-repo's Introduction

(Ͼ˳Ͽ)...check-my-repo!!!

check-my-rpo-site.mov

Aiming to help Open Source Software maintainers we, at the Sauce Labs Open Source Program Office, created Check-My-Repo. An automated tool built upon Repolinter, that verifies if the main necessary parameters to comply with open source best practices, are present in the organization's or user's repositories.

By automating this verification, open source projects maintenance is more effective and effortless, and can help you and your organization to have compliant software projects easier to service, test, upgrade, and maintain.

Built with Node.js, Repolinter and Vue.js, it is designed to run locally and automated, displaying results on your organization’s or user’s GitHub Page.

Meant to be as easy as possible and usable out of the box, all you need to do is: fork it, and enable Pages choosing gh-pages as your GitHub pages repository. That easy 😊.

How to adopt it into my organization?

  1. Fork it
  2. Enable Actions on Settings/Actions Permissions
  3. Enable Pages on Settings/Pages by choosing gh-pages as your GitHub pages repository
check-my-repo-how-to.mov

Using GitHub Actions and default environment variables, it will automatically get our user/organization public information.

Please note that, as Actions are planned to run once a day on cron: '0 0 * * *' time, or when a push is made to the main branch, you need to wait until your organization/ user information is updated in the page.

It is designed to be as neutral as possible and comply with A11y accessibility guidelines. But, of course, you can modify all you want, it is open sourced under MIT license. Check How to Configure file to know how to do it.

Troubleshooting

Even if you enable GitHub Actions, you may need to enable it in 2 other places on the Actions tab. After clicking on the enable button, go back to Settings/Pages and you will see a note saying your page is published.

touble-shooting-check-my-repo.mov

Command Line Step By Step & Running It Locally

  1. Fork this project

  2. On your terminal, clone your fork

git clone https://github.com/<YOUR ORGANIZATION>/check-my-repo.git
  1. Open the repository on your favorite code editor.

  2. Install dependencies

npm install
  1. To run it locally, run the script:
node src/index.js

It enables you to verify all of your organization’s or user’s public repositories. You need to do this process at least once, as this generates a frontend.json file on the frontend/public folder, which will be used to display the information in Browser.

  1. Now let’s install your frontend application:
cd frontend
  1. Install frontend dependencies
npm install
  1. Run server locally
npm run serve
  1. Open link provided in terminal

That’s it!

Contributing

See CONTRIBUTING.md for details.

Want a fast, setup dev environment? Open in GitPod.

check-my-repo's People

Contributors

dependabot[bot] avatar diemol avatar discombobulateme avatar dylanlacey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

check-my-repo's Issues

Have a clear outputs strategy

Proposal should consider:

  • [] terminal output

  • [] web app

  • or [] static page (github pages)

  • [] public repo output

  • [] private repo output

For that should:

  • [] Create a user journey
  • [] Create a simple mockup

Clean code task

  • cleanup

GitHub Actions

  • add upload-artifact github action
  • run github action once a day

Code improvement

  • make organization an (required) parameter ($ node src/index.js --org saucelabs)

Improve README

Improve README with project information and details about how to use it and adapt for one own project

If linting passes: list passed tests

Description

Should console.log something like:
Repository: automated-oss-quality-check passed all 10 the tests
repository url <repository.git>

Acceptance criteria

  • [] Should be easy to read
  • [] Should contain detailed information about the tests that passed

Create manual process to add maintainers

Description

Should have a friendly way to add maintainer to repositories, when non is found

Questions around this issue

  1. should teams be maintainers?
  2. how can OSPO help binding a maintainer?
  3. should be manual or automatized?
  4. how to automatize without a "one fits all solution"?

Acceptance criteria and possibilities

  • [] should be done in a friendly way
  • [] should have someone responsible

If linting fails: list failures

Description

Should console.log detallied information about failure tests. Should return something like:

Repository: automated-oss-quality-check failled 3 tests
Failled tests:

  • README.md
  • License
    repository url <repository.git>

Acceptance criteria

  • [] Should be easy to read
  • [] Should contain detailed information about the tests that failed

Filter which repos should be checked

Description

User should be able to choose which repos or group of repos should be verified

To be defined

  1. Which kind of filter should it be? By name? By teams? By code owners?
  2. How is the filter going to be available? in GUI? As a prompt? As a command?
  3. Should return a report to the user? How? In terminal? By email? As issue in the repos?
  4. If it fails, should proceed as in the automated check, creating an issue in the failed repo? Or just to the user who want to know?

Acceptance criteria

  • [] should be able to lint and give a feedback only about the chosen repos

Create errors report

Description

Create error report when linting fails

To be decided

  1. To whom is this report addressed to? Code owners? Teams? OSPO?
  2. Which format should this repost be? Email? Issue? GitHub notification?

Create MVP

MVP should:

  • [] Lint all public repositories using custom ruleset
  • [] Show readable results in terminal
  • [] Be integrated with GitHub pipeline

Custom ruleset, fix: file created is HTML, should be .md

At repolinter.json we define our custom ruleset.
In each rule, if test fails, it is asked to create a new file.
New file is created in the temporary directory.

The new file created should be .md, instead it's creating a huge HTML, I guess cloning all the reference page instead of the file

Todo:

  • [] Clone reference file as .md

Project Overall Acceptance Criteria

Project Acceptance Criteria

  • [] Should be able to verify the existence of the following .md files: code of conduct, contributing, readme, security, changelog, support
  • [] Should be able to verify the existence of the following files: license, maintainers or codeowners
  • [] Should be able to tests if project uses SemVer
  • [] Create a script to daily checks and notifies OSPO in case of a failure on our repositories
  • [] Should be tested
  • [] Should run locally and over github repos
  • [] Should be able to check keywords within the code of conduct: diversity, friendly, etc
  • [] Should check if the type of license is valid according to OSPO guidelines: AFL, Apache, BSD, MIT, MS-PL, ISC, PHP License
  • [] Should not pass if contains: AGPL, Commons Clause, WTFPL and Beerware, has no license
  • [] Should check if there is an attribution to a “Maintain” role inside of the codeowner file
  • [] Should use GitHub workflow
  • [] Should use GitHub API to check if a new repo has being added and has OSPO approval
  • [] Should tests achieve at least 90% coverage

Push fix (rules) as a PR

At repolinter.json we define our custom ruleset.
In each rule, if test fails, it is asked to create a new file.
New file is created in the temporary directory.
It needs to be pushed into the remote/ original repository as a pull request

Return repolinter valid data

Description

Data returning from repolinter is not accurate.
Apparently the issue is that de code version in dependency is not temporally cloning the repository

How to reproduce the bug

  1. Compare repolinter of model repo (such as: https://github.com/saucelabs/new-project.git ) in bash (repolinter lint -g https://github.com/saucelabs/new-project.git) with results from using dependency (node src/index.js )

Possible solutions

  1. Open issue on repolinter github
  2. Create utils to temporarily clone the repo

Create end2end tests

Description

Create end to end test to check if requests are correctly made

To be defines

  1. using what?
  2. is returning the proper URL enough end2end?

Create issue in the repo when lint fails

Description

A issue should be automatically created in the repository when the linting doesn't pass

Acceptance criteria

  • [] an issue should be automatically created
  • [] issue should contain an explanation about how to be solved
  • [] issue title should be clear and simple

Access private repos

Description

Automated check should be able to access all Sauce Labs repositories

Acceptance criteria

  • [] should be able to do the same actions as in public repos

Create unit tests

Description

Create base unit tests to iterate on them

Tests

  • unit tests for utils file (use jest)
  • enable test coverage check (new features have to have the same or higher test coverage)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.