Skip to content

Commit 9b93635

Browse files
authored
chore: introduce Contributors file (#26587)
This GitHub Action updates a CONTRIBUTORS file with the top contributors from the project, pulling contents from the GitHub API. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 6d1dc5b commit 9b93635

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

.github/workflows/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,8 @@ Owner: Core CDK team
9898

9999
[repo-metrics.yml](repo-metrics.yml): GitHub action that runs monthly to report on metrics for issues and PRs created last month.
100100
Owner: Core CDK team
101+
102+
### Contributors File
103+
104+
[update-contributors.yml](update-contributors.yml): GitHub action that runs monthly to create a pull request for updating a CONTRIBUTORS file with the top contributors.
105+
Owner: Core CDK team
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
name: Update CONTRIBUTORS file
3+
on:
4+
schedule:
5+
- cron: "0 0 1 * *"
6+
workflow_dispatch:
7+
jobs:
8+
main:
9+
# this workflow will always fail in forks; bail if this isn't running in the upstream
10+
if: github.repository == 'aws/aws-cdk'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: minicli/[email protected]
15+
name: "Update a projects CONTRIBUTORS file"
16+
env:
17+
CONTRIB_REPOSITORY: 'aws/aws-cdk'
18+
CONTRIB_OUTPUT_FILE: 'CONTRIBUTORS.md'
19+
- name: Create a PR
20+
uses: peter-evans/create-pull-request@v5
21+
with:
22+
# Git commit details
23+
branch: automation/update-contributors
24+
author: aws-cdk-automation <[email protected]>
25+
commit-message: chore: update Contributors File
26+
# Pull Request details
27+
title: 'chore: update Contributors File'
28+
labels: auto-approve
29+
# Github prevents further Github actions to be run if the default Github token is used.
30+
# Instead use a privileged token here, so further GH actions can be triggered on this PR.
31+
token: ${{ secrets.PROJEN_GITHUB_TOKEN }}

0 commit comments

Comments
 (0)