From 45c76a9806fd291eb0f3791ad784398756aa343c Mon Sep 17 00:00:00 2001 From: Romain Lespinasse Date: Sat, 26 Oct 2024 22:35:27 +0200 Subject: [PATCH] docs: improve community pages (#33) --- .github/ISSUE_TEMPLATE/bug_report.md | 23 ++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++++ CONTRIBUTING.md | 33 +++++++++++++++++++++++ README.md | 29 ++++++++++---------- SECURITY.md | 22 +++++++++++++++ 5 files changed, 113 insertions(+), 14 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 CONTRIBUTING.md create mode 100644 SECURITY.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..37eab8f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,23 @@ +--- +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 + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..11fc491 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -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. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..dcc580a --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,33 @@ +# How to contribute to Slugify Value + +## Did you find a bug + +* **Do not open up a GitHub issue if the bug is a security vulnerability**, and instead to refer to our [security policy][1]. + +* **Ensure the bug was not already reported** by searching on GitHub under [Issues][2]. + +* If you're unable to find an open issue addressing the problem, [open a 'Bug' issue][4]. +Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring. + +## Did you write a patch that fixes a bug + +* Open a new GitHub pull request with the patch. + +* Ensure the PR description clearly describes the problem and solution. +Include the relevant issue number if applicable. + +## Do you intend to add a new feature or change an existing one + +* Suggest your change by [opening a 'Feature request' issue][5] + +## Do you have questions about the source code + +* [open an issue][3] with your question. + +Thanks! + +[1]: https://github.com/rlespinasse/slugify-value/security/policy +[2]: https://github.com/rlespinasse/slugify-value/issues +[3]: https://github.com/rlespinasse/slugify-value/issues/new +[4]: https://github.com/rlespinasse/slugify-value/issues/new?assignees=&labels=bug&template=bug_report.md&title= +[5]: https://github.com/rlespinasse/slugify-value/issues/new?assignees=&labels=enhancement&template=feature_request.md&title= \ No newline at end of file diff --git a/README.md b/README.md index 2dc03fe..03bf54a 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,25 @@ # Slugify -> Github Action to slugify a value +> [!NOTE] +> A GitHub Action that transforms input strings into URL-friendly slugs -Produce some `slug`-ed environment variables based on the input one. +This action creates standardized slug versions of your input variables, offering multiple formatting options: + +## Output Formats - `_SLUG` - - - put the variable content in lower case - - replace any character by `-` except `0-9`, `a-z`, `.`, and `_` - - remove leading `-` character - - limit the string size to 63 characters - - remove trailing `-` character - + - Converts text to lowercase + - Replaces special characters with **-** (except **0-9**, **a-z**, **.**, and **_**) + - Removes leading and trailing **-$* + - Limits string length to **63** characters - `_SLUG_CS` + - Same as `_SLUG` but preserves original case sensitivity +- `_SLUG_URL` and `_SLUG_URL_CS` + - Same as their respective base versions (`_SLUG` or `_SLUG_CS`) + - Additionally replaces **.** and **_** with **-** + - Perfect for URL-safe strings - - like `_SLUG` but the content is not put in lower case - -- `_SLUG_URL` (or `_SLUG_URL_CS`) - - - like `_SLUG` (or `_SLUG_CS`) with the `.`, and `_` characters also replaced by `-` +Each output variable maintains consistent formatting rules while serving different use cases, from basic slugification to URL-ready strings. ## Usage diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..048a68c --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,22 @@ +# Security Policy + +## Supported Versions and Branches + +| Version | Supported | End of Support | Branch | Specific Tags | +| ------- | ------------------ | -------------- | ------ | ------------- | +| 1.x | :white_check_mark: | | v1.x | v1 | + +A GitHub repository can use one of the available branches as an action inside its workflows. + +### End of Life of a branch + +Since `2024-10-26`, when a new major version is released, + +- The previous one will continue to receive security patches for 3 months, +- After the 3 months, the branch is deleted, and only the tags remain. + +## Reporting a Vulnerability + +In this project, you can report a Vulnerability by creating a [draft security advisory](https://github.com/rlespinasse/slugify-value/security/advisories). + +If the vulnerability is confirmed, a fix will be produced and the advisory will be published.