Skip to content

Commit e03f7a0

Browse files
functionality complete
Signed-off-by: Sachin Panayil <[email protected]>
1 parent 345bc19 commit e03f7a0

16 files changed

+1198
-2
lines changed

.github/workflows/auto-changelog.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Changelog
2+
on:
3+
release:
4+
types:
5+
- created
6+
jobs:
7+
changelog:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: "Auto Generate changelog"
11+
uses: heinrichreimer/[email protected]
12+
with:
13+
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+

.github/workflows/checks.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: "run-linting-checks"
2+
on:
3+
push:
4+
branches:
5+
- 'main'
6+
7+
jobs:
8+
resolve-repolinter-json:
9+
uses: DSACMS/repo-scaffolder/.github/workflows/extendJSONFile.yml@main
10+
with:
11+
url_to_json: 'https://raw.githubusercontent.com/DSACMS/repo-scaffolder/main/tier2/%7B%7Bcookiecutter.project_slug%7D%7D/repolinter.json'
12+
13+
repolinter-checks:
14+
name: Tier 2 Checks
15+
needs: resolve-repolinter-json
16+
runs-on: ubuntu-latest
17+
env:
18+
19+
RAW_JSON: ${{ needs.resolve-repolinter-json.outputs.raw-json }}
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- run: echo $RAW_JSON > repolinter.json
24+
- uses: newrelic/repolinter-action@v1
25+
with:
26+
# A path to the JSON/YAML Repolinter ruleset to use, relative to the workflow
27+
# working directory (i.e. under `$GITHUB_WORKSPACE`).
28+
#
29+
# This option is mutually exclusive with config_url. If this option and
30+
# config_url are not specified, Repolinter's default ruleset will be used.
31+
config_file: 'repolinter.json'
32+
33+
# Where repolinter-action should put the linting results. There are two
34+
# options available:
35+
# * "exit-code": repolinter-action will print the lint output to the console
36+
# and set the exit code to result.passed. This output type is most useful for
37+
# PR status checks.
38+
# * "issue": repolinter-action will create a GitHub issue on the current
39+
# repository with the repolinter output and always exit 0. See the README for
40+
# more details on issue outputting behavior. This output type is ideal for
41+
# non-intrusive notification.
42+
#
43+
# Default: "exit-code"
44+
output_type: 'issue'
45+
46+
# The title to use for the issue created by repolinter-action. This title
47+
# should indicate the purpose of the issue, as well as that it was created by
48+
# a bot.
49+
#
50+
# This option will be ignored if output_type != "issue".
51+
#
52+
# Default: "[Repolinter] Open Source Policy Issues"
53+
output_name: '[Repolinter] Tier 2 Repository Hygiene Issue'
54+
55+
# The default token is the repolinter token for the DSACMS org
56+
# You can change it if needed.
57+
58+
token: ${{ secrets.REPOLINTER_AUTO_TOKEN }}
59+

.github/workflows/contributors.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
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/[email protected]
27+
env:
28+
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
31+
with:
32+
readme_path: MAINTAINERS.md
33+
use_username: false
34+
commit_message: "update contributors information"
35+
36+
- name: Get contributors count
37+
id: get_contributors
38+
env:
39+
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
42+
43+
run: |
44+
OWNER=$(echo $GITHUB_REPOSITORY | cut -d'/' -f1)
45+
REPO=$(echo $GITHUB_REPOSITORY | cut -d'/' -f2)
46+
QUERY='query { repository(owner: \"'"$OWNER"'\", name: \"'"$REPO"'\") { collaborators { totalCount } } }'
47+
48+
CONTRIBUTORS=$(gh api \
49+
-H "Accept: application/vnd.github+json" \
50+
-H "X-GitHub-Api-Version: 2022-11-28" \
51+
"/repos/$OWNER/$REPO/contributors?per_page=100" | \
52+
jq '[.[] | select(.type != "Bot" and (.login | test("\\[bot\\]$") | not) and (.login | test("-bot$") | not))] | length')
53+
54+
echo "Total contributors: $CONTRIBUTORS"
55+
echo "contributors=$CONTRIBUTORS" >> $GITHUB_OUTPUT
56+
57+
58+
- name: Update MAINTAINERS.md
59+
run: |
60+
61+
CONTRIBUTORS="${{ steps.get_contributors.outputs.contributors }}"
62+
63+
64+
perl -i -pe 's/(<!--CONTRIBUTOR COUNT START-->).*?(<!--CONTRIBUTOR COUNT END-->)/$1 '"$CONTRIBUTORS"' $2/' MAINTAINERS.md
65+
66+
git config user.name 'github-actions[bot]'
67+
git config user.email 'github-actions[bot]@users.noreply.github.com'
68+
git add MAINTAINERS.md
69+
git commit -m "update contributors count to $CONTRIBUTORS" || exit 0
70+
71+
- name: Push protected
72+
uses: CasperWA/push-protected@v2
73+
with:
74+
75+
token: ${{ secrets.PUSH_TO_PROTECTED_BRANCH }}
76+
77+
78+
branch: main

.github/workflows/gitleaks.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Check for Secrets
2+
on:
3+
pull_request:
4+
push:
5+
6+
jobs:
7+
scan-for-secrets:
8+
name: Run gitleaks
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
- uses: gitleaks/gitleaks-action@v2
15+
env:
16+
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#pycache
2+
__pycache__/
3+
*.pyc
4+

CODEOWNERS.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Code Owners
2+
<!-- TODO: Who are the points of contact in your project who are responsible/accountable for the project? This can often be an engineering or design manager or leader, who may or may not be the primary maintainers of the project. List them by GitHub Username-->
3+
4+
- sachin-panayil
5+
6+
7+
## Repo Domains
8+
9+
<!--
10+
The Repo Domains section of your CODEOWNERS.md file helps manage code review responsibilities efficiently. Each domain represents a different aspect of the repository, such as documentation, frontend, backend, DevOps, testing, etc. In this section, list each domain and assign the appropriate GitHub usernames or teams responsible for that domain. This ensures that pull requests (PRs) are reviewed by the right experts, maintaining high code quality and relevance.
11+
12+
For example:
13+
14+
/docs/ @doc-team @johnsmith @janedoe
15+
16+
/frontend/ @frontend-team @alice @bob
17+
18+
/backend/ @backend-team @charlie @dana
19+
20+
Furthermore, GitHub teams are a good feature for managing groups of contributors who need to be notified about specific domains within a repository. By creating and using GitHub teams, you can allow contributors to ping multiple relevant experts simultaneously.
21+
22+
To set up GitHub teams:
23+
24+
- Navigate to your organization's settings and select "Teams".
25+
- Create a new team for each domain, such as @frontend-team, @backend-team, or @doc-team.
26+
- Add the relevant members to each team. Ensure that the team includes all the individuals who should be notified about PRs in their domain.
27+
- When filling out the Repo Domains section in your CODEOWNERS.md file, use the team handles instead of or alongside individual usernames. This way, when a contributor opens a PR affecting a specific domain, they can simply tag the team, and every member of that team will be notified.
28+
29+
-->
30+
31+
/docs/ {Git usernames of documentation owners}
32+
/frontend/ {Git usernames of frontend owners}

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 [email protected].
12+
13+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://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.

COMMUNITY_GUIDELINES.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# codejson-index-generator Open Source Community Guidelines
2+
3+
This document contains principles and guidelines for participating in the codejson-index-generator open source community.
4+
5+
## Principles
6+
7+
These principles guide our data, product, and process decisions, architecture, and approach.
8+
9+
- Open means transparent and participatory.
10+
- We take a modular and modern approach to software development.
11+
- We build open-source software and open-source process.
12+
- We value ease of implementation.
13+
- Fostering community includes building capacity and making our software and processes accessible to participants with diverse backgrounds and skillsets.
14+
- Data (and data science) is as important as software and process. We build open data sets where possible.
15+
- We strive for transparency for algorithms and places we might be introducing bias.
16+
17+
## Community Guidelines
18+
19+
All community members are expected to adhere to our [Code of Conduct](CODE_OF_CONDUCT.md).
20+
21+
Information on contributing to this repository is available in our [Contributing file](CONTRIBUTING.md).
22+
23+
When participating in codejson-index-generator open source community conversations and spaces, we ask individuals to follow the following guidelines:
24+
25+
- When joining a conversation for the first time, please introduce yourself by providing a brief intro that includes:
26+
- your related organization (if applicable)
27+
- your pronouns
28+
- your superpower, and how you hope to use it for codejson-index-generator
29+
- Embrace a culture of learning, and educate each other. We are all entering this conversation from different starting points and with different backgrounds. There are no dumb questions.
30+
- Take space and give space. We strive to create an equitable environment in which all are welcome and able to participate. We hope individuals feel comfortable voicing their opinions and providing contributions and will do our best to recognize and make space for individuals who may be struggling to find space here. Likewise, we expect individuals to recognize when they are taking up significant space and take a step back to allow room for others.
31+
<!-- TODO: Add if your repo has a community chat - Be present when joining synchronous conversations such as our community chat. Why be here if you're not going to _be here_? -->
32+
- Be respectful.
33+
- Default to positive. Assume others' contributions are legitimate and valuable and that they are made with good intention.
34+
35+
## Acknowledgements
36+
37+
This COMMUNITY_GUIDELINES.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)