Skip to content

Commit 0a59eb9

Browse files
jimmyfagansachin-panayilgithub-actions[bot]
authored
DSAC OSPO: Tier 3 Outbounding (#1360) (#1362)
* Tier 3 Outbounding: First Pass * small edits to contributing * update contributors information * pr requested changes * Update COMMUNITY.md * Update code.json * Update code.json --------- Signed-off-by: Sachin Panayil <sachinpanayil01@gmail.com> Co-authored-by: Sachin Panayil <79382140+sachin-panayil@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 255143f commit 0a59eb9

File tree

9 files changed

+1419
-64
lines changed

9 files changed

+1419
-64
lines changed

.github/workflows/contributors.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Update Contributors Information
2+
3+
on:
4+
workflow_dispatch: {}
5+
schedule:
6+
# Weekly on Saturdays.
7+
- cron: '30 1 * * 6'
8+
push:
9+
branches: [main]
10+
11+
jobs:
12+
update-contributors:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Update contributor list
25+
id: contrib_list
26+
uses: akhilmhdh/contributors-readme-action@v2.3.10
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
with:
30+
readme_path: COMMUNITY.md
31+
use_username: false
32+
commit_message: 'update contributors information'
33+
34+
- name: Get contributors count
35+
id: get_contributors
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
39+
run: |
40+
OWNER=$(echo $GITHUB_REPOSITORY | cut -d'/' -f1)
41+
REPO=$(echo $GITHUB_REPOSITORY | cut -d'/' -f2)
42+
QUERY='query { repository(owner: \"'"$OWNER"'\", name: \"'"$REPO"'\") { collaborators { totalCount } } }'
43+
44+
CONTRIBUTORS=$(gh api \
45+
-H "Accept: application/vnd.github+json" \
46+
-H "X-GitHub-Api-Version: 2022-11-28" \
47+
"/repos/$OWNER/$REPO/contributors?per_page=100" | \
48+
jq '[.[] | select(.type != "Bot" and (.login | test("\\[bot\\]$") | not) and (.login | test("-bot$") | not))] | length')
49+
50+
echo "Total contributors: $CONTRIBUTORS"
51+
echo "contributors=$CONTRIBUTORS" >> $GITHUB_OUTPUT
52+
53+
- name: Update COMMUNITY.md
54+
run: |
55+
CONTRIBUTORS="${{ steps.get_contributors.outputs.contributors }}"
56+
57+
perl -i -pe 's/(<!--CONTRIBUTOR COUNT START-->).*?(<!--CONTRIBUTOR COUNT END-->)/$1 '"$CONTRIBUTORS"' $2/' COMMUNITY.md
58+
59+
git config user.name 'github-actions[bot]'
60+
git config user.email 'github-actions[bot]@users.noreply.github.com'
61+
git add COMMUNITY.md
62+
git commit -m "update contributors count to $CONTRIBUTORS" || exit 0
63+
64+
- name: Push protected
65+
uses: CasperWA/push-protected@v2
66+
with:
67+
token: ${{ secrets.GITHUB_TOKEN }}
68+
69+
branch: main
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Update Code.json
2+
on:
3+
schedule:
4+
- cron: 0 0 1 * * # First day of every month
5+
workflow_dispatch:
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
issues: write
11+
12+
jobs:
13+
update-code-json:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout Repository
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Update code.json
22+
uses: DSACMS/automated-codejson-generator@v1.0.1
23+
with:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
BRANCH: "main"

CODE_OF_CONDUCT.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Contributor Code of Conduct
2+
3+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4+
5+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of the level of experience, gender, gender identity, expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
6+
7+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8+
9+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct.
10+
11+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers at opensource@cms.hhs.gov.
12+
13+
This Code of Conduct is adapted from the [Contributor Covenant](https://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](https://contributor-covenant.org/version/1/0/0/)
14+
15+
## Acknowledgements
16+
17+
This CODE_OF_CONDUCT.md was originally forked from the [United States Digital Service](https://usds.gov) [Justice40](https://thejustice40.com) open source [repository](https://github.com/usds/justice40-tool), and we would like to acknowledge and thank the community for their contributions.

0 commit comments

Comments
 (0)