1

Does anyone have a solution to the problem below?
Yes, I can reject at review time, but I'd rather have that taken care of prior to reviewing the PR.

Do we know if github will support yml for pull request forms soon? It does not appear to today. I'll likely create an issue for this, but that doesn't solve my problem today.

Problem: I need contributors to agree to the Contributor Agreement prior to creating the Pull Request, not afterwards.

Potential Solution: If my pull_request_template could use yml and have a required checkbox, I'd be golden.

- type: checkboxes
    id: ca-confirmation
    attributes:
      label: I have reviewed the [Contributor Agreement](../CONTRIBUTOR_AGREEMENT.md) and agree to be bound by the terms found there.
      options:
        - label: I confirm I have reviewed and agree to the Contributor Agreement.
          required: true

2 Answers 2

3

Solution on a tangent: maintain a list of people who agreed to your CLA. This could be done in a separate file which also pull request could be made for by adding their name. Automatically check for every pull request that the author of the PR is found in this file during your CI. Fail the builds with an appropriate error, if the author does not appear in this file. Only review those pr which don't fail, at least not this test.

2

Try the CLA Assistant webhook. https://cla-assistant.io/ is a free service which has you simply:

Save your CLA at gist.github.com. Give a title and the text. Point the hook at your repo. Do the link to give the webhook permission to do a check during PRs.

Now for every Pull Request (you can add exceptions for certain contributors if you want), it will check its database to see if this contributor email has signed the CLA.

If they have, things proceed as normal. You'll see a check passed with CLA accepted. If not, it will present the CLA and ask for their github login to confirm acceptance. It will send them back to the PR and note that the CLA is accepted.

It even watches for updates to the CLA. It knows if a new version exists, and your next PR will trigger you to see and accept it.

Just what I needed. It's working great for us.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.