github.heygears.com/openimsdk/tools@v0.0.49/.github/workflows/cla.yml (about)

     1  # Copyright © 2023 OpenIM open source community. All rights reserved.
     2  #
     3  # Licensed under the Apache License, Version 2.0 (the "License");
     4  # you may not use this file except in compliance with the License.
     5  # You may obtain a copy of the License at
     6  #
     7  #     http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  # Unless required by applicable law or agreed to in writing, software
    10  # distributed under the License is distributed on an "AS IS" BASIS,
    11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  # See the License for the specific language governing permissions and
    13  # limitations under the License.
    14  
    15  name: OpenIM CLA Assistant
    16  on:
    17    issue_comment:
    18      types: [created]
    19    pull_request_target:
    20      types: [opened,closed,synchronize]
    21  
    22  # explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings
    23  permissions:
    24    actions: write
    25    contents: write
    26    pull-requests: write
    27    statuses: write
    28  
    29  env:
    30    # Define Open-IM-Server variables here
    31    OPEN_IM_SERVER_REMOTE_ORGANIZATION: openim-sigs
    32    REMOTE_REPOSITORY: cla
    33    OPEN_IM_SERVER_CLA_DOCUMENT: https://github.com/openim-sigs/cla/blob/main/README.md
    34    OPEN_IM_SERVER_SIGNATURES_PATH: signatures/${{ github.event.repository.name }}/cla.json
    35  
    36    OPEN_IM_SERVER_ALLOWLIST: kubbot,openimbot,bot*,dependabot,sweep-ai,*bot,bot-*,bot/*,bot-/*,bot,*[bot]
    37  
    38  jobs:
    39    CLAAssistant:
    40      runs-on: ubuntu-latest
    41      steps:
    42        - name: "CLA Assistant"
    43          if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
    44          uses: contributor-assistant/github-action@v2.3.1
    45          env:
    46            GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
    47            PERSONAL_ACCESS_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }}
    48          with:
    49            path-to-signatures: ${{ env.OPEN_IM_SERVER_SIGNATURES_PATH }}
    50            path-to-document: ${{ env.OPEN_IM_SERVER_CLA_DOCUMENT }}
    51            branch: 'main'
    52            allowlist: ${{ env.OPEN_IM_SERVER_ALLOWLIST }}
    53  
    54            remote-organization-name: ${{ env.OPEN_IM_SERVER_REMOTE_ORGANIZATION }}
    55            remote-repository-name: ${{ env.REMOTE_REPOSITORY }}
    56  
    57            create-file-commit-message: '📚 Docs: Creating file for storing ${{ github.event.repository.name }} CLA Signatures'
    58            custom-notsigned-prcomment: '💕 Thank you for your contribution and please kindly read and sign our [🎯https://github.com/openim-sigs/cla/blob/main/README.md](https://github.com/openim-sigs/cla/blob/main/README.md). <br> If you wish to sign the CRA, **Please copy and comment on the following sentence:**'
    59            custom-pr-sign-comment: 'I have read the CLA Document and I hereby sign the CLA'
    60            custom-allsigned-prcomment: '🤖 All Contributors have signed the [${{ github.event.repository.name }} CLA](https://github.com/openim-sigs/cla/blob/main/README.md).<br> The signed information is recorded [🤖here](https://github.com/openim-sigs/cla/tree/main/signatures/${{ github.event.repository.name }}/cla.json)'
    61          #   lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true)
    62          #   use-dco-flag: true - If you are using DCO instead of CLA