Skip to content

Commit 9e64882

Browse files
chore: switch to has-signed-canonical-cla GH action (#6109)
https://discourse.ubuntu.com/t/new-canonical-cla-process/55853
1 parent ff9c8e9 commit 9e64882

File tree

8 files changed

+5
-673
lines changed

8 files changed

+5
-673
lines changed

.github/workflows/cla.yml

Lines changed: 3 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,8 @@ name: CLA Check
33
on: [pull_request]
44

55
jobs:
6-
cla-validate:
7-
6+
cla-check:
87
runs-on: ubuntu-latest
98
steps:
10-
- uses: actions/checkout@v1
11-
- name: Check CLA signing status for ${{ github.event.pull_request.user.login }}
12-
run: |
13-
cat > unsigned-cla.txt <<EOF
14-
Hello ${{ github.event.pull_request.user.login }},
15-
16-
Thank you for your contribution to cloud-init.
17-
18-
In order for us to merge this pull request, you need
19-
to have signed the Contributor License Agreement (CLA).
20-
Please sign the CLA by following our
21-
contribution guide at:
22-
https://docs.cloud-init.io/en/latest/development/first_PR.html
23-
24-
Thanks,
25-
Your friendly cloud-init upstream
26-
EOF
27-
28-
has_signed() {
29-
username="$1"
30-
grep -q ": \"$username\"" ./tools/.lp-to-git-user && return 0
31-
grep -q "^$username$" ./tools/.github-cla-signers && return 0
32-
return 1
33-
}
34-
35-
if has_signed "${{ github.event.pull_request.user.login }}"; then
36-
echo "Thanks ${{ github.event.pull_request.user.login }} for signing cloud-init's CLA"
37-
else
38-
cat unsigned-cla.txt
39-
exit 1
40-
fi
41-
42-
check-cla-signers:
43-
name: Verify that ./tools/.github-cla-signers is in alphabetical order
44-
runs-on: ubuntu-24.04
45-
steps:
46-
- uses: actions/checkout@v4
47-
48-
- name: Check CLA signers file
49-
run: tools/check-cla-signers
9+
- name: Check if CLA signed
10+
uses: canonical/has-signed-canonical-cla@v2

doc/rtd/development/contribute_docs.rst

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,6 @@ write any content.
5252
In your first PR
5353
=================
5454

55-
You will need to add your GitHub username (alphabetically) to the in-repository
56-
list that we use to track :ref:`CLA signatures <contributing-prerequisites>`:
57-
`tools/.github-cla-signers`_.
58-
59-
Please include this in the same PR alongside your first contribution. Do
60-
not create a separate PR to add your name to the CLA signatures.
61-
6255
If you need some help with your contribution, you can contact us on our
6356
`IRC channel <IRC_>`_. If you have already submitted a work-in-progress PR, you
6457
can also ask for guidance from our technical author by `tagging s-makin`_ as a

doc/rtd/development/first_PR.rst

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,14 @@ Sign the CLA
1414
============
1515

1616
To contribute to cloud-init, you must first sign the Canonical
17-
`contributor license agreement <CLA_>`_ (CLA).
18-
19-
If you have already signed it as an individual, your Launchpad username will be
20-
listed in the `contributor-agreement-canonical`_ group. Unfortunately there is
21-
no easy way to check if the organisation or company you are working for has
22-
signed it.
23-
24-
When you sign:
25-
26-
* ensure that you fill in the GitHub username field,
27-
* when prompted for a 'Project contact' or 'Canonical Project Manager', enter
28-
'James Falcon'.
29-
30-
If your company has signed the CLA for you, please contact us to help in
31-
verifying which Launchpad/GitHub accounts are associated with the company.
17+
`contributor license agreement <CLA_>`_ (CLA). A check is run against
18+
every pull request to ensure that the CLA has been signed.
3219

3320
For any questions or help with the process, email
3421
`James Falcon <mailto:[email protected]>`_ with the subject:
3522
"Cloud-init CLA". You can also contact user ``falcojr`` in the #cloud-init
3623
channel on the `Libera IRC network <IRC_>`_.
3724

38-
Add your name to the CLA signers list
39-
=====================================
40-
41-
As part of your first PR to cloud-init, you should also add your GitHub
42-
username (alphabetically) to the in-repository list that we use to track CLA
43-
signatures: `tools/.github-cla-signers`_.
44-
45-
`PR #344`_ and `PR #345`_ are good examples of what this should look like in
46-
your pull request, though please do not use a separate PR for this step.
47-
4825
Create a sandbox environment
4926
============================
5027

@@ -75,7 +52,5 @@ cloud-init :ref:`Code Review Process<code_review_process>`, so you can
7552
understand how your changes will end up in cloud-init's codebase.
7653

7754
.. include:: ../links.txt
78-
.. _tools/.github-cla-signers: https://github.com/canonical/cloud-init/blob/main/tools/.github-cla-signers
79-
.. _contributor-agreement-canonical: https://launchpad.net/%7Econtributor-agreement-canonical/+members
8055
.. _PR #344: https://github.com/canonical/cloud-init/pull/344
8156
.. _PR #345: https://github.com/canonical/cloud-init/pull/345

doc/rtd/development/index.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ Pull request checklist
5757

5858
Before any pull request can be accepted, remember to do the following:
5959

60-
* Make sure your GitHub username is added (alphabetically) to the in-repository
61-
list that we use to track CLA signatures: `tools/.github-cla-signers`_.
6260
* Add or update any :ref:`unit tests<testing>` accordingly.
6361
* Add or update any :ref:`integration_tests` (if applicable).
6462
* Format code (using ``black`` and ``isort``) with ``tox -e do_format``.

tools/.github-cla-signers

Lines changed: 0 additions & 234 deletions
This file was deleted.

tools/.lp-to-git-user

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)