From 9405c90405a48e99f67e8a50d954be007e92d9a5 Mon Sep 17 00:00:00 2001 From: Samuel Berthe Date: Sun, 30 Jun 2024 02:18:13 +0200 Subject: [PATCH] chore: adding issue template (#481) --- .github/PULL_REQUEST_TEMPLATE/config.yml | 8 +++++++ .github/PULL_REQUEST_TEMPLATE/new_helper.md | 23 +++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE/other.md | 0 3 files changed, 31 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE/config.yml create mode 100644 .github/PULL_REQUEST_TEMPLATE/new_helper.md create mode 100644 .github/PULL_REQUEST_TEMPLATE/other.md 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