Git Product home page Git Product logo

clahub's Introduction

Overview

CLAHub provides a low-friction way to have a Contributor License Agreement for your open source project that's hosted on GitHub. Contributors digitally sign your CLA by signing in with GitHub. Then, it automatically marks up your pull requests based on whether the contributors have all signed your CLA.

Right now it's running at https://www.clahub.com

I don't intend for this to lead to a proliferation of CLAs. But when they're appropriate, I hope it can reduce the friction of contribution.

This project is a work-in-progress. Any and all feedback is welcome!

It currently works, but could use UI and functionality improvement. Find such discussion in GitHub issues.

Build status

Build Status

What's a CLA?

Contributor Agreements are a way to prove intellectual property (IP) provenance of contributions to an open-source project. They generally say that:

  1. The code I’m contributing is mine, and I have the right to license it.
  1. I’m granting you a license to distribute said code under the terms of this agreement (typically “as you see fit” or “under an OSI-approved license” or whatever).

-- From Contributor License Agreements by Jacob Kaplan-Moss

Here's some more background on CLAs:

Want to choose a CLA? Harmony Agreements is a web tool that helps you quickly select a CLA:

Legal disclaimer

I am not a lawyer, and none of the CLAhub documentation, functionality, or other communication constitutes legal advice. Consult your lawyer about contributor agreements for your project.

Development

Prerequisites

Register a new app at GitHub to get an OAuth key and secret:

https://github.com/settings/applications/new

Set up a .env file with your GITHUB_KEY and GITHUB_SECRET. You can also specify an HTTP port for local foreman:

GITHUB_KEY=abc123
GITHUB_SECRET=234897239872394832478
GITHUB_LIMITED_KEY=xyz789
GITHUB_LIMITED_SECRET=2390482390482
PORT=3000

Register for two new GitHub applications, one will be used for project owner signups and one for contributors signups.

You will need to configure the authorization callback URL for each:

This file is .gitignored so it's private.

We use the dotenv gem to provide these variables to the test environment as well.

JavaScript acceptance tests use poltergeist which requires installing PhantomJS. Follow the PhantomJS installation instructions on the poltergeist README.

Getting set up

Install gems and initialize databases:

bundle
rake db:create db:migrate db:test:prepare

Run the tests to make sure things are working:

rake

Running the app

Run with Foreman if you like:

foreman start

Or as normal (.env is loaded by dotenv gem):

rails server
rails console

Coverage

Use SimpleCov to build code coverage:

COVERAGE=true rake

LiveReload

When working on display-heavy features, LiveReload saves valuable keystrokes and time. We use guard-livereload to watch templates and assets and reload when they change.

To take advantage of this:

Development and Webhooks

As part of the app, we sign up to receive GitHub webhooks (HTTP requests to /repo_hook) to be notified when stuff happens to repos we care about. (In particular, we want to know about new pushes so we can assess whether their contributors have agreed to the relevant CLA.)

When you're developing locally, GitHub can't send webhook events to you at localhost:3000, so use a local tunnelling service like ngrok or localtunnel.me.

Then, you should run the Rails server with the HOST environment variable set, like HOST=http://my.fancy.dynamic.host.name rails server, or set it in .env if using foreman. This is read in config/initializers/host.rb

Note that the dynamic hostname you use is saved in the GitHub webhook registrations. If your dynamic hostname changes, you will need to update the webhooks in GitHub so that it knows where to send the requests.

Deployment

See DEPLOY.md for information on deploying.

License

See LICENSE for the project license.

The "Clipboard and pencil" graphic used in the homepage logo is licensed from iStockPhoto.com:

http://www.istockphoto.com/stock-illustration-16006726-clipboard-and-pencil.php

The graphic is licensed for a single-seat install and is in use at https://www.clahub.com. It is not licensed for multi-seat use, so any other installations should purchase a separate license or use a different image.

http://www.istockphoto.com/help/licenses

clahub's People

Contributors

aj-acevedo avatar bkeepers avatar brainheart avatar dependabot[bot] avatar edent avatar floppy avatar fusion94 avatar hrj avatar jasonm avatar jugglinmike avatar kelseyq avatar mcccs avatar mzagaja avatar ryanttb avatar step21 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  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  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  avatar

Watchers

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

clahub's Issues

Ability to change CLA text (revisions, versioning)

Perhaps I missed something but now that I've created my CLA, I can't seem to update or delete it. It's a fire and forget thing. This is critical to have in the future as CLA's will change over time much like a Terms of Service and Privacy Policies.

This will break adoption in a big way.

So an administrative interface needs to be cooked up to allow the owner to revise/delete/version their CLA's. This interface should probably also allow the owner to remove users who have already signed the CLA.

Combined Status API

Combined Status API is not available. So this means we could have support for running both clahub and Travis CI at the same time for each pull request. I think it is needed that clahub sets a correct context for this to work.

Educate users

The app is very barebones and mechanical right now, and I think the most important addition is around educating people about when they might want a CLA, what it does, and how to choose one.

Status broken after domain change

When changing domains from clahub.herokuapp.com to www.clahub.com, I neglected to update a production config variable that determines the hostname for GitHub's post-receive webhook notifications. As such, commits were not being updated as pass/fail based on CLA signature status.

This has been fixed and I updated all existing webhook URLs via API in production and verified this.

For folks with CLAs on the production site: I'd generally avoid publicizing user information, but I'd rather notify folks about this. I've emailed everyone whose email I can ascertain. For others I only have the GitHub username, and can't figure out how to send a GH message (didn't that feature exist previously?) As such, cc @maxandersen @webmink @pidster.

URL for finished CLA

Once a user creates a CLA for a project/repo they are presented text and/or directed to a URL that looks something like this:

To get started, <a href="http://www.clahub.com/agreements/4/ArduinoExamples">sign the Contributor License Agreement</a>.

The issue is that the actual URL is located at:

http://www.clahub.com/agreements/fusion94/ArduinoExamples

"Something went wrong" message when signing agreement

Hey,

I created an agreement yesterday for my open source project ConDep, but when my Contributors try to sign the agreement, they get a page saying: "Something went wrong".

Btw, great initiative!

Thanks,

./jon

clahub.com doesn't provide SSL access

I really like the idea and I'd like to contribute to a project that uses CLAhub to manage CLAs. I know there are some cost added by getting a SSL-certificate in order to enable HTTPS but I'm not so much in favour to use a service that requires me to pass personal data like a phone number yet doesn't provide at least transport security.

Instead of barking about missing tin foil hats, what would be needed to get SSL on clahub.com? :)

ToS Agreement

Owners/Admins need to agree to the CLAHub ToS prior to creations a CLA.

Allow project maintainer to manually add contributor email addresses

Until all the legal details get worked out (see #5), it would be great if CLAHub could also support other CLA signing processes (e.g., mailing a signed paper copy of the form, fax, S/MIME or GPG signature, etc).

The easiest way to allow projects to effectively use CLAHub (and GitHub pull requests) is the provide for manual entry of CLA signing info:

  • date of signature
  • name
  • email address
  • GitHub username?
  • mailing address?
  • phone number?

See also #25, #31.

Changing repo owner

Cool service. Just wondering if changing the repo owner/organization would mess with the link between CLA hub and the project at all. That might happen in the near future so I want to know if I should wait to do CLA hub until then. Thanks!

GitHub webhook sometimes gets an HTTP 504 Gateway Timeout from CLAHub

I'm trying to verify the CLAHub setup for Molajo/Filesystem - specifically, Molajo/Filesystem#2. That project is using TravisCI, so #27 still applies here and we'll currently only see one status indicator at a time (Travis or CLAHub) for a given pull.

That said, I can see via API access that CLAHub never correctly set a status on Molajo/Filesystem@3636c37 for Molajo/Filesystem#2.

In fact, when GitHub sent a Webhook to CLAHub, CLAHub responded with a 504 Gateway Timeout:

irb(main):008:0> pp g.repos.hooks.find('Molajo', 'Filesystem', a.github_repo_hook_id)
{"url"=>"https://api.github.com/repos/Molajo/Filesystem/hooks/ID_REDACTED",
 "test_url"=>
  "https://api.github.com/repos/Molajo/Filesystem/hooks/ID_REDACTED/test",
 "id"=>ID_REDACTED,
 "name"=>"web",
 "active"=>true,
 "events"=>["push"],
 "config"=>{"url"=>"http://www.clahub.com/repo_hook"},
 "last_response"=>{"code"=>504, "status"=>"timeout", "message"=>""},
 "updated_at"=>"2013-02-17T08:47:45Z",
 "created_at"=>"2013-02-06T06:33:13Z"}

It could have been that CLAHub was running on a single Heroku Dyno and did not spin up in time, or that the processing simply took too long.

Ideally GitHub webhooks would retry if given a non-2xx response. Absent that, we should ensure CLAHub always has at least 1 dyno. Since Heroku also imposes a 30-second limit on response time, we likely also want to background all webhook responses, similar to #1.

Integrate with GitHub new/edit file for CONTRIBUTING text

On agreements#show, we suggest linking the CLA from the CONTRIBUTING or CONTRIBUTING.md file:

We can check for the existence of those:

[~] curl -I https://github.com/jasonm/clahub-test/blob/master/CONTRIBUTING.md | grep HTTP
HTTP/1.1 404 Not Found

[~] curl -I https://github.com/jasonm/clahub-test/blob/master/README.md | grep HTTP
HTTP/1.1 200 OK

and suggest to create a new file:

https://github.com/blog/1327-creating-files-on-github

with a URL like:

https://github.com/jasonm/clahub-test/new/master?filename=CONTRIBUTING.md

or to edit an existing file with a URL like:

https://github.com/jasonm/clahub-test/edit/master/README.md

Support self-hosting and rebranding

My hope is that people find this useful enough to use for their own organizations. In that case, I would not expect that "@jasonm's free Heroku app" is the ideal infrastructure for storing your company's legally-binding agreements.

@fusion94 recommended providing sufficient hooks and documentation so that an organization can easily self-host the application and rebrand/crossbrand their installation. Imagine e.g. http://clas.apache.org with visual style consistent with their existing branding.

The purpose of this issue is originally to solicit feedback on this proposal. If you'd like this and have any thoughts on it, please include them here.

Allow configurable fields per CLA

What should we record upon signature to make the signature more legally defensible? IP address and time? Should the contributor re-type their name or initials? Anything else?

We shall allow agreement authors to include one or more predefined fields:

Implicit

  • GitHub username
  • Date

Default to: include on new CLAs, but allow opt-out

  • Email
  • Name
  • Mailing address
  • Country
  • Phone or Skype
  • Type "I AGREE"
  • Corporate Contributor Information

Default to: exclude from new CLAs, but allow opt-in

  • Type your initials

Check open pulls in a background job

When a contributor signs the agreement for a project with open pulls, we check all those pulls to update their signature status based on this new signature. With a lot of open pulls, that could take a while, making the contributor wait a while for the signature HTTP request.

The app/jobs/push_status_checker.rb is all set up to be async, it just isn't yet.

Provide access to raw data

Our (that is, node's) current CLA dumps the data into a google doc spreadsheet, which is available to the committers on the project.

In order to switch to clahub, we'd need to still have easy and reliable access to the raw data. Something we could download and back up would be incredibly sweet.

However, this data needs to be private, as well, as it typically contains phone numbers, irl mailing addresses, corporate contacts, etc. That is, it should be visible only to those with commit access to the project, or perhaps some arbitrary set of github users.

Not seeing the "Sign now" link

I created this project,
Added the CONTRIBUTING file, and subscribed it to clahub.com

However, Pull requests are going through without requiring anyone to sign.

Am I doing something wrong here?

Suggest some option(s) for agreement text

(Ticket was originally for harmonyagreements.org - I think the CLA/CAA space is more varied and subtle and deserves broader treatment.)

One challenge maintainers have is choosing CLA text. Even understanding the options and the possible clauses involved is nontrivial, and we can help.

There are a variety of agreement texts we can draw from:

We should help clarify the issues afoot like compatible licensing, copyright assignment, employer rules, etc.

Ideally we help maintainers choose the agreement text to best fit their motivation and situation.

Somewhat related, I like how https://www.iubenda.com provides a simple "non-legalese" breakdown of their generated privacy policies.

Widen CLA Scope

Hi all, cool project, thanks for keeping it going!

I need to have a CLA for the scope of a whole organization, not just individual repos. When new repos are added, they should be covered by the existing CLA, not require a new CLA to be signed.

IANAL, but the way things are articulated, it would be easy for a layperson to be convinced that the CLAs here reflect against individual repos, and a new repo that was created without it being included in CLAHub could be confused for a CLA not being required for that repo.

Ask for maintainer's email address

I've wanted to individually contact early users regarding issues or questions. Sometimes people don't list their email on their GitHub profile, so we're not able to fetch it via the API.

Allow deleting CLAs

I seem to have no option to delete the CLA myself.

I’d like to get rid of the CLA for nanoc/nanoc.ws.

Error when trying to sign the CLA

Hi,

I'm trying CLAHub in my GH organization. I created the CLA and tried to sign it but got the following message:

We're sorry, but something went wrong.

Some notes:

  • No problem when signing the CLAHub's CLA a few seconds ago :-)
  • I have 1 pull-request pending in the repository linked with the CLA I've just created

Thanks!

Regards,
Thibault

Clahub not adding pull request footer

Hi,
I've signed the agreement for ajaxplorer/ajaxplorer-core before sending my first pull request (pydio/pydio-core#240) (maybe even before forking the project) and nothing appear in all my pull request (see also my 2nd PR pydio/pydio-core#242 and @cdujeu comment pydio/pydio-core#240 (comment)).
Email of the commiter (me) is the same as the email of the github account.
For each PR i've created a new branch on my fork, push my commit to it, and i've made a PR to ajaxplorer/ajaxplorer-core master.
Maybe related to #47 ? I don't remember having error message as in #48.
If I try to re-sign the CLA, it says "You have signed this CLA".
ClaHub is still in "Authorized applications".

Notifications

The creator of a CLA should be able to be notified via email when a new user signs the CLA.

CLAHub checking for contributor agreements on parent repo

I have a repo, crnixon/hmda-tools, which is forked from CFPB/hmda-tools. I tried to use CLAHub to add a contributor agreement to crnixon/hmda-tools, but the checks are now showing up on CFPB/hmda-tools.

I can find no way to remove the CLAHub service from a repo. Could you please remove it from my repo?

Should not report success for commits with email addresses that have not been verified in GitHub

See commit 803ecd0 on sumbach/clahub-test#1. I've added this email address ([email protected]) to my account but have NOT yet verified my ownership of this address.

I don't think such email addresses should be considered for purposes of verifying they have signed the CLA--it lets any GitHub user claim any email address not yet associated with another GitHub account.

I'm not sure if this is accessible via the GitHub APIs you're using (if not, I'd be happy to escalate this request to the GitHub team).

Manually revoke CLA signature

(extracted idea from #10)

Contributor or project maintainer should be able to manually revoke CLA signature at any time.

Commits on open pull requests should be updated to reflect failure for any commits from the revoked user.

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.