Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Add support for custom commit messages#33

Merged
ibakshay merged 7 commits intocontributor-assistant:masterfrom
AnandChowdhary:patch-1
Aug 6, 2020
Merged

Add support for custom commit messages#33
ibakshay merged 7 commits intocontributor-assistant:masterfrom
AnandChowdhary:patch-1

Conversation

@AnandChowdhary
Copy link
Copy Markdown
Contributor

This PR fixes #32 by adding these options:

  • signed-commit-message is the commit message when a new contributor signs the CLA in a PR
  • signed-empty-commit-message is the commit message when a new contributor signs the CLA (empty)
  • create-file-commit-message is the commit message when a new file is created

Usage example:

jobs:
  CLAssistant:
    runs-on: ubuntu-latest
    steps:
      - name: "CLA Assistant"
        if: (github.event.comment.body == 'recheckcla' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request'
        uses: cla-assistant/github-action@v1.4.2-alpha
        env: 
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with: 
          path-to-signatures: 'signatures/version1/cla.json'
          signed-commit-message: 'chore(cla): $contributorName has signed the CLA in #$pullRequestNo'
          create-file-commit-message: 'chore(cla): Creating file for storing CLA Signatures'

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Aug 5, 2020

CLA assistant check
All committers have signed the CLA.

@AnandChowdhary
Copy link
Copy Markdown
Contributor Author

Now that I think about it, it would also be nice if we add support for a intro message by changing this line: https://github.com/cla-assistant/github-action/blob/master/src/pullRequestComment.ts#L34.

@ibakshay
Copy link
Copy Markdown
Member

ibakshay commented Aug 5, 2020

Hi @AnandChowdhary, Thank you very much for your contribution. I really appreciate it ..

Now that I think about it, it would also be nice if we add support for an intro message by changing this line:

Yep sure, even I thought about it. Please go ahead and feel free to do it 😄 . Then we can also support dynamic pull request comments.

The only thing you need to ensure is that I have read the CLA Document and I hereby sign the CLA content shouldn't be changed as we are recognizing this content as a signature. I'd like to keep this content as static.

@AnandChowdhary
Copy link
Copy Markdown
Contributor Author

Please go ahead and feel free to do it

On it!

The only thing you need to ensure is that I have read the CLA Document and I hereby sign the CLA content shouldn't be changed as we are recognizing this content as a signature. I'd like to keep this content as static.

Yep, agreed, let's keep this static.

@AnandChowdhary
Copy link
Copy Markdown
Contributor Author

AnandChowdhary commented Aug 5, 2020

Two new options have been added:

  • all-signed-comment-message is the message when everyone has signed, defaults to **CLA Assistant Lite** All Contributors have signed the CLA. (edited)
  • request-comment-message is the message when a user is requested to sign the CLA, defaults to **CLA Assistant Lite:** <br/>Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that $you sign our [Contributor License Agreement]($pathToCLADocument) before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.

@ibakshay ibakshay self-requested a review August 6, 2020 05:17
Copy link
Copy Markdown
Member

@ibakshay ibakshay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AnandChowdhary awesome!. Could you also please include the inputs signed-commit-message and others which you added into the action.yml file? :) Then, I will merge your contribution 💯 ..

@AnandChowdhary AnandChowdhary requested a review from ibakshay August 6, 2020 07:30
Copy link
Copy Markdown
Member

@ibakshay ibakshay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for your contribution :) We really appreciate it..

@ibakshay ibakshay merged commit f0296af into contributor-assistant:master Aug 6, 2020
@AnandChowdhary AnandChowdhary deleted the patch-1 branch August 6, 2020 13:12
@AnandChowdhary
Copy link
Copy Markdown
Contributor Author

Forgot to add docs here, can you please add the new options to README?

@ibakshay
Copy link
Copy Markdown
Member

ibakshay commented Aug 6, 2020

Sure, no worries. I will do it :).

@AnandChowdhary
Copy link
Copy Markdown
Contributor Author

This works great!

Screen Shot 2020-08-07 at 12 03 56@2x

For people using Gitmoji, this is our configuration:

signed-commit-message: ":wrench: @$contributorName has signed the CLA in #$pullRequestNo"
signed-empty-commit-message: ":wrench: @$contributorName has signed the CLA"
create-file-commit-message: ":wrench: Creating a file for storing CLA signatures"
all-signed-comment-message: "✍️ All contributors have signed the CLA"
request-comment-message: "Thanks for your submission! We ask that $you sign our [Contributor License Agreement]($pathToCLADocument) before we can accept your contribution. You can sign the CLA by adding a comment below using this text:"

@ibakshay
Copy link
Copy Markdown
Member

ibakshay commented Aug 7, 2020

Awesomee!!.. I also tested yesterday. It works great 💯 ...
I am just curious. How did you get custom avatar for kojbot? Is it a GitHub App or GitHub Action?
Because for GitHub Action, as for as I know, we cannot have a custom avatar in place.

@AnandChowdhary
Copy link
Copy Markdown
Contributor Author

No, it's a GitHub account with a personal access token being used instead of the default GITHUB_TOKEN: https://github.com/KojBot

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Commit message config

3 participants