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

Contributing #36

Merged
merged 2 commits into from
May 13, 2023
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
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/01_bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: '🐛 Bug report'
description: Let us know about a bug!
labels: ['bug']
body:
- type: textarea
id: problem
attributes:
label: What happened? What is expected?
description: |
If applicable, add links to snippets, example files or request IDs. If possible, use screenshots/recordings to help explain your problem.
validations:
required: true

- type: textarea
id: repro
attributes:
label: How can we reproduce it?
description: |
Please be minimal and precise as possible.
validations:
required: true

- type: textarea
id: additional
attributes:
label: Anything else we need to know?
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/02_feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: '🎁 Feature request'
description: Suggest a new feature/enhancement!
labels: ['enhancement']
body:
- type: markdown
attributes:
value: |
ℹ️ If you have general feedback or questions, consider opening a [Discussion](https://github.com/robherley/snips.sh/discussions)!

Thanks for submitting a feature request!

- type: textarea
id: context
attributes:
label: What is the feature or enhancement?
validations:
required: true
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/03_abuse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: '🚨 Report abuse'
description: Is there a snippet violating our Terms of Service or Acceptable Use Policy?
labels: ['abuse']
body:
- type: textarea
id: snippet
attributes:
label: What is the snippet URL that is in violation of our policies?
validations:
required: true

- type: textarea
id: violation
attributes:
label: What is the nature of the violation?
description: |
See the [Terms of Service](https://snips.sh/docs/terms-of-service.md) and [Acceptable Use Policy](https://snips.sh/docs/acceptable-use-policy.md) for more information.
validations:
required: true

- type: textarea
id: additional
attributes:
label: Anything else we need to know?
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,18 @@ ssh snips.sh

## Docs

- [Contributing](/docs/contributing.md): How you can contribute to snips.sh
- [Database](/docs/database.md): How snips.sh stores it's data
- [Self Hosting](/docs/self-hosting.md): How to host your own instance of snips.sh
- [Terms of Service](/docs/terms-of-service.md): What we (snips.sh provider) and you can/can't do
- [Acceptable Use Policy](/docs/acceptable-use-policy.md): What you can/can't upload

## Contributors

<a href="https://github.com/robherley/snips.sh/graphs/contributors">
<img src="https://contrib.rocks/image?repo=robherley/snips.sh" />
</a>

## Credits

The technology behind snips.sh is powered by these amazing projects:
Expand Down
47 changes: 47 additions & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Contributing

Thank you for considering contributing to snips.sh! We welcome contributions from anyone, whether it's a bug report, a feature request, code improvements, or documentation updates.

## Issues and Questions

Please use [Issues](https://github.com/robherley/snips.sh/issues) to report bugs and feature enhancements. For any questions, discussions or general feedback, please use the [Discussions](https://github.com/robherley/snips.sh/discussions).

## Local Development

To get started, you'll need to have [Go installed](https://go.dev/doc/install).

In addition, the [libtensorflow](https://www.tensorflow.org/install/lang_c) shared objects for the C API need to be present on your system in order to use [guesslang](https://github.com/robherley/guesslang-go). Otherwise you'll see a bunch of "cannot open shared object file" errors. There's a utility script (`script/install-libtensorflow`) that will install it via `brew` for macOS or download from source for linux.

Once those dependencies are installed, you just need to:

```
go run main.go
```

To run it locally. There are some nice defaults for local development. To see all the available configuration options, run:

```
go run main.go -usage
```

Taking a look at the [`database.md`](/docs/database.md) and [`self-hosting.md`](/docs/selfhosting.md) documents may be useful too.

If you are working on the web UI, I recommend installing [air](https://github.com/cosmtrek/air) so the application recompiles when the files change. Otherwise the assets won't update while the binary is running.

### Scripts

This repo follows [scripts-to-rule-them-all](https://github.com/github/scripts-to-rule-them-all), here's a brief description of each:

`script/atlas`: locally installs [atlas](https://atlasgo.io/) CLI

`script/install-libtensorflow`: installs [libtensorflow](https://www.tensorflow.org/install/lang_c) shared objects for the C API (required for guesslang)

`script/lint`: locally installs [golangci-lint](https://github.com/golangci/golangci-lint) and runs the linter

`script/record-tape`: runs [vhs](https://github.com/charmbracelet/vhs) on `docs/tapes/` to generate gifs for readme

`script/schema-diff`: using [atlas](https://atlasgo.io/), prints the difference of local schema with latest `main` schema

`script/ssh-tmp`: helper to run ssh with a new (temporary) public key, useful for testing new user access

`script/test`: runs go tests with [gotestsum](https://github.com/gotestyourself/gotestsum)
Loading