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

docs: create contributing and add project philosophy #1286

Merged
merged 1 commit into from
Jun 20, 2024
Merged
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
79 changes: 79 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Gitify Contributing Guide

Hi! We're really excited that you're interested in contributing to Gitify! Before submitting your contribution, please read through the following guide. We also suggest you read the [Project Philosophy](#project-philosophy) in our documentation.

### Installation

To get started, you'll need to clone the repository and install the dependencies.

```shell
pnpm install
```

### Development

Optional: If you prefer to use your own OAuth credentials, you can do so by passing them as environment variables when bundling the app. This is optional as the app has some default "development" keys (use at your own discretion).

```shell
OAUTH_CLIENT_ID="123" OAUTH_CLIENT_SECRET="456789" pnpm build
```

To watch for changes (`webpack`) in the `src` directory:

```shell
pnpm watch
```

To run the **electron app**:

```shell
pnpm start
```

### Tests

There are 2 checks:
1. linter & formatter with [biome][biome-website]
2. unit tests with [jest][jest-website]

```shell
# Run biome to check linting and formatting
pnpm lint:check

# Run unit tests with coverage
pnpm test

# If you want to pass arguments to jest (or other `pnpm` commands)
# like `--watch`, you can prepend `--` to the command
pnpm test -- --watch
```

### Releases

The release process is automated. Follow the steps below.

1. Verify that all features you want targeted in the release have been merged to `main`.
2. Create a [new **draft** release][github-new-release]. Set the tag version to something with the format of `v1.2.3`. Save as a **draft** before moving to the next step
3. Create a branch that starts with `release/vX.X.X` (ie. `release/v1.2.3`).
4. In the same branch, **bump the version** of the app by running `pnpm version <new-version-number`. Commit these changes and open a PR. A GitHub Actions workflow will build, sign and upload the release assets for each commit to that branch as long as a branch is named like `release/vX.X.X` and there is a draft release with the same version number(`package.json`).
5. Merge your release branch into `main`.
6. Publish the release once you've finalized the release notes and confirmed all assets are there.
7. A new homebrew cask will be automatically published (workflow runs ~3 hours)

### Project Philosophy

This project is a tool for monitoring new notifications from Github. It's not meant to be a full-featured Github client. We want to keep it simple and focused on that core functionality. We're happy to accept contributions that help us achieve that goal, but we're also happy to say no to things that don't. We're not trying to be everything to everyone.

#### Things we won't do

* Operating-system level features
* Do not disturb, including on schedules. https://github.com/gitify-app/gitify/issues/416#issuecomment-1746480130
* Persistent notifications like https://github.com/gitify-app/gitify/issues/281. e.g. macOS has Alerts, instead of Banners, which makes them persistent
* Seeing past notifications. This is a tool for monitoring new notifications, not seeing old ones, which can be seen at https://github.com/notifications.
* Specific UX/UI changes that add options and/or visual complexity for minor workflow improvements. e.g. https://github.com/gitify-app/gitify/issues/358, https://github.com/gitify-app/gitify/issues/411 and https://github.com/gitify-app/gitify/issues/979
* UI for something that isn't core to Gitify, and/or can be trivially done another way. e.g. https://github.com/gitify-app/gitify/issues/476 and https://github.com/gitify-app/gitify/issues/221
* Support anything other than Github. Doing so would be a major undertaking that we may consider in future, but it would be a ton of work and there's so much tied to Github right now that it's not something I'd want to maintain.

<!-- LINK LABELS -->
[biome-website]: https://biomejs.dev/
[jest-website]: https://jestjs.io/
57 changes: 1 addition & 56 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,66 +14,13 @@ brew install --cask gitify

Gitify supports macOS, Windows and Linux.

### Installation

pnpm install

### Development

Optional: If you prefer to use your own OAuth credentials, you can do so by passing them as environment variables when bundling the app. This is optional as the app has some default "development" keys (use at your own discretion).

OAUTH_CLIENT_ID="123" OAUTH_CLIENT_SECRET="456789" pnpm build

To watch for changes(`webpack`) in the `src` directory:

pnpm watch

To run the **electron app**:

pnpm start

### Releases

The release process is automated. Follow the steps below.

1. Verify that all features you want targeted in the release have been merged to `main`.
2. Create a [new **draft** release][github-new-release]. Set the tag version to something with the format of `v1.2.3`. Save as a **draft** before moving to the next step
3. Create a branch that starts with `release/vX.X.X` (ie. `release/v1.2.3`).
4. In the same branch, **bump the version** of the app by running `pnpm version <new-version-number`. Commit these changes and open a PR. A GitHub Actions workflow will build, sign and upload the release assets for each commit to that branch as long as a branch is named like `release/vX.X.X` and there is a draft release with the same version number(`package.json`).
5. Merge your release branch into `main`.
6. Publish the release once you've finalized the release notes and confirmed all assets are there.
7. A new homebrew cask will be automatically published (workflow runs ~3 hours)

### Tests

There are 2 checks:
1. linter & formatter with [biome][biome-website]
2. unit tests with [jest][jest-website]

```shell
# Run biome to check linting and formatting
pnpm lint:check

# Run unit tests with coverage
pnpm test

# If you want to pass arguments to jest (or other `pnpm` commands)
# like `--watch`, you can prepend `--` to the command
pnpm test -- --watch
```

### FAQ

Please visit our [Gitify FAQs][faqs] for all commonly asked questions.

### Contributing

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request
6. Make sure tests are passing
Please read our [Contributing Guidelines](CONTRIBUTING.md) for more information.

### License

Expand All @@ -92,7 +39,6 @@ For more information, see [LICENSE](LICENSE).
[github-website-pulls]: https://github.com/gitify-app/website/pulls
[brew]: http://brew.sh/
[homebrew-cask]: https://formulae.brew.sh/cask/gitify
[biome-website]: biomejs.dev/
[coveralls]: https://coveralls.io/github/gitify-app/gitify
[coveralls-badge]: https://img.shields.io/coverallsCoverage/github/gitify-app/gitify
[build-workflow-badge]: https://github.com/gitify-app/gitify/actions/workflows/build.yml/badge.svg
Expand All @@ -106,6 +52,5 @@ For more information, see [LICENSE](LICENSE).
[license-badge]: https://img.shields.io/github/license/gitify-app/gitify
[github-release-badge]: https://img.shields.io/github/v/release/gitify-app/gitify
[homebrew-cask-badge]: https://img.shields.io/homebrew/cask/v/gitify
[jest-website]: https://jestjs.io/
[renovate]: https://renovatebot.com/
[renovate-badge]: https://img.shields.io/badge/renovate-enabled-brightgreen.svg