You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-10Lines changed: 16 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,8 @@ Why this is useful
7
7
- Helps projects maintain reproducible credit and citation information
8
8
9
9
What this repository provides
10
-
- A Python script at `.github/scripts/check_contributors.py` that performs the check
11
-
- A GitHub Actions workflow at `.github/workflows/metadata-check.yml` that runs the script on PR events
12
-
- A sample configuration `.github/contrib-metadata-check.yml` to control behavior
10
+
- A Python script at `check_contributors.py` that performs the check
11
+
- A GitHub Actions bot at `action.yml` that runs the script on PR events
13
12
14
13
How it works
15
14
- The action runs on PR events. It runs `git log --use-mailmap --format='%aN <%aE>' BASE..HEAD` to collect commit authors, so ensure `.mailmap` is present if you need to unify multiple emails.
@@ -21,17 +20,24 @@ How it works
21
20
22
21
1. Ensure your repository has `CITATION.cff` and/or `codemeta.json` with author/contributor entries.
23
22
2. Add a `.mailmap` at the repository root if you need to unify alternate emails or names from the git history.
24
-
3. Add this action (or copy the workflow) into your repo; the included workflow triggers on pull requests.
23
+
3. Add this action (or copy the workflow) into your repo in `.github/workflows/contrib-check.yml`; the included workflow triggers on pull requests.
25
24
26
25
27
-
### Example `contrib-metadata-check.yml`
26
+
### Example `.github/workflows/contrib-check.yml`
28
27
29
28
```yaml
30
-
mode: warn # "warn" (default) or "fail"
31
-
ignore_emails:
32
-
- dependabot[bot]@users.noreply.github.com
33
-
ignore_logins:
34
-
- dependabot[bot]
29
+
jobs:
30
+
contrib-check:
31
+
runs-on: ubuntu-latest
32
+
33
+
steps:
34
+
- name: Contrib metadata check
35
+
uses: vuillaut/contrib-checker@main
36
+
with:
37
+
github_token: ${{ secrets.GITHUB_TOKEN }}
38
+
mode: warn # or 'fail' to make the workflow fail when contributors are missing
Copy file name to clipboardExpand all lines: action.yml
+13-1Lines changed: 13 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,14 @@ inputs:
7
7
description: "Behavior mode: 'warn' (default) or 'fail'. 'warn' posts a comment but doesn't fail the CI, while 'fail' posts a comment and fails the CI if contributors are missing."
8
8
required: false
9
9
default: warn
10
+
ignore_emails:
11
+
description: "Comma-separated list of email addresses to ignore when checking contributors (e.g., '[email protected],[email protected]')"
12
+
required: false
13
+
default: ""
14
+
ignore_logins:
15
+
description: "Comma-separated list of login names to ignore when checking contributors (e.g., 'dependabot[bot],ci-bot')"
0 commit comments