Skip to content

Commit

Permalink
dev(feat): Add Markdown syntax checks (#174)
Browse files Browse the repository at this point in the history
This includes:
- VS Code extension recommendation
- Pre-commit check
- Fixed syntax for all `.md` files
  • Loading branch information
armenzg authored Mar 26, 2021
1 parent 548c42d commit 1ae82ff
Show file tree
Hide file tree
Showing 30 changed files with 350 additions and 50 deletions.
3 changes: 3 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"line-length": false
}
153 changes: 153 additions & 0 deletions .pnp.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"recommendations": [
"arcanis.vscode-zipfs",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
"esbenp.prettier-vscode",
"davidanson.vscode-markdownlint"
]
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ members of the project's leadership.
## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>

[homepage]: https://www.contributor-covenant.org
[email]: mailto:[email protected]

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
<https://www.contributor-covenant.org/faq>
46 changes: 25 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# sentry-ci-tooling

This repo allows us to provide automation across developer tools used in [sentry](https://github.com/getsentry/sentry) and [getsentry](https://github.com/getsentry/sentry) development, as well as collecting and aggregating tooling metrics (e.g. GitHub, Freight).
This repo allows us to provide automation across developer tools used in [sentry](https://github.com/getsentry/sentry) and [getsentry](https://github.com/getsentry/sentry) development, as well as collecting and aggregating tooling metrics (e.g. GitHub, Freight).
There is also Slack integration to provide tools through Slack.

## Development

Read the README in the `src/` directory for more information

```sh
Expand All @@ -22,7 +23,7 @@ yarn test

## Setup

Install the github application to relevant repos here: https://github.com/organizations/getsentry/settings/apps/sentry-internal-tools/installations (you will need to contact IT for access to this app). This app is used for GitHub API access to the repos it is installed on.
Install the github application to relevant repos here: <https://github.com/organizations/getsentry/settings/apps/sentry-internal-tools/installations> (you will need to contact IT for access to this app). This app is used for GitHub API access to the repos it is installed on.

### Setup Secrets

Expand All @@ -31,38 +32,41 @@ You can grab GitHub and Slack secrets in their respective configuration pages: [

You will also need to set up some of these environment variables if you want to test this locally, e.g. using `direnv` or something similar

* `GH_APP_IDENTIFIER` - GitHub App identifier
* `GH_APP_SECRET_KEY` - GitHub App private key
* `GH_WEBHOOK_SECRET` - GitHub webhook secret to confirm that webhooks come from GitHub
* `SENTRY_WEBPACK_WEBHOOK_SECRET` - Webhook secret that needs to match secret from CI. Records webpack asset sizes.
* `SLACK_SIGNING_SECRET` - Slack webhook secret to verify payload
* `SLACK_BOT_USER_ACCESS_TOKEN` - The Slack Bot User OAuth Access Token from the `Oauth & Permissions` section of your Slack app
- `GH_APP_IDENTIFIER` - GitHub App identifier
- `GH_APP_SECRET_KEY` - GitHub App private key
- `GH_WEBHOOK_SECRET` - GitHub webhook secret to confirm that webhooks come from GitHub
- `SENTRY_WEBPACK_WEBHOOK_SECRET` - Webhook secret that needs to match secret from CI. Records webpack asset sizes.
- `SLACK_SIGNING_SECRET` - Slack webhook secret to verify payload
- `SLACK_BOT_USER_ACCESS_TOKEN` - The Slack Bot User OAuth Access Token from the `Oauth & Permissions` section of your Slack app

Optional database configuration

* `DB_USER` - Database user
* `DB_PASSWORD` - Database password
* `DB_NAME` - Database name
* `DB_INSTANCE_CONNECTION_NAME` - Used for CloudSQL
- `DB_USER` - Database user
- `DB_PASSWORD` - Database password
- `DB_NAME` - Database name
- `DB_INSTANCE_CONNECTION_NAME` - Used for CloudSQL

These envronment vars are used for deploying to GCP
* `GOOGLE_SERVICE_ACCOUNT_EMAIL` - Google service account email
* `GOOGLE_APPLICATION_CREDENTIALS` - Google service account private key

- `GOOGLE_SERVICE_ACCOUNT_EMAIL` - Google service account email
- `GOOGLE_APPLICATION_CREDENTIALS` - Google service account private key

And finally, for Sentry releases
* `SENTRY_AUTH_TOKEN` - Auth token used to create releases
* `SENTRY_ORG` - the Sentry organization
* `SENTRY_PROJECT` - the Sentry project id

- `SENTRY_AUTH_TOKEN` - Auth token used to create releases
- `SENTRY_ORG` - the Sentry organization
- `SENTRY_PROJECT` - the Sentry project id

### Google Cloud Platform

You'll need to setup a GCP project that has access to Google Cloud Run. You should create a service account that has the following roles:
* `Cloud Run Admin`
* `Service Account User`
* `Cloud SQL Client`

You'll also need to create a private key for the service account (it should download a JSON file). You'll want to run `base64 <path/to/json>` and set it as the `GOOGLE_APPLICATION_CREDENTIALS` secret in GitHub.
- `Cloud Run Admin`
- `Service Account User`
- `Cloud SQL Client`

You'll also need to create a private key for the service account (it should download a JSON file). You'll want to run `base64 <path/to/json>` and set it as the `GOOGLE_APPLICATION_CREDENTIALS` secret in GitHub.

### Deploying

All pushes to `main` will deploy to the existing GCP project.
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"fastify": "^2.15.1",
"fastify-formbody": "^3.1.0",
"knex": "^0.21.17",
"markdownlint-cli": "^0.27.1",
"module-alias": "^2.2.2",
"pg": "^8.5.1",
"typescript": "^4.1.3"
Expand Down Expand Up @@ -90,6 +91,9 @@
"*.ts": [
"eslint --cache --fix",
"yarn test --findRelatedTests"
],
"*.md": [
"markdownlint"
]
}
}
Loading

0 comments on commit 1ae82ff

Please sign in to comment.