diff --git a/.github/PULL_REQUEST_TEMPLATE/config.yml b/.github/PULL_REQUEST_TEMPLATE/config.yml new file mode 100644 index 00000000..36bbc5ee --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +template_chooser: + enabled: true + default: "other.md" + choices: + - name: "New Helper" + file: "new_helper.md" + - name: "Other Changes" + file: "other.md" diff --git a/.github/PULL_REQUEST_TEMPLATE/new_helper.md b/.github/PULL_REQUEST_TEMPLATE/new_helper.md new file mode 100644 index 00000000..341ab35e --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/new_helper.md @@ -0,0 +1,23 @@ + +## Describe your changes + +... + +## Checklist before requesting a review + +- [ ] ๐Ÿ‘“ I have performed a self-review of my code +- [ ] ๐Ÿ‘ถ This helper does not already exist +- [ ] ๐Ÿงช This helper is tested +- [ ] ๐ŸŽ๏ธ My code limits memory allocation and is fast +- [ ] ๐Ÿงžโ€โ™‚๏ธ This helper is immutable and my tests prove it +- [ ] โœ๏ธ I implemented the parallel and mutable variants +- [ ] ๐Ÿ“– My helper has been added to README +- [ ] ๐Ÿ”ฌ An example has been added to xxxxx_example_test.go +- [ ] โ›น๏ธ An example has been created on https://go.dev/play + +## Conventions + +- Returning `(ok bool)` is often better than `(err error)` +- `panic(...)` must be limited +- Helpers should allow batching (eg: receive variadic arguments) +- Use an index at the end of the helper name to declare variants (eg: `lo.Must0`, `lo.Must1`, `lo.Must2`...) diff --git a/.github/PULL_REQUEST_TEMPLATE/other.md b/.github/PULL_REQUEST_TEMPLATE/other.md new file mode 100644 index 00000000..e69de29b