GithubHelp home page GithubHelp logo

cla-assistant / cla-assistant Goto Github PK

View Code? Open in Web Editor NEW
1.3K 23.0 252.0 11.06 MB

Contributor License Agreement assistant (CLA assistant)

Home Page: https://cla-assistant.io

License: Apache License 2.0

JavaScript 86.38% HTML 10.48% Dockerfile 0.05% SCSS 3.09% EJS 0.01%
cla contributor-license-agreement github github-integration angular nodejs

cla-assistant's Introduction

CLA assistant Coverage Status CII Best Practices CI/CDPipeline REUSE status

Contributor License Agreement (CLA) assistant

Streamline your workflow and let CLA assistant handle the legal side of contributions to a repository for you. CLA assistant enables contributors to sign CLAs from within a pull request.

To get started, simply store your CLA as a GitHub Gist file then link it with the repository/organization in CLA assistant. Then sit back and relax while CLA assistant:

  • Comments on each opened pull request to ask the contributor to sign the CLA
  • Allows contributors to sign a CLA from within a pull request
  • Authenticates the signee with their GitHub account
  • Updates the status of a pull request when the contributor agrees to the CLA
  • Automatically asks users to re-sign the CLA for each new pull request in the event the associated Gist & CLA has changed

Repository owners can review a list of users who signed the CLA for each version of it. To get started, visit cla-assistant.io.

We also developed a lite version of CLA Assistant using GitHub Actions which is in Alpha. You can checkout it out here.

Try

CLA assistant is provided by SAP as a free hosted offering under cla-assistant.io. Please open a GitHub issue if you have feedback.

Request more information from the CLA signer

If you need to collect detailed information about your contributors you can add so called "custom fields" to your CLA. This can be done by providing CLA assistant with some metadata that describes the data you are going to collect. CLA assistant will generate a form based on this metadata and contributors will be requested to fill out the form before they sign your CLA.

Following steps need to be done:

  • Go to the Gist with your CLA and add a new file with name "metadata" (like this)
  • describe custom fields in JSON format (according to the JSON Schema)
{
    "name": {
        "title": "Full Name",
        "type": "string",
        "githubKey": "name"
    },
    "email": {
        "title": "E-Mail",
        "type": "string",
        "githubKey": "email",
        "required": true
    },
    "age": {
        "title": "Age",
        "description": "Age in years",
        "type": "number",
        "minimum": 18,
        "maximum": 99
    },
    "agreement": {
        "title": "I have read and agree to the CLA",
        "type": "boolean",
        "required": true
    },
    "category": {
        "title": "How do you sign?",
        "type": {
            "enum": [
                "I am signing on behalf of myself.",
                "I am signing on behalf of my employer."
            ]
        },
        "required": true
    }
}

You can also define which of required information can be taken from user's GitHub account. In that case CLA assistant prefills the form with GitHub data. The possible values for the "githubKey"-property can be found in the GitHub-API description.

FAQ

Where is the list of signees stored?

Since 27.08.2021 all data is stored in a Cosmos DB (MongoDB compatible) hosted on Microsoft Azure in Europe (#740). Before that all the data was stored in a MongoDB hosted by mLab.

Where can I see the list of signees? Is there a way to import/export the signee data?

You can see the list of signees on the user interface. There is also a possibility for you to export the list as a .csv file.

What should my Contributor License Agreement say?

We're no lawyers, but we can suggest using https://contributoragreements.org/ for a fill-in-the-blank approach to creating a CLA tailored to your needs.

Who can I contact for help?

In case of problems or any further questions, please check our general trouble shooting issue or open an issue. We always appreciate helpful tips and support for the project.

How can I contribute?

You want to contribute to CLA Assistant? Welcome! Please read here.

Can I allow bot user contributions?

Since there's no way for bot users (such as Dependabot or Greenkeeper) to sign a CLA, you may want to allow their contributions without it. You can do so by importing their names (in this case dependabot[bot] and greenkeeper[bot]) in the CLA assistant dashboard.

Setup your own instance of CLA assistant

Clone this repository, change into the cloned directory and install dependencies.

git clone https://github.com/cla-assistant/cla-assistant
cd ./cla-assistant
npm install

Please check the package.json for the supported and tested versions of node and npm.

Register an OAuth application on GitHub. The callback URL needs to be of the form of <PROTOCOL>://<HOST>:<PORT>/auth/github/callback.

Note: You can use ngrok to get a publicly accessible URL which redirects to your localhost:5000 by executing the following command:

ngrok http 5000

If you use ngrok, you need to update the HOST variable in your .env file and set PROTOCOL to "https".

Copy the sample configuration file .env.example file to .env.

cp .env.example .env

You require a MongoDB or compatible database as a backend such as:

Note: For development purposes you can run MongoDB in a docker container easily:

docker run --detach --publish 27017:27017 mongo

With that you need to adjust the MONGODB environment variable in the .env file to mongodb://localhost:27017/cla_assistant.

Setup GitHub App

  • Register an GitHub App and add repository permissions for Pull Requests.
  • Copy the App Name, App ID, Client ID and Client Secret into the .env.
  • Generate a new private key, download it and add the contents to the .env file (GITHUB_APP_PRIVATE_KEY)

Note: If your private key isn't recognized properly, you can try to fill the contents from a file:

export GITHUB_APP_PRIVATE_KEY="$(cat key.pem)"

Supported environment variables

The following are the environment variables you have to configure to run a private instance:

Name Description
GITHUB_CLIENT The client ID for authenticating with the GitHub API.
GITHUB_SECRET The secret key for authenticating with the GitHub API.
GITHUB_TOKEN The access token for making authenticated requests to the GitHub API.
GITHUB_APP_NAME The name of the registered GitHub App.
GITHUB_APP_PRIVATE_KEY The contents of the private key for the registered GitHub App.
GITHUB_APP_ID The ID of the registered GitHub App.
GITHUB_APP_CLIENT The client ID of the registered GitHub App.
GITHUB_APP_SECRET The client secret of the registered GitHub App.
MONGODB The URI for the MongoDB database (e. g. mongodb://<user>:<password>@<host>:<port>/<dbname>).

These are optional environment variables:

Name Description Default
GITHUB_PROTOCOL The protocol to use for GitHub API requests. https
GITHUB_HOST The hostname of the GitHub server. github.com
GITHUB_API_HOST The API hostname of the GitHub server. api.github.com
GITHUB_VERSION The version of the GitHub API to use. 3.0.0
GITHUB_GRAPHQL The URL for accessing the GitHub GraphQL API. https://api.github.com/graphql
GITHUB_ADMIN_USERS (comma-separated) If set, will only allow the specified GitHub users to administer this instance of the app.
GITHUB_DELAY The delay in milliseconds to enforce on webhooks. 5000
TIME_TO_WAIT The time to wait between API calls to avoid rate limits (in milliseconds). 1000
PORT The local port to bind to. 5000
PROTOCOL The protocol to use for the CLA assistant (http or https). http
HOST The hostname of the CLA assistant (without the protocol). cla-assistant.io
HOST_PORT The port for the CLA assistant if it doesn't use standard HTTP ports.
SESSION_SECRET The secret key for session encryption. cla-assistant
SMTP_HOST The hostname of the SMTP server.
SMTP_SSL Whether to use SSL/TLS for SMTP connections. false
SMTP_PORT The port number for the SMTP server. 465
SMTP_USER The username for SMTP authentication.
SMTP_PASS The password for SMTP authentication.
SLACK_URL The URL for sending log notifications to Slack.
SLACK_CHANNEL The name of the Slack channel to send log notifications to.
LOGIN_PAGE_TEMPLATE The path to the login page HTML template.
REQUIRED_SIGNEES
ORG_OVERRIDE_ENABLED
REQUEST_TRACE_HEADER_NAME Use the value of an HTTP-header to set the name. E.g. the request id set by an ingress controller via X-Req-Id. If not set or no HTTP-header is present a random uuid is used.
LOG_TRACE_FIELD_NAME The log field name where the request trace ID is stored. req_id
LOG_TRACE_PREFIX A prefix added to the request trace ID.

Hint: For further reading on setting up MongoDB, check the "Getting Started" and db.createUser() method.

Run grunt in order to build the application.

npx grund build

During development, just run the grunt default task to build the app, start linter checks and run unit tests on each change of relevant .js files.

npx grunt

Finally, source the environment file and start the application.

source .env
npm run start

Quick start with Docker Compose

To get a CLA assistant instance quickly up you can as well use Docker compose:

git clone https://github.com/cla-assistant/cla-assistant
cd ./cla-assistant

cp .env.example .env
# Update GITHUB_CLIENT, GITHUB_SECRET and GITHUB_TOKEN with your values in .env
docker-compose up

Now you can navigate to http://localhost:5000 and access your installation. To locally test webhooks you needs to expose it via e.g. ngrok as outlined above.

Run the CLA assistant instance with Docker

To run the CLA assistant instance with docker:

docker build -t cla-assistant .
docker run -d -p 5000:5000 \
    -e HOST=.. \
    -e PORT=... \
    cla-assistant

For the list of supported environments see supported environment variables.

License

Contributor License Agreement assistant

Copyright (c) 2022 SAP SE or an SAP affiliate company. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Credits

cla-assistant's People

Contributors

aleksi avatar andrei-panov avatar casche avatar darmiel avatar datenreisender avatar dennisoelkers avatar dependabot[bot] avatar dfarr avatar ibakshay avatar jeffwecan avatar jguipi avatar jnkielmann avatar jsoref avatar kborchers avatar ketan avatar kharitonoff avatar laughinghan avatar matkoch avatar matz3 avatar michael-spengler avatar michaeltsenglz avatar michaeltsengzl avatar mickaelandrieu avatar mikemcquaid avatar peterdavehello avatar rael312 avatar shegox avatar thojansen avatar tim-mc avatar yaseminc 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cla-assistant's Issues

main-page - settings

  • Settings - Pop up-> change to interaction that lives directly on the first page (expand the repo section and allow for entering the gist URL right there)

Once the Gist is connected you would also have a link to a detail page that directs the user to a detail page page

CLA discovery

Support search / query of the CLAs singed via the tool.

  • Which businesses have signed CLA with SAP?
  • Who are the individuals from each of those businesses contributing to SAP’s Open Source projects
  • Which projects have those individuals contributed to?

main page - add repo

Change to ‘Add repo’ interaction (same to ReviewNinja)
Don’t show all repos

Scroll down the CLA

Require users to scroll down to the end of the CLA before they can select “I agree”

Options: Choose a CLA in Gist

We have two options:

  • choose a CLA from the drop-down menu
  • paste a URL from Gist in a type-in box

drop-down menu:
View default choice. If not acceptable,

  • click on down-arrow to show choices
  • scroll through list if necessary
  • click on one option to select it.
    -grouping options by repo owners?

e.g: reviewninja

        reviewninja/welcome
        reviewninja/dcode
        reviewninja/foo

like here:

screen shot 2015-04-30 at 10 52 37 am

One of the options could be blank.

What happens if I choose a stored CLA from drop-down menu?

  • the paste/type option is not selectable
  • Choose meta-option ("--") when I chose a a list item and decide to rather paste/type in a link?
    [- Default value (= SAP CLA) ?]
    [- what if there are too many options? --> start typing the name, auto-complete field (that can handle typos..)?]
  • have it as a text field with auto-complete and option to drop down and search from the menu?

type-in box:
If I type/paste in a URL in the type-in box:
->Type in a response or leave the box blank.

  • what happens to a preselected list item in the drop-down menu?
    __which one has priority? can we combine the choosing options?

prompt text in italic gray and real text in normal dark primary color

spelling mistakes on github.io page

This is the text from the main claassistant.github.io page
"Got to Gist.GitHub.com, save a CLA text file there.
Choose the creted file or copy and paste the URL in CLA assistant. "

First word I assume is "Goto". Then in the last sentence is should be "created" not "creted".

List of my signed CLAs

  • extra site for 'my signed CLAs': Where?
  • Link on Landingpage
  • Link in footer of CLA assistant to view own contributions with signed CLAs

mention all committers who have not signed CLA yet

If there are multiple committers in pull request all of them should sign the CLA. It is not transparent yet who has already signed the CLA and who not.
The possible solution could be: write names of all committers into comment who has not signed the CLA and update it after each signature.

set pull request status to green if all committers have signed the CLA

Current state is: CLA assistant checks committers of a new PR and if there are no committers who hasn't signed the CLA yet it doesn't do anything on the PR (it creates nor a comment neither a status of the PR saying that everything is ok).

Should be: CLA assistant should set PR status to green also initially if there are no committers who hasn't signed the CLA. Otherwise it isn't clear whether CLA assistant is not working or all committers have signed the CLA.

still need app.min.js

good point, but it doesn't work without app.min.js now because of feature directive. You can paste feature.html template instead of lines 84-87 or re-add app.min.js and I'll fix that point later.

commit file reference pull request
cc00398 src/client/login.html#L24 #50 #50

changes landingpage

  • Sign In Button landingpage to white
  • Feature icons 2x2
  • Font-size of discriptions in 'FEATURE' icon hovers to 18px
  • Text for slides
  • implement info & icons for 'HOW IT WORKS'
  • Delete screenshots
  • Footer: terms of Service & Privacy policy
  • Footer: Do not link to 'Apache License'
  • Footer: Delete 'Email Us'
  • Bottom on page: another sign in button
  • FEATURES: delete toolstips over icons
  • FEATURES: 'Signing ...' font-color: dark
  • 🎉

corporate CLAs

Support the notion of Corporate and Individual CLAs. Ensure that a Corporate CLA is in place before presenting individual CLAs for signing. Periodically (or on a per project basis!) validate the affiliation of the individuals with their employers.

Possible mismatch of comment on pull request with its status

Comments from CLA assistant show only the current state of CLA for the PR (whether user has signed or not the current version of CLA). So the comment can change it's description from "signed" to "not signed yet" later after the PR was merged if the content of CLA changes. That would lead to a mismatch of the PR status (green) and the comment (yellow).

Pull Request Integration

  • on the PR: more explanation next to the label
  • wording on status API: shorten… the language (Rachel can help with suggestions)

Create marketing page

As a first time user I have no idea what CLA assistant does for me.

Have a marketing type page available that explains the high level features.

What is CLAHub? Purpose, Why should the end user care?

Change Sign in label from sign in as admin to: 'Sign in with GitHub'

Sign-process

As a user signing the CLA - redirect to repo (no thank you page)

Error Boxes

highlight error fields (=text boxes)

  • outline orange # ff803f
  • box filling: #ffe5c9
  • add orange text description beneath text box
    screen shot 2015-05-12 at 11 12 58 am

Error message if:

  1. repository is already linked with a CLA Gist file:
    "Whoops! This repository is already linked. Try to choose another one :)"
  2. User clicks on "Link them" w/o having chosen a repo and/or URL:
    "Please enter a repository and a valid Gist URL" [ Gist URL is underlined and linked to Gist]
    or: "Please choose a repository"
    or: "Please enter a valid Gist URL"
  3. Gist URL is not correct:
    "Oops, looks like this link isn't correct. The Gist URL should look like this: https://gist.github.com/..."

Text for Slides

either quotes "what people said about CLA assistant" (but who? 😛 )

-or-

short, catchy statements about the tool

main page - add gist

Explain the gist functionality / What is the implication, where do I create a gist, talk a little about the 'lifecycle'(what if I change a gist)
Include screenshots,..

sign cla once per version

Detect pre-existing CLA with a contributor and not require signing of CLA for every project. So a signed CLA is valid for all repositories connected to that CLA (version).

System is down

Hi colleagues,
the system seems to be down, therefore I cannot sign the CLA

View bug when site is loading

Hey :)

The site is showing the {{ }} tags for a sort period of time because Angular.js is not loaded immediately. With a fast internet connection, I think it is not a big issue. But on mobile and/or with slow internet connections, it may look a bit ugly :)

I think ng-cloak should fix it.

Cheers :)

detail-page

Show a list with all users who signed the CLA for this repo … userID, date and other relevant attributes

"Sign in" broken on cla-assistant.io

Hey, first off, thanks for the service — that's exactly what I need!

However, here's what happens when you click "Sign in":
sign-in

I have removed the "?admin=true", and signed in, but was greeted with a blank page:
empty

Could you please fix it? Thanks in advance!

Logo

No need for a logo per se... but add some 'style' to the fonts. CLA in bold and assistant in regular weight.

Thin text a bit difficult to see on lower resolutions

The thin text that is placed on the background image is a bit difficult to see when using a monitor with a low DPI. Not a problem for retina displays.. just old cheap monitors :)

I would suggest adjusting the font-weight to bit slightly bigger.

screen shot 2015-05-11 at 9 33 02 am

How do I use this?

I have been watching this repo for a while now, hoping for a public announcement.

It's not clear to me whether you plan to roll this out as a service. Or is it supposed to be a Bring-Your-Own-Server project?

If it's the latter, a few words on how to run and configure this would be appreciated.

Thanks!

Names

a few more name proposals:
cla sign
CLA signer

wording

We're happy to get some help with the wording:

  • Pop Up "Contributors who signed a CLA" --> List of contributors?

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.