Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refs/heads/master #12257

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
/* eslint import/no-nodejs-modules:0 */

module.exports = {
extends: ['sentry-docs', 'plugin:@next/next/recommended'],
extends: ['sentry-docs', 'plugin:@next/next/recommended', 'prettier'],
globals: {
jest: true,
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
rules: {
'import/no-nodejs-modules': 'off',
'prettier/prettier': 'error',
},
overrides: [
{
Expand Down
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
59 changes: 40 additions & 19 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,56 @@
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. -->

## DESCRIBE YOUR PR
*Tell us what you're changing and why. If your PR **resolves an issue**, please link it so it closes automatically.*

## IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.
## Description
*Provide a clear and concise description of what your pull request does. Include any relevant information, such as the problem it solves or the feature it adds.*

## Related Issues
*If your pull request addresses one or more issues, please list them here. Use the format `Fixes #<issue_number>` to link the pull request to the issue.*

## Type of Change
*Please select the type of change your pull request introduces:*
- [ ] Bug fix
- [ ] New feature
- [ ] Improvement
- [ ] Documentation update
- [ ] Other (please describe):

## Checklist
*Please ensure that your pull request meets the following requirements:*
- [ ] I have read the [contributing guidelines](CONTRIBUTING.md).
- [ ] I have followed the coding style guidelines of this project.
- [ ] I have performed a self-review of my own code.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] I have made corresponding changes to the documentation.
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] New and existing unit tests pass locally with my changes.
- [ ] Any dependent changes have been merged and published in downstream modules.

## Screenshots (if applicable)
*If your pull request includes visual changes, please provide screenshots to help reviewers understand the changes.*

## Additional Information
*If there is any additional information that would help the reviewers, please provide it here.*

## Urgency
*Help us prioritize incoming PRs by letting us know when the change needs to go live.*
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [ ] None: Not urgent, can wait up to 1 week+

## SLA
*Teamwork makes the dream work, so please add a reviewer to your PRs.*
*Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.*
*Thanks in advance for your help!*

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
Thanks in advance for your help!

## PRE-MERGE CHECKLIST

## Pre-Merge Checklist
*Make sure you've checked the following before merging your changes:*

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs)

## LEGAL BOILERPLATE

## Legal Boilerplate
<!-- Sentry employees and contractors can delete or ignore this section. -->
*Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.*

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

## EXTRA RESOURCES

## Extra Resources
- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,13 @@ updates:
open-pull-requests-limit: 10
reviewers:
- AbhiPrasad

- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
reviewers:
- "@getsentry/docs"
labels:
- "dependencies"
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,20 @@ repos:
entry: node_modules/.bin/prettier
- id: eslint
entry: node_modules/.bin/eslint
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.0.0
hooks:
- id: eslint
name: eslint
entry: eslint
language: node
types: [javascript, typescript]
files: \.(js|ts|jsx|tsx)$
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.3.2
hooks:
- id: prettier
name: prettier
entry: prettier
language: node
types: [javascript, typescript, json, css, scss, less, html, md, yaml, graphql]
48 changes: 48 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,51 @@ Call
```
npx prisma db seed
```

## Contribution Guidelines

We welcome contributions to improve the Sentry Documentation. To contribute, follow these guidelines:

1. Fork the repository and create a new branch for your changes.
2. Make your changes and ensure they are well-documented.
3. Submit a pull request with a clear description of your changes.

### Branching Strategy

We use the GitFlow branching strategy to manage the development process efficiently. Here is a brief overview of the strategy:

- **Main Branch**: The `main` branch contains the production-ready code.
- **Develop Branch**: The `develop` branch contains the latest development changes.
- **Feature Branches**: Feature branches are created from the `develop` branch and are used to develop new features. Once a feature is complete, it is merged back into the `develop` branch.
- **Release Branches**: Release branches are created from the `develop` branch when preparing for a new release. Once the release is ready, it is merged into both the `main` and `develop` branches.
- **Hotfix Branches**: Hotfix branches are created from the `main` branch to fix critical issues in the production code. Once the hotfix is complete, it is merged into both the `main` and `develop` branches.

### Code Style

To maintain a consistent coding style across the project, we use tools like Prettier and ESLint. Please ensure that your code adheres to the following guidelines:

- Run `yarn lint` to check for linting errors.
- Run `yarn lint:eslint:fix` to automatically fix ESLint issues.
- Run `yarn lint:prettier:fix` to automatically fix Prettier issues.

### Testing

To ensure the reliability of the code, we use unit tests and integration tests. Please add tests for any new features or changes you make. Run the following commands to execute the tests:

- `yarn test`: Runs all tests.
- `yarn test:ci`: Runs tests in CI mode.

### Documentation

Please update the documentation to reflect any changes you make. This includes updating the `README.md` file, as well as any relevant documentation files in the `docs` directory.

### Submitting a Pull Request

When submitting a pull request, please ensure that you:

- Provide a clear description of the changes you have made.
- Reference any related issues or pull requests.
- Add any necessary tests and documentation updates.
- Follow the branching strategy and code style guidelines.

Thank you for contributing to the Sentry Documentation!
105 changes: 105 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,108 @@ Take a look at our [Contributing to Docs](https://docs.sentry.io/contributing/)
Note: The documentation for this repository is self-hosted via `src/docs/contributing/`.

This is the Next.js version of our docs.

## Project Overview

Sentry Documentation is a comprehensive resource for developers to understand and utilize Sentry's error tracking and performance monitoring tools. The documentation covers various aspects of Sentry, including setup, configuration, and usage across different platforms and frameworks.

### Main Features

- Detailed guides and tutorials for integrating Sentry with various platforms and frameworks.
- Comprehensive API documentation.
- Best practices for error tracking and performance monitoring.
- Troubleshooting and debugging tips.

## Installation Instructions

To set up the project locally, follow these steps:

1. **Prerequisites**: Ensure you have the following installed:
- [Node.js](https://nodejs.org/) (version 14 or higher)
- [Yarn](https://yarnpkg.com/)
- [Docker](https://www.docker.com/) (for running the local database)

2. **Clone the repository**:
```bash
git clone https://github.com/getsentry/sentry-docs.git
cd sentry-docs
```

3. **Install dependencies**:
```bash
yarn install
```

4. **Set up environment variables**:
```bash
cp .env.example .env.development
```

5. **Start the local database**:
```bash
docker-compose up -d
```

6. **Run database migrations**:
```bash
yarn migrate:dev
```

7. **Start the development server**:
```bash
yarn dev
```

You can now access the documentation locally at `http://localhost:3000`.

## Usage Examples

Here are some examples to help you understand how to use the project:

### Example 1: Running the Development Server

To run the development server, use the following command:
```bash
yarn dev
```
This will start the server and you can access the documentation at `http://localhost:3000`.

### Example 2: Building the Project

To build the project for production, use the following command:
```bash
yarn build
```
This will create an optimized production build of the documentation.

## Contributing

We welcome contributions to improve the Sentry Documentation. To contribute, follow these guidelines:

1. Fork the repository and create a new branch for your changes.
2. Make your changes and ensure they are well-documented.
3. Submit a pull request with a clear description of your changes.

For more detailed information, refer to the [CONTRIBUTING.md](CONTRIBUTING.md) file.

## Available Scripts

Here is a list of available scripts and their descriptions:

- `yarn dev`: Starts the development server.
- `yarn build`: Builds the project for production.
- `yarn start`: Starts the production server.
- `yarn migrate:dev`: Runs database migrations for the development environment.
- `yarn lint`: Runs all linting checks.
- `yarn lint:ts`: Runs TypeScript linting checks.
- `yarn lint:docs`: Runs documentation linting checks.
- `yarn lint:eslint`: Runs ESLint checks.
- `yarn lint:eslint:fix`: Fixes ESLint issues.
- `yarn lint:prettier`: Runs Prettier checks.
- `yarn lint:prettier:fix`: Fixes Prettier issues.
- `yarn lint:fix`: Fixes all linting issues.
- `yarn sidecar`: Runs the Spotlight sidecar.
- `yarn test`: Runs all tests.
- `yarn test:ci`: Runs tests in CI mode.
- `yarn enforce-redirects`: Enforces redirects.

4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ module.exports = {
url: `http://localhost`,
},
setupFilesAfterEnv: ['<rootDir>/setup-test-env.js'],
collectCoverage: true,
coverageDirectory: '<rootDir>/coverage',
coverageReporters: ['json', 'lcov', 'text', 'clover'],
testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[tj]s?(x)'],
};