Skip to content

Commit 647cb04

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 ece6e8b commit 647cb04

File tree

3 files changed

+58
-8
lines changed

3 files changed

+58
-8
lines changed

.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: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
name: contributors
1+
name: Contributors
22

33
permissions:
44
contents: read
55

66
on:
7-
push:
8-
branches: [ "master" ]
7+
schedule:
8+
- cron: '18 4 * * 6'
9+
10+
workflow_dispatch:
911

1012
jobs:
1113
update-contributors:
1214
name: all-time contributors
1315
permissions:
16+
pull-requests: write
1417
contents: write
1518
runs-on: ubuntu-latest
1619
steps:
@@ -19,25 +22,27 @@ jobs:
1922
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2023
-
2124
name: Identify all-time contributors to this repository
22-
id: report-contributors
2325
uses: github/contributors@8b7586939baa0af4e801dbd22c88adf6e0db8915 # v1.7.5
2426
env:
2527
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2628
REPOSITORY: ${{ github.repository }}
27-
LINK_TO_PROFILE: "true"
29+
LINK_TO_PROFILE: 'True'
2830
-
2931
name: Rename contributor file
3032
run: |
31-
mv contributors.md EMERITUS.md
33+
rm -rf contributors.json
34+
mv contributors.md CONTRIBUTORS.md
3235
-
3336
name: Create a PR
37+
id: create-pull-request
3438
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
3539
with:
3640
commit-message: "doc: updated contributors file"
37-
branch: doc/contributors-bot-${{ github.run_id}}
41+
branch: doc/contributors-bot
3842
delete-branch: true
3943
title: "doc: updated contributors file"
4044
token: ${{ secrets.GITHUB_TOKEN }}
41-
label: "bot"
45+
labels: "bot"
4246
assignees: fredbi
4347
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)