Skip to content

Commit

Permalink
Merge branch 'main' into web-release-tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
benjagm authored Sep 3, 2024
2 parents 983faf5 + 176033f commit 06116ac
Show file tree
Hide file tree
Showing 36 changed files with 3,430 additions and 336 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:

- name: Get Changed Unauthorized files
id: changed-unauth-files
uses: tj-actions/changed-files@v44
uses: tj-actions/changed-files@v45
with:
files: |
.github/**
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale-issues-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
stale-pr-label: 'Status: Stale'

# Number of days of inactivity before an issue/PR is marked as stale.
days-before-stale: 30
days-before-stale: 180

# Number of days of inactivity before an issue/PR is closed.
days-before-close: 180
Expand Down
36 changes: 32 additions & 4 deletions .github/workflows/sync-contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,42 @@ jobs:
fs.writeFileSync('community.json', JSON.stringify(data, null, 2));
- name: Commit changes
env:
GITHUB_APP_TOKEN: ${{ steps.get_workflow_token.outputs.token }}
run: |
git config user.name "the-json-schema-bot[bot]"
git config user.email "the-json-schema-bot[bot]@users.noreply.github.com"
git add community.json
git diff --quiet && git diff --staged --quiet || (git commit -m "chore(community): update community.json" && git push "https://x-access-token:${GITHUB_APP_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" HEAD:${GITHUB_REF#refs/heads/})
git diff --quiet && git diff --staged --quiet || (git commit -m "chore(community): update community.json")
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ steps.get_workflow_token.outputs.token }}
title: 'chore(community): update community.json'
body: 'This PR updates the community.json file with the latest contributors data.'
branch: 'update-contributors'
base: 'main'
author: 'the-json-schema-bot <the-json-schema-bot[bot]@users.noreply.github.com>'
branch-suffix: timestamp
labels: 'sync-contributors'
assignees: 'the-json-schema-bot'
draft: false
signoff: true
add-paths: 'community.json'

# Approving with github bot token because one cannot approve their own PRs
- name: Auto Approve
if: steps.cpr.outputs.pull-request-operation == 'created'
run: gh pr review --approve "${{ steps.cpr.outputs.pull-request-number }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Auto Merge PR
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v3
with:
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: 'squash'
token: ${{ steps.get_workflow_token.outputs.token }}


36 changes: 33 additions & 3 deletions .github/workflows/sync-project-roadmap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,41 @@ jobs:
# commit updated project data
- name: Commit changes
env:
GITHUB_APP_TOKEN: ${{ steps.get_workflow_token.outputs.token }}
run: |
git config user.name "the-json-schema-bot[bot]"
git config user.email "the-json-schema-bot[bot]@users.noreply.github.com"
git add project_data.json
git diff --quiet && git diff --staged --quiet || (git commit -m "chore(project_data): update project_data.json" && git push "https://x-access-token:${GITHUB_APP_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" HEAD:${GITHUB_REF#refs/heads/})
git diff --quiet && git diff --staged --quiet || (git commit -m "chore(project_data): update project_data.json")
# create a pull request
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ steps.get_workflow_token.outputs.token }}
title: 'chore(project_data): update project_data.json'
body: 'This PR updates the project_data.json file with the latest project data.'
branch: 'update-project-data'
base: 'main'
author: 'the-json-schema-bot <the-json-schema-bot[bot]@users.noreply.github.com>'
branch-suffix: timestamp
labels: 'sync-project-data'
assignees: 'the-json-schema-bot'
draft: false
signoff: true
add-paths: 'project_data.json'

# Approving with github bot token because one cannot approve their own PRs
- name: Auto Approve
if: steps.cpr.outputs.pull-request-operation == 'created'
run: gh pr review --approve "${{ steps.cpr.outputs.pull-request-number }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Auto Merge PR
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v3
with:
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: 'squash'
token: ${{ steps.get_workflow_token.outputs.token }}
32 changes: 31 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ If you don't have time to contribute, that's fine. There are other easy ways to
- πŸ“‹ [Improving the Documentation](#-improving-the-documentation)
- 🌐 [Improving the website](#-improving-the-website)
- 🎨 [Improving the Design](#-improving-the-design)
- πŸš€ [Contributing to CI/CD Pipeline](#-contributing-to-cicd-pipeline)
- πŸ§ͺ [Contributing to Testing](#-contributing-to-testing)
- ⌨️ [Pull requests](#%EF%B8%8F-pull-requests)
- πŸ› [License](#-license)


## 🌱 Code of Conduct

Before making your first contribution, please ensure you are familiar with our [Code of Conduct](https://github.com/json-schema-org/.github/blob/main/CODE_OF_CONDUCT.md).
Expand Down Expand Up @@ -60,14 +63,41 @@ To publish a case study, we encourage you to join `#adopters` channel in our [Sl

If you would like to join the efforts to improve the JSON Schema Documentation, we encourage you to check our [documentation board](https://github.com/orgs/json-schema-org/projects/16) to get a sense of the pending issues and who is doing what. We encourage you to join the discussion on the [issue #421](https://github.com/json-schema-org/community/issues/421) so you can see the long term vision for our docs. We also invite you to join the discussion in `#documentation` channel in our [Slack workspace](https://json-schema.org/slack).

### πŸ“‹ Improving the Website
### 🌐 Improving the Website

If you would like to join the efforts to improve the JSON Schema Website, we encourage you to check our [website contribution board](https://github.com/orgs/json-schema-org/projects/11) to get a sense of the pending issues and bugs and who is doing what. We also invite you to join the discussion in `#website` channel in our [Slack workspace](https://json-schema.org/slack).

### 🎨 Improving the Design

If you would like to contribute with designs, we encourage you to join `#design` channel in our [Slack workspace](https://json-schema.org/slack) and read the [contributing guidelines](https://github.com/json-schema-org/brand/blob/master/CONTRIBUTING.md) in the [Brand](https://github.com/json-schema-org/brand) repository.

### πŸš€ Contributing to CI/CD Pipeline

If you would like to contribute to our CI/CD pipeline, we encourage you to review our current setup in the [workflows README](https://github.com/json-schema-org/website/blob/main/.github/workflows/README.md).

### πŸ§ͺ Contributing to Testing

We value contributions to our testing efforts. Here are ways you can help improve our test coverage and quality:

1. **Writing Tests**: If you're adding new features or fixing bugs, please include relevant tests. We use Cypress for both end-to-end (E2E) and component testing.

- For new components, add component tests in the `cypress/components` directory.
- For new features or bug fixes affecting user interactions, add E2E tests in the `cypress/e2e` directory.

2. **Improving Existing Tests**: Review and enhance our existing test suite. Look for areas where test coverage could be improved or where tests could be made more robust.

3. **Test Documentation**: Help improve our testing documentation, making it easier for new contributors to understand and write tests.

4. **Running Tests**: Before submitting a pull request, ensure all tests pass by running:
```
yarn cypress:run:all
```

5. **Reporting Test Issues**: If you find inconsistencies or problems with our tests, please open an issue describing the problem and how to reproduce it.

For more details on our testing setup and how to run tests, please refer to the Testing section in our [INSTALLATION.md](./INSTALLATION.md#testing) file.


### ⌨️ Pull requests

We welcome pull requests for editorial suggestions and resolving open issues.
Expand Down
Loading

0 comments on commit 06116ac

Please sign in to comment.