Skip to content

Commit e8aa2bd

Browse files
committed
doc: automated a record of all-time contributors
We want to produce a simple acknowledgement report, nothing too fancy. Also: refactored CONTRIBUTING guidelines to refer to DCO terms. File CONTRIBUTORS.md is updated once a week (or manually triggered). This posts a pull request, which not auto-merged yet (there a few github action hurdles to overcome to achieve that). Signed-off-by: Frederic BIDON <[email protected]>
1 parent 61efbb7 commit e8aa2bd

File tree

5 files changed

+150
-43
lines changed

5 files changed

+150
-43
lines changed

.github/CONTRIBUTING.md

Lines changed: 17 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,20 @@ These guidelines are general to all libraries published on github by the `go-ope
1313

1414
You'll find more detailed (or repo-specific) instructions in the [maintainer's docs](../docs).
1515

16-
## Questions & Issues
16+
## How can I contribute?
17+
18+
There are many ways in which you can contribute. Here are a few ideas:
19+
20+
* Reporting Issues / Bugs
21+
* Suggesting Improvements
22+
* Code
23+
* bug fixes and new features that are within the main project scope
24+
* improving test coverage
25+
* addressing code quality issues
26+
* Documentation
27+
* Art work that makes the project look great
28+
29+
## Questions & issues
1730

1831
### Asking questions
1932

@@ -189,49 +202,10 @@ pass it on as an open-source patch.
189202
We require the simple DCO below with an email signing your commit.
190203
PGP-signed commit are greatly appreciated but not required.
191204

192-
The rules are pretty simple: if you can certify the below (from
193-
[developercertificate.org](http://developercertificate.org/)):
194-
195-
```
196-
Developer Certificate of Origin
197-
Version 1.1
198-
199-
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
200-
660 York Street, Suite 102,
201-
San Francisco, CA 94110 USA
202-
203-
Everyone is permitted to copy and distribute verbatim copies of this
204-
license document, but changing it is not allowed.
205-
206-
207-
Developer's Certificate of Origin 1.1
208-
209-
By making a contribution to this project, I certify that:
210-
211-
(a) The contribution was created in whole or in part by me and I
212-
have the right to submit it under the open source license
213-
indicated in the file; or
214-
215-
(b) The contribution is based upon previous work that, to the best
216-
of my knowledge, is covered under an appropriate open source
217-
license and I have the right under that license to submit that
218-
work with modifications, whether created in whole or in part
219-
by me, under the same open source license (unless I am
220-
permitted to submit under a different license), as indicated
221-
in the file; or
222-
223-
(c) The contribution was provided directly to me by some other
224-
person who certified (a), (b) or (c) and I have not modified
225-
it.
226-
227-
(d) I understand and agree that this project and the contribution
228-
are public and that a record of the contribution (including all
229-
personal information I submit with it, including my sign-off) is
230-
maintained indefinitely and may be redistributed consistent with
231-
this project or the open source license(s) involved.
232-
```
205+
The rules are pretty simple:
233206

234-
then you just add a line to every git commit message:
207+
* read our [DCO](./DCO.md) (from [developercertificate.org](http://developercertificate.org/))
208+
* if you agree with these terms, then you just add a line to every git commit message
235209

236210
Signed-off-by: Joe Smith <[email protected]>
237211

.github/DCO.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Developer's Certificate of Origin
2+
3+
```
4+
Developer Certificate of Origin
5+
Version 1.1
6+
7+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
8+
660 York Street, Suite 102,
9+
San Francisco, CA 94110 USA
10+
11+
Everyone is permitted to copy and distribute verbatim copies of this
12+
license document, but changing it is not allowed.
13+
14+
15+
Developer's Certificate of Origin 1.1
16+
17+
By making a contribution to this project, I certify that:
18+
19+
(a) The contribution was created in whole or in part by me and I
20+
have the right to submit it under the open source license
21+
indicated in the file; or
22+
23+
(b) The contribution is based upon previous work that, to the best
24+
of my knowledge, is covered under an appropriate open source
25+
license and I have the right under that license to submit that
26+
work with modifications, whether created in whole or in part
27+
by me, under the same open source license (unless I am
28+
permitted to submit under a different license), as indicated
29+
in the file; or
30+
31+
(c) The contribution was provided directly to me by some other
32+
person who certified (a), (b) or (c) and I have not modified
33+
it.
34+
35+
(d) I understand and agree that this project and the contribution
36+
are public and that a record of the contribution (including all
37+
personal information I submit with it, including my sign-off) is
38+
maintained indefinitely and may be redistributed consistent with
39+
this project or the open source license(s) involved.
40+
```

.github/workflows/auto-merge.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,24 @@ jobs:
5151
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
5252
run: gh pr merge --auto --rebase "$PR_URL"
5353

54+
# Auto merge is current disabled: we need automatic PRs to swap identity (e.g. using a Github App),
55+
# so the pull_request event is properly captured and the PR can validate.
56+
#actions-bot:
57+
# permissions:
58+
# contents: write
59+
# pull-requests: write
60+
# runs-on: ubuntu-latest
61+
# if: ${{ github.event.pull_request.user.login == 'github-actions[bot]' }}
62+
# steps:
63+
# -
64+
# name: Auto-approve all github-actions bot PRs
65+
# env:
66+
# PR_URL: ${{github.event.pull_request.html_url}}
67+
# GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
68+
# run: gh pr review --approve "$PR_URL"
69+
# -
70+
# name: Auto-merge github-actions bot PRs
71+
# env:
72+
# PR_URL: ${{github.event.pull_request.html_url}}
73+
# GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
74+
# run: gh pr merge --auto --rebase "$PR_URL"

.github/workflows/contributors.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Contributors
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
schedule:
8+
- cron: '18 4 * * 6'
9+
10+
workflow_dispatch:
11+
12+
jobs:
13+
update-contributors:
14+
name: all-time contributors
15+
permissions:
16+
pull-requests: write
17+
contents: write
18+
runs-on: ubuntu-latest
19+
steps:
20+
-
21+
name: Checkout repository
22+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
23+
-
24+
name: Identify all-time contributors to this repository
25+
uses: github/contributors@8b7586939baa0af4e801dbd22c88adf6e0db8915 # v1.7.5
26+
env:
27+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
REPOSITORY: ${{ github.repository }}
29+
LINK_TO_PROFILE: 'True'
30+
-
31+
name: Rename contributor file
32+
run: |
33+
rm -rf contributors.json
34+
mv contributors.md CONTRIBUTORS.md
35+
-
36+
name: Create a PR
37+
id: create-pull-request
38+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
39+
with:
40+
commit-message: "doc: updated contributors file"
41+
branch: doc/contributors-bot
42+
delete-branch: true
43+
title: "doc: updated contributors file"
44+
token: ${{ secrets.GITHUB_TOKEN }}
45+
labels: "bot"
46+
assignees: fredbi
47+
reviewers: fredbi
48+
sign-commits: true

CONTRIBUTORS.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Contributors
2+
3+
- Repository: ['fredbi/jsonpointer']
4+
5+
| Total Contributors | Total Contributions |
6+
| --- | --- |
7+
| 12 | 94 |
8+
9+
| Username | All Time Contribution Count | All Commits |
10+
| --- | --- | --- |
11+
| @fredbi | 47 | https://github.com/fredbi/jsonpointer/commits?author=fredbi |
12+
| @casualjim | 33 | https://github.com/fredbi/jsonpointer/commits?author=casualjim |
13+
| @magodo | 3 | https://github.com/fredbi/jsonpointer/commits?author=magodo |
14+
| @youyuanwu | 3 | https://github.com/fredbi/jsonpointer/commits?author=youyuanwu |
15+
| @gaiaz-iusipov | 1 | https://github.com/fredbi/jsonpointer/commits?author=gaiaz-iusipov |
16+
| @gbjk | 1 | https://github.com/fredbi/jsonpointer/commits?author=gbjk |
17+
| @gordallott | 1 | https://github.com/fredbi/jsonpointer/commits?author=gordallott |
18+
| @ianlancetaylor | 1 | https://github.com/fredbi/jsonpointer/commits?author=ianlancetaylor |
19+
| @mfleader | 1 | https://github.com/fredbi/jsonpointer/commits?author=mfleader |
20+
| @Neo2308 | 1 | https://github.com/fredbi/jsonpointer/commits?author=Neo2308 |
21+
| @olivierlemasle | 1 | https://github.com/fredbi/jsonpointer/commits?author=olivierlemasle |
22+
| @testwill | 1 | https://github.com/fredbi/jsonpointer/commits?author=testwill |
23+
24+
_this file was generated by the [Contributors GitHub Action](https://github.com/github/contributors)_

0 commit comments

Comments
 (0)