Skip to content

Commit d21e2a2

Browse files
v1.3.0 (#120)
* adding release automation * updating docs * added linting and fixed errors * Add new PR body for archival mode Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov> * Changed to archived tag to be lowercase Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov> * refactoring using dependency injection * adding tests for helper and main --------- Signed-off-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov> Co-authored-by: Natalia Luzuriaga <natalia.luzuriaga@cms.hhs.gov>
1 parent 4607763 commit d21e2a2

20 files changed

+1572
-559
lines changed

.github/CODEOWNERS.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Code Owners
2+
3+
<!-- 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-->
4+
5+
[@sachin-panayil](https://github.com/sachin-panayil)
6+
[@natalialuzuriaga](https://github.com/natalialuzuriaga)
7+
8+
## Repository Domains
9+
10+
/src/types - [@natalialuzuriaga](https://github.com/natalialuzuriaga)

.github/workflows/lint.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
- dev
9+
10+
jobs:
11+
eslint:
12+
name: ESLint
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repo
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
cache: npm
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Run ESLint
29+
run: npm run lint
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Require release label for main PRs
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
- labeled
10+
- unlabeled
11+
branches:
12+
- main
13+
14+
permissions:
15+
pull-requests: read
16+
17+
jobs:
18+
require-release-label:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Check for release label
23+
uses: actions/github-script@v7
24+
with:
25+
script: |
26+
const labels = context.payload.pull_request.labels.map(l => l.name);
27+
28+
const allowed = [
29+
'release:patch',
30+
'release:minor',
31+
'release:major',
32+
'release:none'
33+
];
34+
35+
const found = labels.filter(l => allowed.includes(l));
36+
37+
if (found.length === 0) {
38+
core.setFailed(
39+
"Missing release label. Add one of: " +
40+
"release:patch | release:minor | release:major | release:none"
41+
);
42+
}
43+
44+
if (found.length > 1) {
45+
core.setFailed(
46+
"Multiple release labels found. Exactly one is required."
47+
);
48+
}
49+
50+
console.log(`Release label OK: ${found[0]}`);

.github/workflows/release.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Release a New Verison
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
branches:
7+
- main
8+
9+
permissions:
10+
contents: write
11+
pull-requests: read
12+
13+
jobs:
14+
release:
15+
if: github.event.pull_request.merged == true
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Get release label
25+
id: label
26+
run: |
27+
labels='${{ toJson(github.event.pull_request.labels) }}'
28+
29+
if echo "$labels" | grep -q 'release:major'; then
30+
echo "bump=major" >> $GITHUB_OUTPUT
31+
elif echo "$labels" | grep -q 'release:minor'; then
32+
echo "bump=minor" >> $GITHUB_OUTPUT
33+
elif echo "$labels" | grep -q 'release:patch'; then
34+
echo "bump=patch" >> $GITHUB_OUTPUT
35+
elif echo "$labels" | grep -q 'release:none'; then
36+
echo "bump=none" >> $GITHUB_OUTPUT
37+
else
38+
echo "No release label found. Add one of:"
39+
echo "release:patch | release:minor | release:major | release:none"
40+
exit 1
41+
fi
42+
43+
- name: Exit if no release needed
44+
if: steps.label.outputs.bump == 'none'
45+
run: |
46+
echo "No release requested. Exiting."
47+
exit 0
48+
49+
- name: Get latest version tag
50+
id: version
51+
run: |
52+
latest=$(git tag --list 'v*' --sort=-v:refname | head -n 1)
53+
echo "latest=$latest" >> $GITHUB_OUTPUT
54+
55+
- name: Calculate next version
56+
id: next
57+
run: |
58+
version=${{ steps.version.outputs.latest }}
59+
bump=${{ steps.label.outputs.bump }}
60+
61+
version=${version#v}
62+
IFS='.' read -r major minor patch <<< "$version"
63+
64+
case "$bump" in
65+
major)
66+
major=$((major+1))
67+
minor=0
68+
patch=0
69+
;;
70+
minor)
71+
minor=$((minor+1))
72+
patch=0
73+
;;
74+
patch)
75+
patch=$((patch+1))
76+
;;
77+
esac
78+
79+
next="v$major.$minor.$patch"
80+
echo "next=$next" >> $GITHUB_OUTPUT
81+
82+
- name: Create version tag
83+
run: |
84+
git tag ${{ steps.next.outputs.next }}
85+
git push origin ${{ steps.next.outputs.next }}
86+
87+
- name: Update moving major tag (v1)
88+
run: |
89+
major=$(echo "${{ steps.next.outputs.next }}" | cut -d. -f1)
90+
git tag -f $major
91+
git push origin $major --force
92+
93+
- name: Create GitHub Release
94+
uses: softprops/action-gh-release@v1
95+
with:
96+
tag_name: ${{ steps.next.outputs.next }}
97+
name: Release ${{ steps.next.outputs.next }}
98+
generate_release_notes: true

CODEOWNERS.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

COMMUNITY.md

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# COMMUNITY.md
2+
3+
automated-codejson-generator is supported by a dedicated team of individuals fulfilling various roles to ensure its success, security, and alignment with government standards and agency goals.
4+
5+
## Project Members
6+
7+
<!-- 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.
8+
9+
Roles to include, but not limited to: Project Owner, Technical Lead, Developers/Contributors, Community Manager, Security Team, Policy Advisor, Contracting Officer's Representative, Compliance Officer, Procurement Officer -->
10+
11+
| Role | Name | Affiliation |
12+
| :---------------- | :------------------ | :---------- |
13+
| Open Source Lead | Remy DeCausemaker | DSAC |
14+
| Software Engineer | Sachin Panayil | DSAC |
15+
| Software Engineer | Natalia Luzuriaga | DSAC |
16+
| Software Engineer | Isaac Milarsky | DSAC |
17+
| Software Engineer | Dinne Kopelevich | DSAC |
18+
19+
See [CODEOWNERS.md](.github/CODEOWNERS.md) for a list of those responsible for the code and documentation in this repository.
20+
21+
See [Community Guidelines](COMMUNITY.md) on principles and guidelines for participating in this open source project.
22+
23+
## Roles & Responsibilities
24+
25+
The members of automated-codejson-generator community are responsible for guiding its development, ensuring quality standards, and fostering a collaborative environment. They play a vital role in making decisions about code contributions, handling releases, and ensuring the project meets its goals and objectives. Below is a list of the key members and their specific roles and responsibilities. We are eagerly seeking individuals who are interested in joining the community and helping shape and support these roles.
26+
27+
### Maintainers:
28+
29+
GitHub Action
30+
31+
- [@sachin-panayil](https://github.com/sachin-panayil)
32+
33+
Scripting
34+
35+
- [@sachin-panayil](https://github.com/sachin-panayil)
36+
37+
### Approvers:
38+
39+
- [@decause-gov](https://github.com/decause-gov)
40+
41+
### Reviewers:
42+
43+
- [@natalialuzuriaga](https://github.com/natalialuzuriaga)
44+
- [@IsaacMilarky](https://github.com/IsaacMilarky)
45+
- [@sachin-panayil](https://github.com/sachin-panayil)
46+
- [@DinneK](https://github.com/DinneK)
47+
48+
| Roles | Responsibilities | Requirements | Defined by |
49+
| ---------- | :--------------------------------------------- | :-------------------------------------------------------------------------------- | :-------------------------------------------------------- |
50+
| member | active contributor in the community | multiple contributions to the project. | PROJECT GitHub org Committer Team |
51+
| reviewer | review contributions from other members | history of review and authorship in a sub-project | COMMUNITY file reviewer entry, and GitHub Org Triage Team |
52+
| approver | approve accepting contributions | highly experienced and active reviewer + contributor to a sub-project | COMMUNITY file approver entry and GitHub Triage Team |
53+
| maintainer | set direction and priorities for a sub-project | demonstrated responsibility and excellent technical judgement for the sub-project | COMMUNITY file owner entry and GitHub Org Admin Team |
54+
55+
See [CONTRIBUTING.md](CONTRIBUTING.md) for more details on the release process.
56+
57+
## Contributors
58+
59+
<!-- TODO: A list of CONTRIBUTORS is generated below using contributors.yml located in the workflows directory. In order to automatically update the COMMUNITY.md, you must enter a secret into your Secrets and Variables under Actions within your repository settings. The name of the secret must be PUSH_TO_PROTECTED_BRANCH and the value must be a Personal Access Token with specific permissions. Please follow [this link](https://github.com/CasperWA/push-protected?tab=readme-ov-file#notes-on-token-and-user-permissions) for more information. -->
60+
61+
![](https://img.shields.io/github/contributors/DSACMS/automated-codejson-generator?style=flat-square&label=Contributor%20Count(incl.%20bots))
62+
63+
<!-- readme: contributors -start -->
64+
<table>
65+
<tbody>
66+
<tr>
67+
<td align="center">
68+
<a href="https://github.com/sachin-panayil">
69+
<img src="https://avatars.githubusercontent.com/u/79382140?v=4" width="100;" alt="sachin-panayil"/>
70+
<br />
71+
<sub><b>Sachin Panayil</b></sub>
72+
</a>
73+
</td>
74+
<td align="center">
75+
<a href="https://github.com/natalialuzuriaga">
76+
<img src="https://avatars.githubusercontent.com/u/29980737?v=4" width="100;" alt="natalialuzuriaga"/>
77+
<br />
78+
<sub><b>Natalia Luzuriaga</b></sub>
79+
</a>
80+
</td>
81+
<td align="center">
82+
<a href="https://github.com/IsaacMilarky">
83+
<img src="https://avatars.githubusercontent.com/u/24639268?v=4" width="100;" alt="IsaacMilarky"/>
84+
<br />
85+
<sub><b>Isaac Milarsky</b></sub>
86+
</a>
87+
</td>
88+
<td align="center">
89+
<a href="https://github.com/mjburling">
90+
<img src="https://avatars.githubusercontent.com/u/905175?v=4" width="100;" alt="mjburling"/>
91+
<br />
92+
<sub><b>Michael J Burling</b></sub>
93+
</a>
94+
</td>
95+
</tr>
96+
<tbody>
97+
</table>
98+
<!-- readme: contributors -end -->
99+
100+
<!--
101+
### Alumni
102+
103+
TODO: Who are the past maintainers or contributors who previously played significant roles in this project who are no longer actively involved? Consider including their roles and dates for context.
104+
105+
We'd like to acknowledge the following individuals for their past contributions of this project:
106+
-->
107+
108+
## automated-codejson-generator Open Source Community Guidelines
109+
110+
This document contains principles and guidelines for participating in the automated-codejson-generator open source community.
111+
112+
### Principles
113+
114+
These principles guide our data, product, and process decisions, architecture, and approach.
115+
116+
- Open means transparent and participatory.
117+
- We take a modular and modern approach to software development.
118+
- We build open-source software and open-source process.
119+
- We value ease of implementation.
120+
- Fostering community includes building capacity and making our software and processes accessible to participants with diverse backgrounds and skillsets.
121+
- Data (and data science) is as important as software and process. We build open data sets where possible.
122+
- We strive for transparency for algorithms and places we might be introducing bias.
123+
124+
### Community Guidelines
125+
126+
All community members are expected to adhere to our [Code of Conduct](CODE_OF_CONDUCT.md).
127+
128+
Information on contributing to this repository is available in our [Contributing file](CONTRIBUTING.md).
129+
130+
When participating in Code.json Auto Generator open source community conversations and spaces, we ask individuals to follow the following guidelines:
131+
132+
- When joining a conversation for the first time, please introduce yourself by providing a brief intro that includes:
133+
- your related organization (if applicable)
134+
- your pronouns
135+
- your superpower, and how you hope to use it for automated-codejson-generator
136+
- 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.
137+
- 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.
138+
<!-- 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_? -->
139+
- Be respectful.
140+
- Default to positive. Assume others' contributions are legitimate and valuable and that they are made with good intention.
141+
142+
### Acknowledgements
143+
144+
The Community Guidelines sections were 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: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)