Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Microsoft CLA"

on:
issue_comment:
types: [created]
Comment thread
mayankfz marked this conversation as resolved.
pull_request_target:
types: [opened, closed, synchronize]

permissions:
Comment thread
jiria marked this conversation as resolved.
contents: write # Required to store CLA signatures
pull-requests: write # Required to comment on PRs
statuses: write # Required to set CLA status check

jobs:
cla:
runs-on: ubuntu-latest
steps:
- name: "Microsoft CLA Assistant"
if: |
(github.event_name == 'issue_comment' && github.event.issue.pull_request &&
(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'
Comment thread
mayankfz marked this conversation as resolved.
uses: contributor-assistant/github-action@ca4a40a7d1004f18d9960b404b97e5f30a505a08 # v2.6.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we need to limit when does this action gets executed?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The action is already gated:

For issue_comment: only triggers on PR comments with exact "recheck" or CLA sign text
For pull_request_target: runs on all PRs, but the allowlist auto-passes bots and the CLA portal auto-passes linked Microsoft accounts. Are we looking for something more specific ?

with:
path-to-signatures: "signatures/version1/cla.json"
path-to-document: "https://cla.opensource.microsoft.com/microsoft/azure-container-linux"
branch: "aclmain"
allowlist: "bot*,*[bot],microsoft-github-operations-bot,dependabot*,msftbot,azure-pipelines-bot"
lock-pullrequest-aftermerge: true