Giter Site home page Giter Site logo

add-a-license-please's Introduction

Add a License Please

A bot that crawls Github for projects without any license, and asks the owner to add a license.

Github is full of "open source" project that carry no explicit license. This bot will create an issue in repositories that are missing a license.

Why include a license?

Generally speaking, the absence of a license means that the default copyright laws apply. This means that you retain all rights to your source code and that nobody else may reproduce, distribute, or create derivative works from your work. This might not be what you intend.

Source: https://help.github.com/articles/open-source-licensing/

How does it work?

The bot searches Github for repositories that have some stars (although the star restriction is a bit wonky). For the returned repos, it will check to see existence of any license information. If it's missing, it will create an issue in the repo. Simple!

All repositories that are processed (skipped or issue created) are saved in a sqlite3 database. This is done to prevent double scanning the same repository.

Where is this bot running?

Currently I'm running this bot on a 1GB DigitalOcean instance (yes, that's an affiliate link. Use that to get free VPS for 2 months). The bot is low of resources and uses a couple MB of RAM.

Running

Requirements

  • Python 2.7
  • pip
  • sqlite3

Instructions

Create a file called config.py that looks like config_example.py. Fill in the necessary values.

For Github config:

  1. Register your application
  2. Create your oauth token

Then, to run the bot:

$ pip install -r requirements.txt
$ python bot.py

This only runs the bot once, meaning only one search. To make it look (think while True: search and stuff), you need to write your own wrapper. I'm not including mine to prevent misuse of Github's API.

Testing

From the project root:

$ pip install -r requirements.txt
$ python -m unittest discover test

add-a-license-please's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.