From dc830380f4faaa42aecd90d996bf394fcb683475 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 5 Sep 2020 16:27:06 +0200 Subject: [PATCH 001/152] "basic .github + bug report done" --- .github/CODE_OF_CONDUCT.md | 76 +++++++++++++++++++ .github/FUNDING.yml | 2 + .github/ISSUE_TEMPLATE/bug_report.md | 62 +++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 +++++ .../pull_request_template.md | 31 ++++++++ .github/issue_label_bot.yaml | 4 + 6 files changed, 195 insertions(+) create mode 100644 .github/CODE_OF_CONDUCT.md create mode 100644 .github/FUNDING.yml create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/PULL_REQUEST_TEMPLATE/pull_request_template.md create mode 100644 .github/issue_label_bot.yaml diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..4d072cd --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at jgracia9988@gmail.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see + diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..719baed --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,2 @@ +# These are supported funding model platforms +custom: ["https://www.paypal.me/josee9988", "https://www.buymeacoffee.com/josee9988"] diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..9b0bf59 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,62 @@ +--- +name: Bug report +about: Report an issue to help the project improve. +title: "" +labels: bug +assignees: Josee9988 + +--- + + + + +**Describe the bug** + + +* + +--- + +**To Reproduce** + + + +1. +2. +3. +4. + +--- + +**Expected behaviour** + + +* + +--- + +**Media prove** + + +--- + +**Device (please complete the following information):** + + + - OS: + - Node version: + - Npm version: + - Browser name and version: + +--- + +**Additional context** + + +* diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..25386cf --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea or possible enhancement for this project +title: "" +labels: enhancement +assignees: Josee9988 + +--- + +**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/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md new file mode 100644 index 0000000..7b01f30 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -0,0 +1,31 @@ +# **Description** + +Please include a summary of the change and/or which issue is fixed. + +Please also include relevant motivation and context. + +List any dependencies that are required for this change if there are any. + +If it fixes any existing issue please let us know *this way*: + +``` plain +Fixes #numberOfTheExistingIssue +``` + +## **Type of change** + +Please delete options that are not relevant. + +- [ ] **Bug fix** (non-breaking change which fixes an issue). +- [ ] **Enhancement** (non-breaking change which adds functionality). +- [ ] **Breaking change** (fix or feature that would cause existing functionality to not work as expected). +- [ ] This change requires a documentation update. +- [ ] Other. + +## **Checklist** + +- [ ] My code follows the style guidelines of this project. +- [ ] I have commented my code, particularly in hard-to-understand areas. +- [ ] I have made corresponding changes to the documentation. +- [ ] My changes generate no new warnings or errors. +- [ ] New (if you add any feature you should add tests to prove that your feature works) and existing unit tests pass locally with my changes (*test/*). diff --git a/.github/issue_label_bot.yaml b/.github/issue_label_bot.yaml new file mode 100644 index 0000000..b642226 --- /dev/null +++ b/.github/issue_label_bot.yaml @@ -0,0 +1,4 @@ +label-alias: + bug: 'bug' + feature_request: 'enhancement' + question: 'question' From 1aea4c315f9a0ec6a33a76bcd91d79b794dda95d Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 5 Sep 2020 16:31:39 +0200 Subject: [PATCH 002/152] "added gitignore ignoring vscode, jetbrains and linux files" --- .gitignore | 134 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..01c3422 --- /dev/null +++ b/.gitignore @@ -0,0 +1,134 @@ +# Created by https://www.toptal.com/developers/gitignore/api/linux,visualstudiocode,jetbrains +# Edit at https://www.toptal.com/developers/gitignore?templates=linux,visualstudiocode,jetbrains + +### JetBrains ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### JetBrains Patch ### +# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 + +# *.iml +# modules.xml +# .idea/misc.xml +# *.ipr + +# Sonarlint plugin +# https://plugins.jetbrains.com/plugin/7973-sonarlint +.idea/**/sonarlint/ + +# SonarQube Plugin +# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin +.idea/**/sonarIssues.xml + +# Markdown Navigator plugin +# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced +.idea/**/markdown-navigator.xml +.idea/**/markdown-navigator-enh.xml +.idea/**/markdown-navigator/ + +# Cache file creation bug +# See https://youtrack.jetbrains.com/issue/JBR-2257 +.idea/$CACHE_FILE$ + +# CodeStream plugin +# https://plugins.jetbrains.com/plugin/12206-codestream +.idea/codestream.xml + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history + +# End of https://www.toptal.com/developers/gitignore/api/linux,visualstudiocode,jetbrains From 2c7d39e105ef36feaf0b16fe60bb499ca92f72bd Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 5 Sep 2020 16:53:07 +0200 Subject: [PATCH 003/152] "feature request done" --- .../{bug_report.md => 1-bug-report.md} | 34 ++++-- .github/ISSUE_TEMPLATE/2-feature-request.md | 46 ++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ---- .gitignore | 103 +----------------- 4 files changed, 73 insertions(+), 130 deletions(-) rename .github/ISSUE_TEMPLATE/{bug_report.md => 1-bug-report.md} (53%) create mode 100644 .github/ISSUE_TEMPLATE/2-feature-request.md delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md similarity index 53% rename from .github/ISSUE_TEMPLATE/bug_report.md rename to .github/ISSUE_TEMPLATE/1-bug-report.md index 9b0bf59..5fa226a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/1-bug-report.md @@ -1,5 +1,5 @@ --- -name: Bug report +name: "\U0001F41EBug report" about: Report an issue to help the project improve. title: "" labels: bug @@ -7,17 +7,33 @@ assignees: Josee9988 --- - - + + + +# **🐞 Bug Report** + + +## **Describe the bug** * --- -**To Reproduce** +### **Is this a regression?** + + + +--- + +### **To Reproduce** * --- -**Media prove** +### **Media prove** --- -**Device (please complete the following information):** +### **Your environment** @@ -56,7 +72,7 @@ and remove all the bulleted list elements that are not relevant for this issue. --- -**Additional context** +### **Additional context** * diff --git a/.github/ISSUE_TEMPLATE/2-feature-request.md b/.github/ISSUE_TEMPLATE/2-feature-request.md new file mode 100644 index 0000000..b56b34b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2-feature-request.md @@ -0,0 +1,46 @@ +--- +name: "\U0001F680Feature request" +about: Suggest an idea or possible enhancement for this project +title: "" +labels: enhancement +assignees: Josee9988 + +--- + + + +# **πŸš€ Feature Request** + + +## **Is your feature request related to a problem? Please describe.** + + +* + +--- + +## **Describe the solution you'd like** + + +* + +--- + +## **Describe alternatives you've considered** + + +* + +--- + +### **Additional context** + + +* diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 25386cf..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea or possible enhancement for this project -title: "" -labels: enhancement -assignees: Josee9988 - ---- - -**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/.gitignore b/.gitignore index 01c3422..ef11ff1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,107 +2,8 @@ # Edit at https://www.toptal.com/developers/gitignore?templates=linux,visualstudiocode,jetbrains ### JetBrains ### -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 -# User-specific stuff -.idea/**/workspace.xml -.idea/**/tasks.xml -.idea/**/usage.statistics.xml -.idea/**/dictionaries -.idea/**/shelf - -# Generated files -.idea/**/contentModel.xml - -# Sensitive or high-churn files -.idea/**/dataSources/ -.idea/**/dataSources.ids -.idea/**/dataSources.local.xml -.idea/**/sqlDataSources.xml -.idea/**/dynamic.xml -.idea/**/uiDesigner.xml -.idea/**/dbnavigator.xml - -# Gradle -.idea/**/gradle.xml -.idea/**/libraries - -# Gradle and Maven with auto-import -# When using Gradle or Maven with auto-import, you should exclude module files, -# since they will be recreated, and may cause churn. Uncomment if using -# auto-import. -# .idea/artifacts -# .idea/compiler.xml -# .idea/jarRepositories.xml -# .idea/modules.xml -# .idea/*.iml -# .idea/modules -# *.iml -# *.ipr - -# CMake -cmake-build-*/ - -# Mongo Explorer plugin -.idea/**/mongoSettings.xml - -# File-based project format -*.iws - -# IntelliJ -out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Cursive Clojure plugin -.idea/replstate.xml - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties - -# Editor-based Rest Client -.idea/httpRequests - -# Android studio 3.1+ serialized cache file -.idea/caches/build_file_checksums.ser - -### JetBrains Patch ### -# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 - -# *.iml -# modules.xml -# .idea/misc.xml -# *.ipr - -# Sonarlint plugin -# https://plugins.jetbrains.com/plugin/7973-sonarlint -.idea/**/sonarlint/ - -# SonarQube Plugin -# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin -.idea/**/sonarIssues.xml - -# Markdown Navigator plugin -# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced -.idea/**/markdown-navigator.xml -.idea/**/markdown-navigator-enh.xml -.idea/**/markdown-navigator/ - -# Cache file creation bug -# See https://youtrack.jetbrains.com/issue/JBR-2257 -.idea/$CACHE_FILE$ - -# CodeStream plugin -# https://plugins.jetbrains.com/plugin/12206-codestream -.idea/codestream.xml +.idea/ ### Linux ### *~ @@ -131,4 +32,4 @@ fabric.properties # Ignore all local history of files .history -# End of https://www.toptal.com/developers/gitignore/api/linux,visualstudiocode,jetbrains +# End of https://www.toptal.com/developers/gitignore/api/linux,visualstudiocode From 9e3c094f8a8f732e867e04d788e729b36cf9190c Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 5 Sep 2020 16:56:38 +0200 Subject: [PATCH 004/152] "documentation issue template" --- .github/ISSUE_TEMPLATE/1-bug-report.md | 2 +- .github/ISSUE_TEMPLATE/2-feature-request.md | 2 +- .github/ISSUE_TEMPLATE/3-docs-bug.md | 46 +++++++++++++++++++++ 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/3-docs-bug.md diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md index 5fa226a..cec7af3 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.md +++ b/.github/ISSUE_TEMPLATE/1-bug-report.md @@ -1,5 +1,5 @@ --- -name: "\U0001F41EBug report" +name: "\U0001F41E Bug report" about: Report an issue to help the project improve. title: "" labels: bug diff --git a/.github/ISSUE_TEMPLATE/2-feature-request.md b/.github/ISSUE_TEMPLATE/2-feature-request.md index b56b34b..f92b4a5 100644 --- a/.github/ISSUE_TEMPLATE/2-feature-request.md +++ b/.github/ISSUE_TEMPLATE/2-feature-request.md @@ -1,5 +1,5 @@ --- -name: "\U0001F680Feature request" +name: "\U0001F680 Feature request" about: Suggest an idea or possible enhancement for this project title: "" labels: enhancement diff --git a/.github/ISSUE_TEMPLATE/3-docs-bug.md b/.github/ISSUE_TEMPLATE/3-docs-bug.md new file mode 100644 index 0000000..404d865 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/3-docs-bug.md @@ -0,0 +1,46 @@ +--- +name: "πŸ“š Documentation or README.md issue report" +about: Report an issue in the project's documentation or README.md file. +title: "" +labels: documentation +assignees: Josee9988 + +--- + + + +# **πŸš€ Feature Request** + + +## **Is your feature request related to a problem? Please describe.** + + +* + +--- + +## **Describe the solution you'd like** + + +* + +--- + +## **Describe alternatives you've considered** + + +* + +--- + +### **Additional context** + + +* From 0c1571c80bec6263426f704e649d37b1b6364974 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 5 Sep 2020 16:59:29 +0200 Subject: [PATCH 005/152] "docs bug improved to make it easier" --- .github/ISSUE_TEMPLATE/1-bug-report.md | 2 +- .github/ISSUE_TEMPLATE/2-feature-request.md | 2 +- .github/ISSUE_TEMPLATE/3-docs-bug.md | 35 ++++++++++++++------- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md index cec7af3..b746494 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.md +++ b/.github/ISSUE_TEMPLATE/1-bug-report.md @@ -1,5 +1,5 @@ --- -name: "\U0001F41E Bug report" +name: "🐞 Bug report" about: Report an issue to help the project improve. title: "" labels: bug diff --git a/.github/ISSUE_TEMPLATE/2-feature-request.md b/.github/ISSUE_TEMPLATE/2-feature-request.md index f92b4a5..5ab16e7 100644 --- a/.github/ISSUE_TEMPLATE/2-feature-request.md +++ b/.github/ISSUE_TEMPLATE/2-feature-request.md @@ -1,5 +1,5 @@ --- -name: "\U0001F680 Feature request" +name: "πŸš€ Feature request" about: Suggest an idea or possible enhancement for this project title: "" labels: enhancement diff --git a/.github/ISSUE_TEMPLATE/3-docs-bug.md b/.github/ISSUE_TEMPLATE/3-docs-bug.md index 404d865..6f37b70 100644 --- a/.github/ISSUE_TEMPLATE/3-docs-bug.md +++ b/.github/ISSUE_TEMPLATE/3-docs-bug.md @@ -16,28 +16,41 @@ Please read our Rules of Conduct at: this repository `.github/CODE_OF_CONDUCT.md πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›--> -# **πŸš€ Feature Request** +# **πŸ“š Documentation Issue Report** - -## **Is your feature request related to a problem? Please describe.** - +## **Describe the bug** + * --- -## **Describe the solution you'd like** - +### **To Reproduce** + + + +1. +2. +3. +4. -* - --- -## **Describe alternatives you've considered** - +### **Media prove** + -* +--- + +## **Describe the solution you'd like** + +* + --- ### **Additional context** From 1c485bae788ea595c891528019f64d488a6c6ae8 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 5 Sep 2020 17:06:55 +0200 Subject: [PATCH 006/152] "added config.yml in issue templates" --- .github/ISSUE_TEMPLATE/config.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..89fca04 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Send an e-mail the developer + url: mailto:jgracia9988@gmail.com + about: Please do NOT use this email to post issues or feature requests (only important business/personal contact). From 93dd675e21aac08da01a5955fef321f55a8cbc9a Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 5 Sep 2020 20:33:27 +0200 Subject: [PATCH 007/152] "pull request template done" --- .../pull_request_template.md | 57 ++++++++++++------- 1 file changed, 37 insertions(+), 20 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md index 7b01f30..703daeb 100644 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -1,31 +1,48 @@ -# **Description** +# **This pull request fixes # issue** -Please include a summary of the change and/or which issue is fixed. + -Please also include relevant motivation and context. +## **Description** + + +* + +--- + +### **Type of change** + + -If it fixes any existing issue please let us know *this way*: +* [ ] **Bug fix** (non-breaking change which fixes an issue). +* [ ] **Enhancement** (non-breaking change which adds functionality). +* [ ] **Breaking change** (fix or feature that would cause existing functionality to not work as expected). +* [ ] This change requires a documentation update. +* [ ] Other. -``` plain -Fixes #numberOfTheExistingIssue -``` +--- -## **Type of change** +### **Checklist** -Please delete options that are not relevant. +* [ ] My code follows the style guidelines of this project. +* [ ] I have commented my code, particularly in hard-to-understand areas. +* [ ] I have made corresponding changes to the documentation. +* [ ] My changes generate no new warnings or errors. +* [ ] New (if you add any feature you should add tests to prove that your feature works) and existing unit tests pass locally with my changes (*test/*). -- [ ] **Bug fix** (non-breaking change which fixes an issue). -- [ ] **Enhancement** (non-breaking change which adds functionality). -- [ ] **Breaking change** (fix or feature that would cause existing functionality to not work as expected). -- [ ] This change requires a documentation update. -- [ ] Other. +### **Additional context** -## **Checklist** + -- [ ] My code follows the style guidelines of this project. -- [ ] I have commented my code, particularly in hard-to-understand areas. -- [ ] I have made corresponding changes to the documentation. -- [ ] My changes generate no new warnings or errors. -- [ ] New (if you add any feature you should add tests to prove that your feature works) and existing unit tests pass locally with my changes (*test/*). +* From 35f2a3a3dbabf0e65c61c12d3b540df77e3d7757 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 5 Sep 2020 20:36:18 +0200 Subject: [PATCH 008/152] "modified the markdowns to follow the markdownlint linter rules" --- .github/ISSUE_TEMPLATE/1-bug-report.md | 15 ++++++++------- .github/ISSUE_TEMPLATE/2-feature-request.md | 3 +-- .github/ISSUE_TEMPLATE/3-docs-bug.md | 4 +++- .github/ISSUE_TEMPLATE/config.yml | 3 +++ 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md index b746494..153b3d8 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.md +++ b/.github/ISSUE_TEMPLATE/1-bug-report.md @@ -16,10 +16,8 @@ Please read our Rules of Conduct at: this repository `.github/CODE_OF_CONDUCT.md πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›--> - # **🐞 Bug Report** - ## **Describe the bug** @@ -34,6 +32,7 @@ Please read our Rules of Conduct at: this repository `.github/CODE_OF_CONDUCT.md --- ### **To Reproduce** + + 1. 2. 3. @@ -62,14 +62,15 @@ Please read our Rules of Conduct at: this repository `.github/CODE_OF_CONDUCT.md --- ### **Your environment** + - - OS: - - Node version: - - Npm version: - - Browser name and version: - + * OS: + * Node version: + * Npm version: + * Browser name and version: + --- ### **Additional context** diff --git a/.github/ISSUE_TEMPLATE/2-feature-request.md b/.github/ISSUE_TEMPLATE/2-feature-request.md index 5ab16e7..607a252 100644 --- a/.github/ISSUE_TEMPLATE/2-feature-request.md +++ b/.github/ISSUE_TEMPLATE/2-feature-request.md @@ -18,7 +18,6 @@ Please read our Rules of Conduct at: this repository `.github/CODE_OF_CONDUCT.md # **πŸš€ Feature Request** - ## **Is your feature request related to a problem? Please describe.** @@ -30,7 +29,7 @@ Please read our Rules of Conduct at: this repository `.github/CODE_OF_CONDUCT.md * - + --- ## **Describe alternatives you've considered** diff --git a/.github/ISSUE_TEMPLATE/3-docs-bug.md b/.github/ISSUE_TEMPLATE/3-docs-bug.md index 6f37b70..e8963bc 100644 --- a/.github/ISSUE_TEMPLATE/3-docs-bug.md +++ b/.github/ISSUE_TEMPLATE/3-docs-bug.md @@ -26,6 +26,7 @@ Please read our Rules of Conduct at: this repository `.github/CODE_OF_CONDUCT.md --- ### **To Reproduce** + + 1. 2. 3. @@ -50,7 +52,7 @@ Please read our Rules of Conduct at: this repository `.github/CODE_OF_CONDUCT.md * - + --- ### **Additional context** diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 89fca04..0031c9b 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -3,3 +3,6 @@ contact_links: - name: Send an e-mail the developer url: mailto:jgracia9988@gmail.com about: Please do NOT use this email to post issues or feature requests (only important business/personal contact). + - name: Author personal website + url: https://jgracia.es/ + about: Personal website of the developer @Josee9988 From dd85fca84e2260234094da7a46e5d91fd113a7e6 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 5 Sep 2020 20:46:02 +0200 Subject: [PATCH 009/152] "added a failing test template" --- .github/ISSUE_TEMPLATE/2-failing-test.md | 40 +++++++++++++++++++ ...eature-request.md => 4-feature-request.md} | 0 2 files changed, 40 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/2-failing-test.md rename .github/ISSUE_TEMPLATE/{2-feature-request.md => 4-feature-request.md} (100%) diff --git a/.github/ISSUE_TEMPLATE/2-failing-test.md b/.github/ISSUE_TEMPLATE/2-failing-test.md new file mode 100644 index 0000000..0b5321c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2-failing-test.md @@ -0,0 +1,40 @@ +--- +name: "πŸ’‰ Failing Test" +about: "Report failing tests or jobs in CI" +labels: failing-test +assignees: Josee9988 + +--- + + + +# **πŸ’‰ Failing Test** + +## **Which jobs/test(s) are failing**: + + +* + +--- + +## **Reason for failure/description** + + +--- + +### **Media prove** + + +--- + +### **Additional context** + + +* diff --git a/.github/ISSUE_TEMPLATE/2-feature-request.md b/.github/ISSUE_TEMPLATE/4-feature-request.md similarity index 100% rename from .github/ISSUE_TEMPLATE/2-feature-request.md rename to .github/ISSUE_TEMPLATE/4-feature-request.md From 829a5174cbad5274c2aa93fea655d3a135277de5 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sun, 6 Sep 2020 15:17:17 +0200 Subject: [PATCH 010/152] "created blank issue template, and allowed it" --- .github/ISSUE_TEMPLATE/1-bug-report.md | 2 +- .github/ISSUE_TEMPLATE/2-failing-test.md | 2 +- .github/ISSUE_TEMPLATE/3-docs-bug.md | 2 +- .github/ISSUE_TEMPLATE/4-feature-request.md | 2 +- .github/ISSUE_TEMPLATE/config.yml | 5 +-- .github/ISSUE_TEMPLATE/issue_template.md | 48 +++++++++++++++++++++ 6 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/issue_template.md diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md index 153b3d8..022a2ac 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.md +++ b/.github/ISSUE_TEMPLATE/1-bug-report.md @@ -1,6 +1,6 @@ --- name: "🐞 Bug report" -about: Report an issue to help the project improve. +about: "Report an issue to help the project improve." title: "" labels: bug assignees: Josee9988 diff --git a/.github/ISSUE_TEMPLATE/2-failing-test.md b/.github/ISSUE_TEMPLATE/2-failing-test.md index 0b5321c..8330687 100644 --- a/.github/ISSUE_TEMPLATE/2-failing-test.md +++ b/.github/ISSUE_TEMPLATE/2-failing-test.md @@ -1,6 +1,6 @@ --- name: "πŸ’‰ Failing Test" -about: "Report failing tests or jobs in CI" +about: "Report failing tests or CI jobs." labels: failing-test assignees: Josee9988 diff --git a/.github/ISSUE_TEMPLATE/3-docs-bug.md b/.github/ISSUE_TEMPLATE/3-docs-bug.md index e8963bc..9a8932f 100644 --- a/.github/ISSUE_TEMPLATE/3-docs-bug.md +++ b/.github/ISSUE_TEMPLATE/3-docs-bug.md @@ -1,6 +1,6 @@ --- name: "πŸ“š Documentation or README.md issue report" -about: Report an issue in the project's documentation or README.md file. +about: "Report an issue in the project's documentation or README.md file." title: "" labels: documentation assignees: Josee9988 diff --git a/.github/ISSUE_TEMPLATE/4-feature-request.md b/.github/ISSUE_TEMPLATE/4-feature-request.md index 607a252..db77f0f 100644 --- a/.github/ISSUE_TEMPLATE/4-feature-request.md +++ b/.github/ISSUE_TEMPLATE/4-feature-request.md @@ -1,6 +1,6 @@ --- name: "πŸš€ Feature request" -about: Suggest an idea or possible enhancement for this project +about: "Suggest an idea or possible enhancement for this project." title: "" labels: enhancement assignees: Josee9988 diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 0031c9b..a053b0d 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,8 +1,5 @@ -blank_issues_enabled: false +blank_issues_enabled: true contact_links: - name: Send an e-mail the developer url: mailto:jgracia9988@gmail.com about: Please do NOT use this email to post issues or feature requests (only important business/personal contact). - - name: Author personal website - url: https://jgracia.es/ - about: Personal website of the developer @Josee9988 diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md new file mode 100644 index 0000000..0ba453c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -0,0 +1,48 @@ +--- +name: "" +about: "" +title: "" +labels: toLabel +assignees: Josee9988 + +--- + + + +# **🐞 Bug Report** + +## **Describe the issue** + + +* + +--- + +### **Media prove** + + +--- + +### **Your environment** + + + + * OS: + * Node version: + * Npm version: + * Browser name and version: + +--- + +### **Additional context** + + +* From d08e80caa50c8add709f71b049358a321cc508fe Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sun, 6 Sep 2020 15:23:25 +0200 Subject: [PATCH 011/152] "blank issue template to the right folder" --- .../{ISSUE_TEMPLATE/issue_template.md => ISSUE_TEMPLATE.md} | 6 ++++-- .github/ISSUE_TEMPLATE/1-bug-report.md | 2 +- .github/ISSUE_TEMPLATE/2-failing-test.md | 2 +- .github/ISSUE_TEMPLATE/3-docs-bug.md | 2 +- .github/ISSUE_TEMPLATE/4-feature-request.md | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) rename .github/{ISSUE_TEMPLATE/issue_template.md => ISSUE_TEMPLATE.md} (81%) diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE.md similarity index 81% rename from .github/ISSUE_TEMPLATE/issue_template.md rename to .github/ISSUE_TEMPLATE.md index 0ba453c..08ccfd0 100644 --- a/.github/ISSUE_TEMPLATE/issue_template.md +++ b/.github/ISSUE_TEMPLATE.md @@ -11,12 +11,14 @@ assignees: Josee9988 Oh hi there! πŸ˜„ +To make our work easier we recommend you to choose any of our available issue templates rather than using (this) a blank template. + To expedite issue processing please search open and closed issues before submitting a new one. -Please read our Rules of Conduct at: this repository `.github/CODE_OF_CONDUCT.md` +Please read our Rules of Conduct at: this repository's `.github/CODE_OF_CONDUCT.md` πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›--> -# **🐞 Bug Report** +# **Blank Issue Report** ## **Describe the issue** diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md index 022a2ac..de3f2bb 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.md +++ b/.github/ISSUE_TEMPLATE/1-bug-report.md @@ -12,7 +12,7 @@ assignees: Josee9988 Oh hi there! πŸ˜„ To expedite issue processing please search open and closed issues before submitting a new one. -Please read our Rules of Conduct at: this repository `.github/CODE_OF_CONDUCT.md` +Please read our Rules of Conduct at: this repository's `.github/CODE_OF_CONDUCT.md` πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›--> diff --git a/.github/ISSUE_TEMPLATE/2-failing-test.md b/.github/ISSUE_TEMPLATE/2-failing-test.md index 8330687..8e6a513 100644 --- a/.github/ISSUE_TEMPLATE/2-failing-test.md +++ b/.github/ISSUE_TEMPLATE/2-failing-test.md @@ -11,7 +11,7 @@ assignees: Josee9988 Oh hi there! πŸ˜„ To expedite issue processing please search open and closed issues before submitting a new one. -Please read our Rules of Conduct at: this repository `.github/CODE_OF_CONDUCT.md` +Please read our Rules of Conduct at: this repository's `.github/CODE_OF_CONDUCT.md` πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›--> diff --git a/.github/ISSUE_TEMPLATE/3-docs-bug.md b/.github/ISSUE_TEMPLATE/3-docs-bug.md index 9a8932f..8e1c749 100644 --- a/.github/ISSUE_TEMPLATE/3-docs-bug.md +++ b/.github/ISSUE_TEMPLATE/3-docs-bug.md @@ -12,7 +12,7 @@ assignees: Josee9988 Oh hi there! πŸ˜„ To expedite issue processing please search open and closed issues before submitting a new one. -Please read our Rules of Conduct at: this repository `.github/CODE_OF_CONDUCT.md` +Please read our Rules of Conduct at: this repository's `.github/CODE_OF_CONDUCT.md` πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›--> diff --git a/.github/ISSUE_TEMPLATE/4-feature-request.md b/.github/ISSUE_TEMPLATE/4-feature-request.md index db77f0f..89edf22 100644 --- a/.github/ISSUE_TEMPLATE/4-feature-request.md +++ b/.github/ISSUE_TEMPLATE/4-feature-request.md @@ -12,7 +12,7 @@ assignees: Josee9988 Oh hi there! πŸ˜„ To expedite issue processing please search open and closed issues before submitting a new one. -Please read our Rules of Conduct at: this repository `.github/CODE_OF_CONDUCT.md` +Please read our Rules of Conduct at: this repository's `.github/CODE_OF_CONDUCT.md` πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›--> From b42a166a8afc3139a8aeb0674a5dc4448d43c099 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sun, 6 Sep 2020 15:50:05 +0200 Subject: [PATCH 012/152] "created security report template" --- .github/CODE_OF_CONDUCT.md | 16 +-- .github/ISSUE_TEMPLATE.md | 11 +-- .github/ISSUE_TEMPLATE/1-bug-report.md | 4 +- .github/ISSUE_TEMPLATE/2-failing-test.md | 2 +- .github/ISSUE_TEMPLATE/3-docs-bug.md | 2 +- .github/ISSUE_TEMPLATE/4-feature-request.md | 4 +- .github/ISSUE_TEMPLATE/5-security-report.md | 99 +++++++++++++++++++ .../pull_request_template.md | 2 +- 8 files changed, 115 insertions(+), 25 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/5-security-report.md diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 4d072cd..1624413 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -3,7 +3,7 @@ ## Our Pledge In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and +contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal @@ -11,7 +11,7 @@ appearance, race, religion, or sexual identity and orientation. ## Our Standards -Examples of behavior that contributes to creating a positive environment +Examples of behaviour that contributes to creating a positive environment include: * Using welcoming and inclusive language @@ -20,7 +20,7 @@ include: * Focusing on what is best for the community * Showing empathy towards other community members -Examples of unacceptable behavior by participants include: +Examples of unacceptable behaviour by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances @@ -34,13 +34,13 @@ Examples of unacceptable behavior by participants include: ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. +behaviour and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behaviour. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, +permanently any contributor for other behaviours that they deem inappropriate, threatening, offensive, or harmful. ## Scope @@ -48,13 +48,13 @@ threatening, offensive, or harmful. This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed +address, posting via an official social media account or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be +Instances of abusive, harassing or otherwise unacceptable behaviour may be reported by contacting the project team at jgracia9988@gmail.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 08ccfd0..ebaf1c9 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,12 +1,3 @@ ---- -name: "" -about: "" -title: "" -labels: toLabel -assignees: Josee9988 - ---- - diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md index de3f2bb..901b165 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.md +++ b/.github/ISSUE_TEMPLATE/1-bug-report.md @@ -1,5 +1,5 @@ --- -name: "🐞 Bug report" +name: "🐞 Bug Report" about: "Report an issue to help the project improve." title: "" labels: bug @@ -12,7 +12,7 @@ assignees: Josee9988 Oh hi there! πŸ˜„ To expedite issue processing please search open and closed issues before submitting a new one. -Please read our Rules of Conduct at: this repository's `.github/CODE_OF_CONDUCT.md` +Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.md` πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›--> diff --git a/.github/ISSUE_TEMPLATE/2-failing-test.md b/.github/ISSUE_TEMPLATE/2-failing-test.md index 8e6a513..57ff92a 100644 --- a/.github/ISSUE_TEMPLATE/2-failing-test.md +++ b/.github/ISSUE_TEMPLATE/2-failing-test.md @@ -11,7 +11,7 @@ assignees: Josee9988 Oh hi there! πŸ˜„ To expedite issue processing please search open and closed issues before submitting a new one. -Please read our Rules of Conduct at: this repository's `.github/CODE_OF_CONDUCT.md` +Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.md` πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›--> diff --git a/.github/ISSUE_TEMPLATE/3-docs-bug.md b/.github/ISSUE_TEMPLATE/3-docs-bug.md index 8e1c749..433157d 100644 --- a/.github/ISSUE_TEMPLATE/3-docs-bug.md +++ b/.github/ISSUE_TEMPLATE/3-docs-bug.md @@ -12,7 +12,7 @@ assignees: Josee9988 Oh hi there! πŸ˜„ To expedite issue processing please search open and closed issues before submitting a new one. -Please read our Rules of Conduct at: this repository's `.github/CODE_OF_CONDUCT.md` +Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.md` πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›--> diff --git a/.github/ISSUE_TEMPLATE/4-feature-request.md b/.github/ISSUE_TEMPLATE/4-feature-request.md index 89edf22..ba2ec3d 100644 --- a/.github/ISSUE_TEMPLATE/4-feature-request.md +++ b/.github/ISSUE_TEMPLATE/4-feature-request.md @@ -1,5 +1,5 @@ --- -name: "πŸš€ Feature request" +name: "πŸš€ Feature Request" about: "Suggest an idea or possible enhancement for this project." title: "" labels: enhancement @@ -12,7 +12,7 @@ assignees: Josee9988 Oh hi there! πŸ˜„ To expedite issue processing please search open and closed issues before submitting a new one. -Please read our Rules of Conduct at: this repository's `.github/CODE_OF_CONDUCT.md` +Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.md` πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›--> diff --git a/.github/ISSUE_TEMPLATE/5-security-report.md b/.github/ISSUE_TEMPLATE/5-security-report.md new file mode 100644 index 0000000..4c2dbfe --- /dev/null +++ b/.github/ISSUE_TEMPLATE/5-security-report.md @@ -0,0 +1,99 @@ +--- +name: "⚠️ Security Report" +about: "Report an issue to help the project improve." +title: "" +labels: bug, security +assignees: Josee9988 + +--- + + + +# **⚠️ Security Report** + +## **Describe the security issue** + + +* + +--- + +### **To Reproduce** + + + + + +1. +2. +3. +4. + +--- + +### **Expected behaviour** + + +* + +--- + +### **Media prove** + + +--- + +### **Your environment** + + + + * OS: + * Node version: + * Npm version: + * Browser name and version: + +--- + +### **Additional context** + + +* diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md index 703daeb..bb43e7c 100644 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -13,7 +13,7 @@ For more information on closing issues using keywords please check https://docs. From 33139d87bb07930125322e99b3974b087464e453 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sun, 6 Sep 2020 16:01:41 +0200 Subject: [PATCH 013/152] "added question support" --- .github/ISSUE_TEMPLATE/6-question-support.md | 28 ++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/6-question-support.md diff --git a/.github/ISSUE_TEMPLATE/6-question-support.md b/.github/ISSUE_TEMPLATE/6-question-support.md new file mode 100644 index 0000000..612ff8f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/6-question-support.md @@ -0,0 +1,28 @@ +--- +name: "❓ Question or Support Request" +about: "Questions and requests for support." +title: "" +labels: question +assignees: Josee9988 + +--- + + + +# **❓ Question or Support Request** + +## **Describe your question or ask for support.** + + +* From d630e1cfda2c410bc81a13b4544f115d3fb0efcf Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sun, 6 Sep 2020 16:08:51 +0200 Subject: [PATCH 014/152] "added security.md file" --- .github/ISSUE_TEMPLATE/5-security-report.md | 2 ++ .github/SECURITY.md | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 .github/SECURITY.md diff --git a/.github/ISSUE_TEMPLATE/5-security-report.md b/.github/ISSUE_TEMPLATE/5-security-report.md index 4c2dbfe..15b2fc0 100644 --- a/.github/ISSUE_TEMPLATE/5-security-report.md +++ b/.github/ISSUE_TEMPLATE/5-security-report.md @@ -14,6 +14,8 @@ Oh hi there! πŸ˜„ To expedite issue processing please search open and closed issues before submitting a new one. Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.md` +FIRST OF ALL, read this project's SECURITY.md file. Located in `.github/SECURITY.md`. + READ CAREFULLY IF YOUR ISSUE REPORT CONTAINS SENSIBLE OR PRIVATE DATA: (data that might be leaked or subtracted from our servers due to this security issue). diff --git a/.github/SECURITY.md b/.github/SECURITY.md new file mode 100644 index 0000000..ac1fa3a --- /dev/null +++ b/.github/SECURITY.md @@ -0,0 +1,13 @@ +# **Reporting Security Issues** + +The project's team and community take security issues. + +We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions. + +To report a security issue, go to the project's issues and create a new issue using the ⚠️ Security Report``issue template. + +Read carefully the instructions of this issue template, and if your report could leak data or might expose +how to gain access to a restricted area or break the system, +please email [jgracia9988@gmail.com](mailto:jgracia9988@gmail.com) and include the word "SECURITY" in the subject line. + +We'll endeavor to respond quickly, and will keep you updated throughout the process. From 339a8066f92307001ddeb45132dc134916a37cdc Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sun, 6 Sep 2020 16:24:16 +0200 Subject: [PATCH 015/152] "added contributing and support files" --- .github/CONTRIBUTING.md | 23 +++++++++++++++++++++++ .github/SUPPORT.md | 12 ++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .github/CONTRIBUTING.md create mode 100644 .github/SUPPORT.md diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..492de11 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,23 @@ +# **Contributing** + +When contributing to this repository, please first discuss the change you wish to make via issue, +email, or any other method with the owners of this repository before making a change. + +Please note we have a [code of conduct](CODE_OF_CONDUCT.md), please follow it in all your interactions with the project. + +## Pull Request Process + +1. Ensure any install or build dependencies are removed before the end of the layer when doing a + build. +2. Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports useful file locations and container parameters. +3. Increase the version numbers in any examples files, and the README.md to the new version that this + Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). +4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you + do not have permission to do that you may request the second reviewer to merge it for you. + +## Issue Report Process + +1. Go to the project's issues. +2. Select the template that better fits your issue. +3. Read carefully the instructions and write within the template guidelines. +4. Submit it and wait for support. diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md new file mode 100644 index 0000000..581fc01 --- /dev/null +++ b/.github/SUPPORT.md @@ -0,0 +1,12 @@ +# **Support** + +## Obtain direct support from the project's owners. + +1. Open a new issue and select the issue with the template called "❓ Question or Support Request". +2. Read carefully the instructions of written in that template and submit the issue asking for support +or asking any question. + +## Bug reports + +See the [contributing guidelines](CONTRIBUTING.md) for sharing bug reports and read our [code of conduct](CODE_OF_CONDUCT.md). + From b337fabab9d8a29df4f88e5ecf6cd3e631d452e7 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sun, 6 Sep 2020 20:26:21 +0200 Subject: [PATCH 016/152] added a decent readme.md file --- README.md | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..c42f909 --- /dev/null +++ b/README.md @@ -0,0 +1,80 @@ +# **Github Project Template** + +## **What is this repository?** + +* This template, can be used as a base layer for any of your future repositories/projects. +* All the markdown follows [markdownlint rules](https://github.com/DavidAnson/markdownlint). +* Learn more with the [official Github guide on creating repositories from a template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). + +## **What does it include?** + +1. A `.gitignore` ignoring Jetbrains and VSCode IDE's folders and Linux files. +1. A README.md file that should be deleted or modified with your own README.md. +1. A fully customized `.github` folder with: + 1. A [funding](/.github/FUNDING.yml) to display a sponsor button. [Learn more with the Github guide](https://docs.github.com/en/github/administering-a-repository/displaying-a-sponsor-button-in-your-repository) + 1. A [issue_label_bot.yaml](/.github/issue_label_bot.yaml) to use the popular github bot. [Activate it or check its documentation](https://github.com/marketplace/issue-label-bot). + 1. A [CONTRIBUTING](/.github/CONTRIBUTING.md) explaining how to contribute to the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/setting-guidelines-for-repository-contributors). + 1. A [SUPPORT](/.github/SUPPORT.md) explaining how to support the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-support-resources-to-your-project). + 1. A [SECURITY](/.github/SECURITY.md) with a guide on how to post a security issue. [Learn more with the Github guide](https://docs.github.com/es/github/managing-security-vulnerabilities/adding-a-security-policy-to-your-repository). + 1. A [CODE_OF_CONDUCT](/.github/CODE_OF_CONDUCT.md) with a basic code of conduct. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-a-code-of-conduct-to-your-project). + 1. A [PULL_REQUEST_TEMPLATE](/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md) with a template for your pull request that closes issues with keywords. [Learn more with the Github guide](https://docs.github.com/es/github/building-a-strong-community/creating-a-pull-request-template-for-your-repository). + 1. Multiple [issues templates](/.github/ISSUE_TEMPLATE) . [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository). + 1. A [config.yml](/.github/ISSUE_TEMPLATE/config.yml) with the config and information about the issue templates. + 1. A [Blank issue template](/.github/ISSUE_TEMPLATE) with the super basic stuff all the issues should contain. + 1. A [Bug issue template](/.github/ISSUE_TEMPLATE/1-bug-report.md). + 1. A [Failing test issue template](/.github/ISSUE_TEMPLATE/2-failing-test.md). + 1. A [Documentation issue template](/.github/ISSUE_TEMPLATE/3-docs-bug.md). + 1. A [Feature request issue template](/.github/ISSUE_TEMPLATE/4-feature-request.md). + 1. A [Security report issue template](/.github/ISSUE_TEMPLATE/5-security-report.md). + 1. A [Question or support issue template](/.github/ISSUE_TEMPLATE/6-question-support.md). + +--- + +## **Project tree** + +`plain +. +β”œβ”€β”€ .github +β”‚Β Β  β”œβ”€β”€ CODE_OF_CONDUCT.md +β”‚Β Β  β”œβ”€β”€ CONTRIBUTING.md +β”‚Β Β  β”œβ”€β”€ FUNDING.yml +β”‚Β Β  β”œβ”€β”€ issue_label_bot.yaml +β”‚Β Β  β”œβ”€β”€ ISSUE_TEMPLATE +β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 1-bug-report.md +β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 2-failing-test.md +β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 3-docs-bug.md +β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 4-feature-request.md +β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 5-security-report.md +β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 6-question-support.md +β”‚Β Β  β”‚Β Β  └── config.yml +β”‚Β Β  β”œβ”€β”€ ISSUE_TEMPLATE.md +β”‚Β Β  β”œβ”€β”€ PULL_REQUEST_TEMPLATE +β”‚Β Β  β”‚Β Β  └── pull_request_template.md +β”‚Β Β  β”œβ”€β”€ SECURITY.md +β”‚Β Β  └── SUPPORT.md +β”œβ”€β”€ .gitignore +β”œβ”€β”€ README.md +└── tree + └── README.md + +4 directories, 18 files +` + +--- + +## **How to use it as a template for my new repos?** + +1. To create a new repository from this template [generate your new repository from this template](https://github.com/Josee9988/project-template/generate) +for more information or guidance follow the [github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). +2. **Review** every single file and **modify** it with your data customizing it as you like. +3. Build your project. + +* _Customize every file, and replace the usernames and emails with your own, this would take less than a couple of minutes_ + +--- + +> ⚠️Remember that this template should be reviewed and modified to fit your requirements. +> There are files that reference my username (Josee9988) and my email (jgracia9988@gmail.com), +> these should be changed with your own personal username and email.⚠️ + +_Made with a lot of ❀️❀️ by **[@Josee9988](https://github.com/Josee9988)**_ From 7d65beda722a9826a7f4fb2774a2315ecd2d86aa Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sun, 6 Sep 2020 20:37:01 +0200 Subject: [PATCH 017/152] "added screenshots to the readme.md file" --- README.md | 50 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index c42f909..d681a0b 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ ## **What is this repository?** * This template, can be used as a base layer for any of your future repositories/projects. +* Make your project easy to maintain with **7 issue templates**. * All the markdown follows [markdownlint rules](https://github.com/DavidAnson/markdownlint). * Learn more with the [official Github guide on creating repositories from a template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). @@ -20,7 +21,7 @@ 1. A [PULL_REQUEST_TEMPLATE](/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md) with a template for your pull request that closes issues with keywords. [Learn more with the Github guide](https://docs.github.com/es/github/building-a-strong-community/creating-a-pull-request-template-for-your-repository). 1. Multiple [issues templates](/.github/ISSUE_TEMPLATE) . [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository). 1. A [config.yml](/.github/ISSUE_TEMPLATE/config.yml) with the config and information about the issue templates. - 1. A [Blank issue template](/.github/ISSUE_TEMPLATE) with the super basic stuff all the issues should contain. + 1. A [Blank issue template](/.github/ISSUE_TEMPLATE) with the super basic stuff, all the issues should contain. 1. A [Bug issue template](/.github/ISSUE_TEMPLATE/1-bug-report.md). 1. A [Failing test issue template](/.github/ISSUE_TEMPLATE/2-failing-test.md). 1. A [Documentation issue template](/.github/ISSUE_TEMPLATE/3-docs-bug.md). @@ -30,9 +31,41 @@ --- +## **How to use it as a template for my new repos?** + +1. To create a new repository from this template [generate your new repository from this template](https://github.com/Josee9988/project-template/generate) +for more information or guidance follow the [github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). +2. **Review** every single file and **modify** it with your data customizing it as you like. +3. Build your project. + +* _Customize every file, and replace the usernames and emails with your own, this would take less than a couple of minutes_ + +--- + +## **Screenshots** + +A couple of screenshots to delight you before you use this template. + +*. All the issue templates. +

+ All the issue templates. +

+ +*. An issue template opened. +

+ Bug issue template opened. +

+ +* Security policy +

+ Security issue. +

+ +--- + ## **Project tree** -`plain +```text . β”œβ”€β”€ .github β”‚Β Β  β”œβ”€β”€ CODE_OF_CONDUCT.md @@ -58,18 +91,7 @@ └── README.md 4 directories, 18 files -` - ---- - -## **How to use it as a template for my new repos?** - -1. To create a new repository from this template [generate your new repository from this template](https://github.com/Josee9988/project-template/generate) -for more information or guidance follow the [github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). -2. **Review** every single file and **modify** it with your data customizing it as you like. -3. Build your project. - -* _Customize every file, and replace the usernames and emails with your own, this would take less than a couple of minutes_ +``` --- From b555b5738e91c0931fb8a00b3027d06b867a49a1 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sun, 6 Sep 2020 20:40:09 +0200 Subject: [PATCH 018/152] "markdownlint improvements" --- .github/CONTRIBUTING.md | 6 +++--- .github/ISSUE_TEMPLATE.md | 12 ++++++------ .github/ISSUE_TEMPLATE/1-bug-report.md | 14 +++++++------- .github/ISSUE_TEMPLATE/2-failing-test.md | 4 ++-- .github/ISSUE_TEMPLATE/3-docs-bug.md | 4 ++-- .github/ISSUE_TEMPLATE/4-feature-request.md | 4 ++-- .github/ISSUE_TEMPLATE/5-security-report.md | 15 +++++++-------- .github/ISSUE_TEMPLATE/6-question-support.md | 2 +- .../pull_request_template.md | 2 +- .github/SUPPORT.md | 3 +-- README.md | 6 +++--- 11 files changed, 35 insertions(+), 37 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 492de11..83aaf7c 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -7,12 +7,12 @@ Please note we have a [code of conduct](CODE_OF_CONDUCT.md), please follow it in ## Pull Request Process -1. Ensure any install or build dependencies are removed before the end of the layer when doing a +1. Ensure any install or build dependencies are removed before the end of the layer when doing a build. 2. Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports useful file locations and container parameters. 3. Increase the version numbers in any examples files, and the README.md to the new version that this Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). -4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you +4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that you may request the second reviewer to merge it for you. ## Issue Report Process @@ -20,4 +20,4 @@ Please note we have a [code of conduct](CODE_OF_CONDUCT.md), please follow it in 1. Go to the project's issues. 2. Select the template that better fits your issue. 3. Read carefully the instructions and write within the template guidelines. -4. Submit it and wait for support. +4. Submit it and wait for support. diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index ebaf1c9..66082c4 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -14,7 +14,7 @@ Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.m ## **Describe the issue** -* +* --- @@ -28,14 +28,14 @@ Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.m - * OS: - * Node version: - * Npm version: - * Browser name and version: +* OS: +* Node version: +* Npm version: +* Browser name and version: --- ### **Additional context** -* +* diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md index 901b165..1d52f7f 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.md +++ b/.github/ISSUE_TEMPLATE/1-bug-report.md @@ -21,7 +21,7 @@ Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.m ## **Describe the bug** -* +* --- @@ -52,7 +52,7 @@ Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.m ### **Expected behaviour** -* +* --- @@ -66,14 +66,14 @@ Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.m - * OS: - * Node version: - * Npm version: - * Browser name and version: +* OS: +* Node version: +* Npm version: +* Browser name and version: --- ### **Additional context** -* +* diff --git a/.github/ISSUE_TEMPLATE/2-failing-test.md b/.github/ISSUE_TEMPLATE/2-failing-test.md index 57ff92a..bcdc961 100644 --- a/.github/ISSUE_TEMPLATE/2-failing-test.md +++ b/.github/ISSUE_TEMPLATE/2-failing-test.md @@ -20,7 +20,7 @@ Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.m ## **Which jobs/test(s) are failing**: -* +* --- @@ -37,4 +37,4 @@ Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.m ### **Additional context** -* +* diff --git a/.github/ISSUE_TEMPLATE/3-docs-bug.md b/.github/ISSUE_TEMPLATE/3-docs-bug.md index 433157d..fc412ea 100644 --- a/.github/ISSUE_TEMPLATE/3-docs-bug.md +++ b/.github/ISSUE_TEMPLATE/3-docs-bug.md @@ -21,7 +21,7 @@ Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.m ## **Describe the bug** -* +* --- @@ -58,4 +58,4 @@ Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.m ### **Additional context** -* +* diff --git a/.github/ISSUE_TEMPLATE/4-feature-request.md b/.github/ISSUE_TEMPLATE/4-feature-request.md index ba2ec3d..12d8d36 100644 --- a/.github/ISSUE_TEMPLATE/4-feature-request.md +++ b/.github/ISSUE_TEMPLATE/4-feature-request.md @@ -21,7 +21,7 @@ Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.m ## **Is your feature request related to a problem? Please describe.** -* +* --- @@ -42,4 +42,4 @@ Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.m ### **Additional context** -* +* diff --git a/.github/ISSUE_TEMPLATE/5-security-report.md b/.github/ISSUE_TEMPLATE/5-security-report.md index 15b2fc0..e37f3a2 100644 --- a/.github/ISSUE_TEMPLATE/5-security-report.md +++ b/.github/ISSUE_TEMPLATE/5-security-report.md @@ -41,7 +41,6 @@ The data that must NOT be posted here: * Information about political or religious affiliations * Information about race, ethnicity, sexual orientation, gender, or other identifying information that could be used for discriminatory purposes - πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›πŸ“›--> # **⚠️ Security Report** @@ -49,7 +48,7 @@ The data that must NOT be posted here: ## **Describe the security issue** -* +* --- @@ -74,7 +73,7 @@ The data that must NOT be posted here: ### **Expected behaviour** -* +* --- @@ -88,14 +87,14 @@ The data that must NOT be posted here: - * OS: - * Node version: - * Npm version: - * Browser name and version: +* OS: +* Node version: +* Npm version: +* Browser name and version: --- ### **Additional context** -* +* diff --git a/.github/ISSUE_TEMPLATE/6-question-support.md b/.github/ISSUE_TEMPLATE/6-question-support.md index 612ff8f..5bdd44c 100644 --- a/.github/ISSUE_TEMPLATE/6-question-support.md +++ b/.github/ISSUE_TEMPLATE/6-question-support.md @@ -25,4 +25,4 @@ Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.m ## **Describe your question or ask for support.** -* +* diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md index bb43e7c..f2800f3 100644 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md @@ -45,4 +45,4 @@ List any dependencies that are required for this change if there are any. -* +* diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md index 581fc01..a158031 100644 --- a/.github/SUPPORT.md +++ b/.github/SUPPORT.md @@ -1,6 +1,6 @@ # **Support** -## Obtain direct support from the project's owners. +## Obtain direct support from the project's owners 1. Open a new issue and select the issue with the template called "❓ Question or Support Request". 2. Read carefully the instructions of written in that template and submit the issue asking for support @@ -9,4 +9,3 @@ or asking any question. ## Bug reports See the [contributing guidelines](CONTRIBUTING.md) for sharing bug reports and read our [code of conduct](CODE_OF_CONDUCT.md). - diff --git a/README.md b/README.md index d681a0b..23062ef 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ --- -## **How to use it as a template for my new repos?** +## **How to use it as a template for my new repositories?** 1. To create a new repository from this template [generate your new repository from this template](https://github.com/Josee9988/project-template/generate) for more information or guidance follow the [github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). @@ -46,12 +46,12 @@ for more information or guidance follow the [github guide](https://docs.github.c A couple of screenshots to delight you before you use this template. -*. All the issue templates. +* All the issue templates.

All the issue templates.

-*. An issue template opened. +* An issue template opened.

Bug issue template opened.

From 9b4bde3dde7753601136904bb9269b08f7b2cd8b Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Mon, 7 Sep 2020 11:52:18 +0200 Subject: [PATCH 019/152] "shell script prepared" --- EXECUTEME.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 EXECUTEME.sh diff --git a/EXECUTEME.sh b/EXECUTEME.sh new file mode 100644 index 0000000..fea210a --- /dev/null +++ b/EXECUTEME.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# prompt for the username and email +read -p "Enter your username (without '@'): " NEW_USERNAME +read -p "Enter your email: " NEW_EMAIL + +# confirm that the data is correct +read -p "Is this data correct: username \"$NEW_USERNAME\", email: \"$NEW_EMAIL\" (y/n)?" choice +case "$choice" in + y|Y ) + echo "yes" + ;; + n|N ) exit 0;; + * ) echo "Invalid option";; +esac + + From c4c4793871f03e0075422f3e2c0b1c8843c32482 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Mon, 7 Sep 2020 11:55:23 +0200 Subject: [PATCH 020/152] replacer done --- EXECUTEME.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EXECUTEME.sh b/EXECUTEME.sh index fea210a..9e6e9bc 100644 --- a/EXECUTEME.sh +++ b/EXECUTEME.sh @@ -8,7 +8,9 @@ read -p "Enter your email: " NEW_EMAIL read -p "Is this data correct: username \"$NEW_USERNAME\", email: \"$NEW_EMAIL\" (y/n)?" choice case "$choice" in y|Y ) - echo "yes" + # replace the username and email + find .github/ -type f -name "*.md" -print0 | xargs -0 sed -i "s/Josee9988/${NEW_USERNAME}/g" + find .github/ -type f -name "*.md" -print0 | xargs -0 sed -i "s/jgracia9988@gmail.com/${NEW_EMAIL}/g" ;; n|N ) exit 0;; * ) echo "Invalid option";; From 794aefa131c8c3edf0ab1b03a975a092b0901e70 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Mon, 7 Sep 2020 11:56:36 +0200 Subject: [PATCH 021/152] bake the script look for all extension file types --- EXECUTEME.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EXECUTEME.sh b/EXECUTEME.sh index 9e6e9bc..0607f6a 100644 --- a/EXECUTEME.sh +++ b/EXECUTEME.sh @@ -9,8 +9,8 @@ read -p "Is this data correct: username \"$NEW_USERNAME\", email: \"$NEW_EMAIL\" case "$choice" in y|Y ) # replace the username and email - find .github/ -type f -name "*.md" -print0 | xargs -0 sed -i "s/Josee9988/${NEW_USERNAME}/g" - find .github/ -type f -name "*.md" -print0 | xargs -0 sed -i "s/jgracia9988@gmail.com/${NEW_EMAIL}/g" + find .github/ -type f -name "*" -print0 | xargs -0 sed -i "s/Josee9988/${NEW_USERNAME}/g" + find .github/ -type f -name "*" -print0 | xargs -0 sed -i "s/jgracia9988@gmail.com/${NEW_EMAIL}/g" ;; n|N ) exit 0;; * ) echo "Invalid option";; From 86eef2896397af8c65c1b9b838f1f9b2dc02a3d2 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Mon, 7 Sep 2020 16:29:25 +0200 Subject: [PATCH 022/152] "shell script tested and working" --- EXECUTEME.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/EXECUTEME.sh b/EXECUTEME.sh index 0607f6a..46868d4 100644 --- a/EXECUTEME.sh +++ b/EXECUTEME.sh @@ -11,6 +11,13 @@ case "$choice" in # replace the username and email find .github/ -type f -name "*" -print0 | xargs -0 sed -i "s/Josee9988/${NEW_USERNAME}/g" find .github/ -type f -name "*" -print0 | xargs -0 sed -i "s/jgracia9988@gmail.com/${NEW_EMAIL}/g" + + # delete the README.md and create one with just a header + echo "# **${NEW_USERNAME}'s project**" > README.md + echo "" >> README.md + + # self remove this script + rm -- "$0" ;; n|N ) exit 0;; * ) echo "Invalid option";; From ff115ea0a7c286db01ff2d07dee1ff23dbde9c89 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Mon, 7 Sep 2020 16:39:12 +0200 Subject: [PATCH 023/152] "updated the readme.md to fit the new script" --- README.md | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 23062ef..112d7bd 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,13 @@ ## **What does it include?** -1. A `.gitignore` ignoring Jetbrains and VSCode IDE's folders and Linux files. -1. A README.md file that should be deleted or modified with your own README.md. +1. An **`EXECUTEME.sh`** script that **MUST be executed right when you clone your repository**. +The script will replace Jose's username and email (the author) with yours. +It will also remove all the content from the README.md and will auto remove itself (the script). +1. A `.gitignore` ignoring Jetbrains/Intellij and VSCode IDE's folders and Linux files. +1. A README.md file that its content will be erased when you run the `EXECUTEME.sh` script. 1. A fully customized `.github` folder with: - 1. A [funding](/.github/FUNDING.yml) to display a sponsor button. [Learn more with the Github guide](https://docs.github.com/en/github/administering-a-repository/displaying-a-sponsor-button-in-your-repository) + 1. A [funding](/.github/FUNDING.yml) to display a sponsor button (should be manually modified). [Learn more with the Github guide](https://docs.github.com/en/github/administering-a-repository/displaying-a-sponsor-button-in-your-repository) 1. A [issue_label_bot.yaml](/.github/issue_label_bot.yaml) to use the popular github bot. [Activate it or check its documentation](https://github.com/marketplace/issue-label-bot). 1. A [CONTRIBUTING](/.github/CONTRIBUTING.md) explaining how to contribute to the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/setting-guidelines-for-repository-contributors). 1. A [SUPPORT](/.github/SUPPORT.md) explaining how to support the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-support-resources-to-your-project). @@ -35,8 +38,10 @@ 1. To create a new repository from this template [generate your new repository from this template](https://github.com/Josee9988/project-template/generate) for more information or guidance follow the [github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). -2. **Review** every single file and **modify** it with your data customizing it as you like. -3. Build your project. +2. Execute the `EXECUTEME.sh` shell script to replace the author's username and email with yours. +Use `bash EXECUTEME.sh` or `./EXECUTEME.sh`. (Manually modify the `.github/funding.yml`, this file will still contain author's data). +3. **Review** every single file and **customize** it as you like. +4. Build your project. * _Customize every file, and replace the usernames and emails with your own, this would take less than a couple of minutes_ @@ -67,6 +72,7 @@ A couple of screenshots to delight you before you use this template. ```text . +β”œβ”€β”€ EXECUTEME.sh β”œβ”€β”€ .github β”‚Β Β  β”œβ”€β”€ CODE_OF_CONDUCT.md β”‚Β Β  β”œβ”€β”€ CONTRIBUTING.md @@ -86,17 +92,15 @@ A couple of screenshots to delight you before you use this template. β”‚Β Β  β”œβ”€β”€ SECURITY.md β”‚Β Β  └── SUPPORT.md β”œβ”€β”€ .gitignore -β”œβ”€β”€ README.md -└── tree - └── README.md +└── README.md -4 directories, 18 files +3 directories, 18 files ``` --- > ⚠️Remember that this template should be reviewed and modified to fit your requirements. -> There are files that reference my username (Josee9988) and my email (jgracia9988@gmail.com), -> these should be changed with your own personal username and email.⚠️ +> The script **EXECUTEME.sh** should be executed right when you clone your new repository. +> There will be files that will need manual revision (such as the funding.yml)⚠️ _Made with a lot of ❀️❀️ by **[@Josee9988](https://github.com/Josee9988)**_ From c9073e412d1f60dc3ef063c6bf62ccbba592a476 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Tue, 8 Sep 2020 08:30:44 +0200 Subject: [PATCH 024/152] "added a changelog for the template" --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..837e605 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,14 @@ +# **Change Log** πŸ“œπŸ“ + +All notable changes to the "**Project template**" repository will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +--- + +## [**1.0.0**] - 2020-09-08 + +### Added + +* Added a CHANGELOG.md. +* Support for the CHANGELOG in the EXECUTEME.sh file (when run, it will remove all of the content and create a new from scratch). From 879655b2f173acf7cd550f4e9832bf21c28fa50c Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Tue, 8 Sep 2020 08:48:45 +0200 Subject: [PATCH 025/152] "shell scripts rewrites the CHANGELOG" --- EXECUTEME.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/EXECUTEME.sh b/EXECUTEME.sh index 46868d4..0246bf6 100644 --- a/EXECUTEME.sh +++ b/EXECUTEME.sh @@ -1,8 +1,12 @@ #!/bin/bash +ACTUAL_DATE=$(date '+%Y-%m-%d') + # prompt for the username and email read -p "Enter your username (without '@'): " NEW_USERNAME read -p "Enter your email: " NEW_EMAIL +read -p "Enter the name of the project: " PROJECT_NAME +read -p "Enter what is your project (program/extension/API/web/CLI tool/backend/frontend/scrapper/automation tool/etc): " PROJECT_TYPE # confirm that the data is correct read -p "Is this data correct: username \"$NEW_USERNAME\", email: \"$NEW_EMAIL\" (y/n)?" choice @@ -16,6 +20,15 @@ case "$choice" in echo "# **${NEW_USERNAME}'s project**" > README.md echo "" >> README.md + # write the basic structure of the CHANGELOG.md + echo -e "# **Change Log** πŸ“œπŸ“\n" > CHANGELOG.md + echo -e "All notable changes to the \"**${PROJECT_NAME}**\" ${PROJECT_TYPE} will be documented in this file.\n" >> CHANGELOG.md + echo -e "The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n" >> CHANGELOG.md + echo -e "---\n\n## [**0.0.1**] - ${ACTUAL_DATE}\n\n### Added\n" >> CHANGELOG.md + echo -e "* The basic project structure of [josee9988's](https://github.com/Josee9988) [project template](https://github.com/Josee9988/project-template)." >> CHANGELOG.md + echo -e "* A basic \`.gitignore\` file ignoring some linux files and IDE trash files." >> CHANGELOG.md + echo -e "* A \`.github/\` folder with issue templates, code of conduct, a contributing guide, pull request template security advisory file, a funding and support file and an issue label bot file." >> CHANGELOG.md + # self remove this script rm -- "$0" ;; From 07f7a14d72144fc185004a03b19b1703c3d457e3 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Tue, 8 Sep 2020 08:58:00 +0200 Subject: [PATCH 026/152] "updated the readme.md file to explain the new changelog changes" --- README.md | 88 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 48 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 112d7bd..89b0e4c 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,38 @@ -# **Github Project Template** +# **Josee9988's Github Project Template** -## **What is this repository?** +## **What is this template?** * This template, can be used as a base layer for any of your future repositories/projects. * Make your project easy to maintain with **7 issue templates**. -* All the markdown follows [markdownlint rules](https://github.com/DavidAnson/markdownlint). +* Make your _community healthier_ with all the guides like code of conduct, contributing, support, security... * Learn more with the [official Github guide on creating repositories from a template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). +* To start using it; "**[click use this template](https://github.com/Josee9988/project-template/generate)**", create your new repository, +clone your new repository and execute the `EXECUTEME.sh` shell script to personalize the markdowns with your personal details. +* All the markdown follows [MarkdownLint rules](https://github.com/DavidAnson/markdownlint). + +--- + +## **How to use it as a template for my new repositories?** + +1. To create a new repository from this template [generate your new repository from this template](https://github.com/Josee9988/project-template/generate) +for more information or guidance follow the [github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). +2. Execute the `EXECUTEME.sh` shell script to replace the author's username and email with yours. +Use `bash EXECUTEME.sh` or `./EXECUTEME.sh`. (Manually modify the `.github/funding.yml`, this file will still contain the author's data). +3. **Review** every single file and **customize** it as you like. +4. Build your project. + +⚠️ _Customize every file, and replace the usernames and emails with your own, this would take less than a couple of minutes._ ⚠️ + +--- ## **What does it include?** 1. An **`EXECUTEME.sh`** script that **MUST be executed right when you clone your repository**. The script will replace Jose's username and email (the author) with yours. -It will also remove all the content from the README.md and will auto remove itself (the script). +It will remove all the content from the CHANGELOG.md and write the basic structure for you to write your own. +The script will also remove all the content from the README.md and will auto remove itself (the script). 1. A `.gitignore` ignoring Jetbrains/Intellij and VSCode IDE's folders and Linux files. +1. A CHANGELOG.md file that the `EXECUTEME.sh` script will remove to let you write your own. 1. A README.md file that its content will be erased when you run the `EXECUTEME.sh` script. 1. A fully customized `.github` folder with: 1. A [funding](/.github/FUNDING.yml) to display a sponsor button (should be manually modified). [Learn more with the Github guide](https://docs.github.com/en/github/administering-a-repository/displaying-a-sponsor-button-in-your-repository) @@ -34,44 +54,11 @@ It will also remove all the content from the README.md and will auto remove itse --- -## **How to use it as a template for my new repositories?** - -1. To create a new repository from this template [generate your new repository from this template](https://github.com/Josee9988/project-template/generate) -for more information or guidance follow the [github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). -2. Execute the `EXECUTEME.sh` shell script to replace the author's username and email with yours. -Use `bash EXECUTEME.sh` or `./EXECUTEME.sh`. (Manually modify the `.github/funding.yml`, this file will still contain author's data). -3. **Review** every single file and **customize** it as you like. -4. Build your project. - -* _Customize every file, and replace the usernames and emails with your own, this would take less than a couple of minutes_ - ---- - -## **Screenshots** - -A couple of screenshots to delight you before you use this template. - -* All the issue templates. -

- All the issue templates. -

- -* An issue template opened. -

- Bug issue template opened. -

- -* Security policy -

- Security issue. -

- ---- - -## **Project tree** +### **Project tree** ```text . +β”œβ”€β”€ CHANGELOG.md β”œβ”€β”€ EXECUTEME.sh β”œβ”€β”€ .github β”‚Β Β  β”œβ”€β”€ CODE_OF_CONDUCT.md @@ -94,11 +81,32 @@ A couple of screenshots to delight you before you use this template. β”œβ”€β”€ .gitignore └── README.md -3 directories, 18 files +3 directories, 19 files ``` --- +## **Screenshots** + +A couple of screenshots to delight you before you use this template. + +* All the issue templates. +

+ All the issue templates. +

+ +* An issue template opened. +

+ Bug issue template opened. +

+ +* Security policy +

+ Security issue. +

+ +--- + > ⚠️Remember that this template should be reviewed and modified to fit your requirements. > The script **EXECUTEME.sh** should be executed right when you clone your new repository. > There will be files that will need manual revision (such as the funding.yml)⚠️ From 4ca1c79137ddfe57c5cfd9c0492eee7ba24de4ab Mon Sep 17 00:00:00 2001 From: Jose Gracia Berenguer Date: Tue, 8 Sep 2020 16:42:19 +0200 Subject: [PATCH 027/152] Create LICENSE --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..97d7d26 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Jose Gracia Berenguer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 95a90381af0fe80a997f08b2a1c9345df77be344 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Tue, 8 Sep 2020 16:47:57 +0200 Subject: [PATCH 028/152] "v1.0.1 added a license for the project, that will be removed when the script is executed" --- .../pull_request_template.md | 0 CHANGELOG.md | 10 ++++++++++ EXECUTEME.sh | 3 +++ README.md | 7 ++++--- 4 files changed, 17 insertions(+), 3 deletions(-) rename .github/{PULL_REQUEST_TEMPLATE => }/pull_request_template.md (100%) diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/pull_request_template.md similarity index 100% rename from .github/PULL_REQUEST_TEMPLATE/pull_request_template.md rename to .github/pull_request_template.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 837e605..45a79f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.0.1**] - 2020-09-08 + +### Added + +* A LICENSE for the project that will be removed with the EXECUTEME.sh script. + +### Changed + +* The location of the pull request template to the .github/ folder. + ## [**1.0.0**] - 2020-09-08 ### Added diff --git a/EXECUTEME.sh b/EXECUTEME.sh index 0246bf6..7be033d 100644 --- a/EXECUTEME.sh +++ b/EXECUTEME.sh @@ -16,6 +16,9 @@ case "$choice" in find .github/ -type f -name "*" -print0 | xargs -0 sed -i "s/Josee9988/${NEW_USERNAME}/g" find .github/ -type f -name "*" -print0 | xargs -0 sed -i "s/jgracia9988@gmail.com/${NEW_EMAIL}/g" + # remove the license + rm LICENSE + # delete the README.md and create one with just a header echo "# **${NEW_USERNAME}'s project**" > README.md echo "" >> README.md diff --git a/README.md b/README.md index 89b0e4c..23990d9 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,9 @@ Use `bash EXECUTEME.sh` or `./EXECUTEME.sh`. (Manually modify the `.github/fundi 1. An **`EXECUTEME.sh`** script that **MUST be executed right when you clone your repository**. The script will replace Jose's username and email (the author) with yours. -It will remove all the content from the CHANGELOG.md and write the basic structure for you to write your own. -The script will also remove all the content from the README.md and will auto remove itself (the script). +It will remove all the _content_ from the CHANGELOG.md and write the basic structure for you to write your own. +The script will also remove all the _content_ from the README.md, will remove the LICENSE to let you freely choose your own +and will auto remove itself (the script). 1. A `.gitignore` ignoring Jetbrains/Intellij and VSCode IDE's folders and Linux files. 1. A CHANGELOG.md file that the `EXECUTEME.sh` script will remove to let you write your own. 1. A README.md file that its content will be erased when you run the `EXECUTEME.sh` script. @@ -41,7 +42,7 @@ The script will also remove all the content from the README.md and will auto rem 1. A [SUPPORT](/.github/SUPPORT.md) explaining how to support the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-support-resources-to-your-project). 1. A [SECURITY](/.github/SECURITY.md) with a guide on how to post a security issue. [Learn more with the Github guide](https://docs.github.com/es/github/managing-security-vulnerabilities/adding-a-security-policy-to-your-repository). 1. A [CODE_OF_CONDUCT](/.github/CODE_OF_CONDUCT.md) with a basic code of conduct. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-a-code-of-conduct-to-your-project). - 1. A [PULL_REQUEST_TEMPLATE](/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md) with a template for your pull request that closes issues with keywords. [Learn more with the Github guide](https://docs.github.com/es/github/building-a-strong-community/creating-a-pull-request-template-for-your-repository). + 1. A [PULL_REQUEST_TEMPLATE](/.github/pull_request_template.md) with a template for your pull request that closes issues with keywords. [Learn more with the Github guide](https://docs.github.com/es/github/building-a-strong-community/creating-a-pull-request-template-for-your-repository). 1. Multiple [issues templates](/.github/ISSUE_TEMPLATE) . [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository). 1. A [config.yml](/.github/ISSUE_TEMPLATE/config.yml) with the config and information about the issue templates. 1. A [Blank issue template](/.github/ISSUE_TEMPLATE) with the super basic stuff, all the issues should contain. From 9d17a51aa8ced6af66cae0f48bfff78d3c144b41 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Tue, 8 Sep 2020 17:01:42 +0200 Subject: [PATCH 029/152] "1.0.2 documented the script and added an extra screenshot in the README.md" --- CHANGELOG.md | 11 +++++++++++ EXECUTEME.sh | 25 +++++++++++++++++++++++-- README.md | 19 +++++++++++++++---- 3 files changed, 49 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45a79f8..c3d4438 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.0.2**] - 2020-09-08 + +### Added + +* One more screenshot to the README.md file showing the community profile. +* Documentation for the EXECUTEME.sh script. + +### Changed + +* The project tree view showing the new LICENSE file. + ## [**1.0.1**] - 2020-09-08 ### Added diff --git a/EXECUTEME.sh b/EXECUTEME.sh index 7be033d..4a74cc2 100644 --- a/EXECUTEME.sh +++ b/EXECUTEME.sh @@ -1,5 +1,28 @@ #!/bin/bash +#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# +# SCRIPT: EXECUTEME.sh +# USAGE: bash EXECUTEME.sh | ./EXECUTEME.sh +# PURPOSE: Shell script that prompts the user for their GitHub username, email name of their project and +# the type of project that it is. Then it will replace the author's (josee9988) username and email +# with the new ones (the user that is using this template). It will fully remove the LICENSE file, +# delete all of the content of the README.md file, and add a simple header, +# delete all of the content of the CHANGELOG.md and add a basic CHANGELOG versioning and 1st version, +# then this script will auto remove itself, to leave the new project without this file (EXECUTEME.sh). +# TITLE: EXECUTEME.sh +# AUTHOR: Jose Gracia +# VERSION: 1.0.0 +# NOTES: This script will auto remove itself, and in case of wanting to run it again, the user must download +# it again or do a 'git stash' and revert the changes. +# BASH_VERSION: 5.0.17(1)-release +# LICENSE: see in ../LICENSE (project root) or https://github.com/Josee9988/project-template/blob/master/LICENSE +# GITHUB: https://github.com/Josee9988/ +# REPOSITORY: https://github.com/Josee9988/project-template +# ISSUES: https://github.com/Josee9988/project-template/issues +# MAIL: jgracia9988@gmail.com +#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# + +# get the date. ACTUAL_DATE=$(date '+%Y-%m-%d') # prompt for the username and email @@ -38,5 +61,3 @@ case "$choice" in n|N ) exit 0;; * ) echo "Invalid option";; esac - - diff --git a/README.md b/README.md index 23990d9..ed44101 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Use `bash EXECUTEME.sh` or `./EXECUTEME.sh`. (Manually modify the `.github/fundi 3. **Review** every single file and **customize** it as you like. 4. Build your project. -⚠️ _Customize every file, and replace the usernames and emails with your own, this would take less than a couple of minutes._ ⚠️ +⚠️ _Customize every file to fit your requirements, make sure to fully change the funding.yml file._ ⚠️ --- @@ -75,14 +75,14 @@ and will auto remove itself (the script). β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 6-question-support.md β”‚Β Β  β”‚Β Β  └── config.yml β”‚Β Β  β”œβ”€β”€ ISSUE_TEMPLATE.md -β”‚Β Β  β”œβ”€β”€ PULL_REQUEST_TEMPLATE -β”‚Β Β  β”‚Β Β  └── pull_request_template.md +β”‚Β Β  β”œβ”€β”€ pull_request_template.md β”‚Β Β  β”œβ”€β”€ SECURITY.md β”‚Β Β  └── SUPPORT.md β”œβ”€β”€ .gitignore +β”œβ”€β”€ LICENSE (will get removed) └── README.md -3 directories, 19 files +2 directories, 20 files ``` --- @@ -106,8 +106,19 @@ A couple of screenshots to delight you before you use this template. Security issue.

+* Community profile at 100% +

+ Community profile. +

+ + --- +For the right maintenance of the CHANGELOG we recommend this [VSCode extension](https://github.com/Josee9988/Changelog-and-Markdown-snippets) +and the read and understanding of the [keep a changelog guide](https://keepachangelog.com/en/1.0.0/). + +Enjoy! + > ⚠️Remember that this template should be reviewed and modified to fit your requirements. > The script **EXECUTEME.sh** should be executed right when you clone your new repository. > There will be files that will need manual revision (such as the funding.yml)⚠️ From 7607a1b546f715558244fe3e7f7589a1a08214dd Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Tue, 23 Feb 2021 11:51:20 +0100 Subject: [PATCH 030/152] "1.0.3 check if the github directory exists and removed funding links" --- CHANGELOG.md | 10 ++++++++++ EXECUTEME.sh | 39 +++++++++++++++++++++++++-------------- 2 files changed, 35 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3d4438..c970095 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.0.3**] - 2021-02-23 + +### Removed + +* Josee's funding links. + +### Added + +* Shell script now checks if the .github directory exists. + ## [**1.0.2**] - 2020-09-08 ### Added diff --git a/EXECUTEME.sh b/EXECUTEME.sh index 4a74cc2..6e7172d 100644 --- a/EXECUTEME.sh +++ b/EXECUTEME.sh @@ -11,7 +11,7 @@ # then this script will auto remove itself, to leave the new project without this file (EXECUTEME.sh). # TITLE: EXECUTEME.sh # AUTHOR: Jose Gracia -# VERSION: 1.0.0 +# VERSION: 1.0.3 # NOTES: This script will auto remove itself, and in case of wanting to run it again, the user must download # it again or do a 'git stash' and revert the changes. # BASH_VERSION: 5.0.17(1)-release @@ -25,6 +25,12 @@ # get the date. ACTUAL_DATE=$(date '+%Y-%m-%d') +### Check if a directory does not exist ### +if [ ! -d ".github/" ]; then + echo "Directory .github/ DOES NOT EXIST." + exit 1 # die with error code 1 +fi + # prompt for the username and email read -p "Enter your username (without '@'): " NEW_USERNAME read -p "Enter your email: " NEW_EMAIL @@ -32,9 +38,9 @@ read -p "Enter the name of the project: " PROJECT_NAME read -p "Enter what is your project (program/extension/API/web/CLI tool/backend/frontend/scrapper/automation tool/etc): " PROJECT_TYPE # confirm that the data is correct -read -p "Is this data correct: username \"$NEW_USERNAME\", email: \"$NEW_EMAIL\" (y/n)?" choice +read -p "Is this data correct: username \"$NEW_USERNAME\", email: \"$NEW_EMAIL\", project name: \"$PROJECT_NAME\", of type: \"$PROJECT_TYPE\" (y/n)?" choice case "$choice" in - y|Y ) +y | Y) # replace the username and email find .github/ -type f -name "*" -print0 | xargs -0 sed -i "s/Josee9988/${NEW_USERNAME}/g" find .github/ -type f -name "*" -print0 | xargs -0 sed -i "s/jgracia9988@gmail.com/${NEW_EMAIL}/g" @@ -43,21 +49,26 @@ case "$choice" in rm LICENSE # delete the README.md and create one with just a header - echo "# **${NEW_USERNAME}'s project**" > README.md - echo "" >> README.md + echo "# **${NEW_USERNAME}'s project**" >README.md + echo "" >>README.md # write the basic structure of the CHANGELOG.md - echo -e "# **Change Log** πŸ“œπŸ“\n" > CHANGELOG.md - echo -e "All notable changes to the \"**${PROJECT_NAME}**\" ${PROJECT_TYPE} will be documented in this file.\n" >> CHANGELOG.md - echo -e "The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n" >> CHANGELOG.md - echo -e "---\n\n## [**0.0.1**] - ${ACTUAL_DATE}\n\n### Added\n" >> CHANGELOG.md - echo -e "* The basic project structure of [josee9988's](https://github.com/Josee9988) [project template](https://github.com/Josee9988/project-template)." >> CHANGELOG.md - echo -e "* A basic \`.gitignore\` file ignoring some linux files and IDE trash files." >> CHANGELOG.md - echo -e "* A \`.github/\` folder with issue templates, code of conduct, a contributing guide, pull request template security advisory file, a funding and support file and an issue label bot file." >> CHANGELOG.md + echo -e "# **Change Log** πŸ“œπŸ“\n" >CHANGELOG.md + echo -e "All notable changes to the \"**${PROJECT_NAME}**\" ${PROJECT_TYPE} will be documented in this file.\n" >>CHANGELOG.md + echo -e "The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n" >>CHANGELOG.md + echo -e "---\n\n## [**0.0.1**] - ${ACTUAL_DATE}\n\n### Added\n" >>CHANGELOG.md + echo -e "* The basic project structure of [josee9988's](https://github.com/Josee9988) [project template](https://github.com/Josee9988/project-template)." >>CHANGELOG.md + echo -e "* A basic \`.gitignore\` file ignoring some linux files and IDE trash files." >>CHANGELOG.md + echo -e "* A \`.github/\` folder with issue templates, code of conduct, a contributing guide, pull request template security advisory file, a funding and support file and an issue label bot file." >>CHANGELOG.md + + # remove jose's custom funding links + echo -e "# add your own funding links" >.gitub/FUNDING.yml + + echo -e "Remember to review every file and customize it as you like.\nYou are ready to start your brand new awesome project." # self remove this script rm -- "$0" ;; - n|N ) exit 0;; - * ) echo "Invalid option";; +n | N) exit 0 ;; +*) echo "Invalid option" ;; esac From d0da25fe3f724e213d8eb3759d9664b1067faaa0 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Tue, 23 Feb 2021 11:59:01 +0100 Subject: [PATCH 031/152] "improved readme.md file" --- EXECUTEME.sh | 2 +- README.md | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/EXECUTEME.sh b/EXECUTEME.sh index 6e7172d..f47f1ae 100644 --- a/EXECUTEME.sh +++ b/EXECUTEME.sh @@ -64,7 +64,7 @@ y | Y) # remove jose's custom funding links echo -e "# add your own funding links" >.gitub/FUNDING.yml - echo -e "Remember to review every file and customize it as you like.\nYou are ready to start your brand new awesome project." + echo -e "Remember to review every file and customize it as you like.\nYou are ready to start your brand new awesome projectπŸš€πŸš€." # self remove this script rm -- "$0" diff --git a/README.md b/README.md index ed44101..cb97846 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ # **Josee9988's Github Project Template** -## **What is this template?** +## **What is this template all about?** * This template, can be used as a base layer for any of your future repositories/projects. * Make your project easy to maintain with **7 issue templates**. * Make your _community healthier_ with all the guides like code of conduct, contributing, support, security... * Learn more with the [official Github guide on creating repositories from a template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). * To start using it; "**[click use this template](https://github.com/Josee9988/project-template/generate)**", create your new repository, -clone your new repository and execute the `EXECUTEME.sh` shell script to personalize the markdowns with your personal details. +clone your new repository and execute the `EXECUTEME.sh` shell script to personalize the markdowns with your private details. * All the markdown follows [MarkdownLint rules](https://github.com/DavidAnson/markdownlint). --- @@ -16,12 +16,18 @@ clone your new repository and execute the `EXECUTEME.sh` shell script to persona 1. To create a new repository from this template [generate your new repository from this template](https://github.com/Josee9988/project-template/generate) for more information or guidance follow the [github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). -2. Execute the `EXECUTEME.sh` shell script to replace the author's username and email with yours. -Use `bash EXECUTEME.sh` or `./EXECUTEME.sh`. (Manually modify the `.github/funding.yml`, this file will still contain the author's data). -3. **Review** every single file and **customize** it as you like. -4. Build your project. +2. Clone your repo and cd into it. +3. Execute the `EXECUTEME.sh` shell script to customize the files with your data. + Use `bash EXECUTEME.sh` or `./EXECUTEME.sh`. -⚠️ _Customize every file to fit your requirements, make sure to fully change the funding.yml file._ ⚠️ + ```bash + bash EXECUTEME.sh # execute the setup script. + ``` + +4. **Review** every single file and **customize** it as you like. +5. Build your project. πŸš€ + +⚠️ _Customize every file to fit your requirements_ ⚠️ --- @@ -111,7 +117,6 @@ A couple of screenshots to delight you before you use this template. Community profile.

- --- For the right maintenance of the CHANGELOG we recommend this [VSCode extension](https://github.com/Josee9988/Changelog-and-Markdown-snippets) From 5d886a9948f936fad1d0f5152aab62dbeb130191 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Tue, 23 Feb 2021 14:14:11 +0100 Subject: [PATCH 032/152] "fixed typo" --- EXECUTEME.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXECUTEME.sh b/EXECUTEME.sh index f47f1ae..ba5ce61 100644 --- a/EXECUTEME.sh +++ b/EXECUTEME.sh @@ -62,7 +62,7 @@ y | Y) echo -e "* A \`.github/\` folder with issue templates, code of conduct, a contributing guide, pull request template security advisory file, a funding and support file and an issue label bot file." >>CHANGELOG.md # remove jose's custom funding links - echo -e "# add your own funding links" >.gitub/FUNDING.yml + echo -e "# add your own funding links" >.github/FUNDING.yml echo -e "Remember to review every file and customize it as you like.\nYou are ready to start your brand new awesome projectπŸš€πŸš€." From 85650a9891cc303cda02a739e7cf059b5eeb5f05 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Wed, 24 Feb 2021 13:11:24 +0100 Subject: [PATCH 033/152] "added gitignore basic comment" --- .gitignore | 4 ++++ EXECUTEME.sh | 1 + 2 files changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index ef11ff1..fcf6472 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,7 @@ .history # End of https://www.toptal.com/developers/gitignore/api/linux,visualstudiocode + +###> Josee9988/project-template ### + +###< Josee9988/project-template ### diff --git a/EXECUTEME.sh b/EXECUTEME.sh index ba5ce61..e7313c4 100644 --- a/EXECUTEME.sh +++ b/EXECUTEME.sh @@ -44,6 +44,7 @@ y | Y) # replace the username and email find .github/ -type f -name "*" -print0 | xargs -0 sed -i "s/Josee9988/${NEW_USERNAME}/g" find .github/ -type f -name "*" -print0 | xargs -0 sed -i "s/jgracia9988@gmail.com/${NEW_EMAIL}/g" + find .gitignore -type f -name "*" -print0 | xargs -0 sed -i "s/Josee9988\/project-template/${NEW_USERNAME}\/${PROJECT_NAME}/g" # remove the license rm LICENSE From 4f8dd4e16d2fabae8ea3bac945257f1a77c4544f Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 26 Feb 2021 10:33:09 +0100 Subject: [PATCH 034/152] "1.0.4 added markdownlint disable rule" --- CHANGELOG.md | 7 +++++++ EXECUTEME.sh | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c970095..b4d580c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ + # **Change Log** πŸ“œπŸ“ All notable changes to the "**Project template**" repository will be documented in this file. @@ -6,6 +7,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.0.4**] - 2021-02-26 + +### Added + +* Markdownlint disable rule in the CHANGELOG.md file" + ## [**1.0.3**] - 2021-02-23 ### Removed diff --git a/EXECUTEME.sh b/EXECUTEME.sh index e7313c4..51654c1 100644 --- a/EXECUTEME.sh +++ b/EXECUTEME.sh @@ -50,11 +50,11 @@ y | Y) rm LICENSE # delete the README.md and create one with just a header - echo "# **${NEW_USERNAME}'s project**" >README.md + echo -e "# **${NEW_USERNAME}'s project**" >README.md echo "" >>README.md # write the basic structure of the CHANGELOG.md - echo -e "# **Change Log** πŸ“œπŸ“\n" >CHANGELOG.md + echo -e "\n# **Change Log** πŸ“œπŸ“\n" >CHANGELOG.md echo -e "All notable changes to the \"**${PROJECT_NAME}**\" ${PROJECT_TYPE} will be documented in this file.\n" >>CHANGELOG.md echo -e "The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n" >>CHANGELOG.md echo -e "---\n\n## [**0.0.1**] - ${ACTUAL_DATE}\n\n### Added\n" >>CHANGELOG.md From 719a4e279ce4dd367c5e7f42dc37deb7b5d178b5 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 26 Feb 2021 10:33:58 +0100 Subject: [PATCH 035/152] "added markdownlint rule to project's readme.md" --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index cb97846..cbaca02 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ + # **Josee9988's Github Project Template** ## **What is this template all about?** From c7b4e44dbc77a494707afc0055d5a4b8f3810ee8 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 13 Mar 2021 10:52:32 +0100 Subject: [PATCH 036/152] "the script now checks if the root files exist" --- EXECUTEME.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/EXECUTEME.sh b/EXECUTEME.sh index 51654c1..5ae1233 100644 --- a/EXECUTEME.sh +++ b/EXECUTEME.sh @@ -22,13 +22,25 @@ # MAIL: jgracia9988@gmail.com #~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# -# get the date. ACTUAL_DATE=$(date '+%Y-%m-%d') +RED='\033[1;31m' +NC='\033[0m' # No Color +UPurple='\033[4;35m' -### Check if a directory does not exist ### +### Check if the .github directory does exist ### if [ ! -d ".github/" ]; then - echo "Directory .github/ DOES NOT EXIST." - exit 1 # die with error code 1 + echo -e "${RED}Directory .github/ DOES NOT EXIST.${NC}" + exit 1 # exit with error code 1 +fi + +### Checks if the root giles exist ### +if [ ! -f "CHANGELOG.md" ] || [ ! -f "README.md" ] || [ ! -f ".gitignore" ]; then + echo -e "${RED}There are files missing. Have you modified the repository before executing this command?${NC}" + echo -e "${RED}The script couldn't found one or many of these files${NC}: '${UPurple}CHANGELOG.md${NC}', '${UPurple}README.md${NC}' or '${UPurple}.gitignore${NC}'.\n" + echo -e "You should try to 'git stash' your changes and execute this script from the project root again, or clone again the repository without any changes.\n" + echo -e "For more information visit: ${UPurple}https://github.com/Josee9988/project-template${NC}" + echo -e "If you think this may be an issue please post it at: ${UPurple}https://github.com/Josee9988/project-template/issues${NC}" + exit 1 # exit with error code 1 fi # prompt for the username and email @@ -73,3 +85,5 @@ y | Y) n | N) exit 0 ;; *) echo "Invalid option" ;; esac + +exit 2 # if the option is invalid From 1cdd37a46cb9bf3ab8db188c1714ee6f75b817b3 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 13 Mar 2021 11:02:02 +0100 Subject: [PATCH 037/152] "colorized the output" --- EXECUTEME.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/EXECUTEME.sh b/EXECUTEME.sh index 5ae1233..39a4f98 100644 --- a/EXECUTEME.sh +++ b/EXECUTEME.sh @@ -26,6 +26,8 @@ ACTUAL_DATE=$(date '+%Y-%m-%d') RED='\033[1;31m' NC='\033[0m' # No Color UPurple='\033[4;35m' +BBLUE='\033[1;34m' +GREEN='\033[1;32m' ### Check if the .github directory does exist ### if [ ! -d ".github/" ]; then @@ -43,14 +45,14 @@ if [ ! -f "CHANGELOG.md" ] || [ ! -f "README.md" ] || [ ! -f ".gitignore" ]; the exit 1 # exit with error code 1 fi -# prompt for the username and email -read -p "Enter your username (without '@'): " NEW_USERNAME -read -p "Enter your email: " NEW_EMAIL -read -p "Enter the name of the project: " PROJECT_NAME -read -p "Enter what is your project (program/extension/API/web/CLI tool/backend/frontend/scrapper/automation tool/etc): " PROJECT_TYPE +# prompt for the username, mail and name of the project +read -p "Enter your $(echo -e "$BBLUE""username""$NC") (without '@'): " NEW_USERNAME +read -p "Enter your $(echo -e "$BBLUE""email""$NC"): " NEW_EMAIL +read -p "Enter the $(echo -e "$BBLUE""name of the project""$NC"): " PROJECT_NAME +read -p "Enter $(echo -e "$BBLUE""what your project is""$NC") (program/extension/API/web/CLI tool/backend/frontend/scrapper/automation tool/etc): " PROJECT_TYPE # confirm that the data is correct -read -p "Is this data correct: username \"$NEW_USERNAME\", email: \"$NEW_EMAIL\", project name: \"$PROJECT_NAME\", of type: \"$PROJECT_TYPE\" (y/n)?" choice +read -p "Is this data correct: username \"$(echo -e "$GREEN""$NEW_USERNAME""$NC")\", email: \"$(echo -e "$GREEN""$NEW_EMAIL""$NC")\", project name: \"$(echo -e "$GREEN""$PROJECT_NAME""$NC")\", of type: \"$(echo -e "$GREEN""$PROJECT_TYPE""$NC")\" (y/n)? " choice case "$choice" in y | Y) # replace the username and email @@ -82,8 +84,8 @@ y | Y) # self remove this script rm -- "$0" ;; -n | N) exit 0 ;; -*) echo "Invalid option" ;; +n | N) echo "Then try it again!" ;; +*) echo -e "${RED}Invalid option${NC}" ;; esac -exit 2 # if the option is invalid +exit 0 From 3bcbae46616e3d5af065f123b42aa07ec007ce33 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 13 Mar 2021 11:02:52 +0100 Subject: [PATCH 038/152] "updated changelog" --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4d580c..3b0197a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.0.5**] - 2021-03-13 + +### Added + +* Checks to the shell script (check if the files exist) +* Colorized the output of the script. + ## [**1.0.4**] - 2021-02-26 ### Added From abd5a6b8bcd11ebf0b353b8cbb62b7743d632ebf Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 13 Mar 2021 11:08:53 +0100 Subject: [PATCH 039/152] "added video of the execution of the script" --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cbaca02..002fdf4 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ * Make your _community healthier_ with all the guides like code of conduct, contributing, support, security... * Learn more with the [official Github guide on creating repositories from a template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). * To start using it; "**[click use this template](https://github.com/Josee9988/project-template/generate)**", create your new repository, -clone your new repository and execute the `EXECUTEME.sh` shell script to personalize the markdowns with your private details. +clone your new repository and execute the `EXECUTEME.sh` shell script to personalize the markdowns with your private details. Check how to execute it [here](https://asciinema.org/a/398761). * All the markdown follows [MarkdownLint rules](https://github.com/DavidAnson/markdownlint). --- @@ -19,12 +19,15 @@ clone your new repository and execute the `EXECUTEME.sh` shell script to persona for more information or guidance follow the [github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). 2. Clone your repo and cd into it. 3. Execute the `EXECUTEME.sh` shell script to customize the files with your data. + Use `bash EXECUTEME.sh` or `./EXECUTEME.sh`. ```bash bash EXECUTEME.sh # execute the setup script. ``` + Aditionally watch *[this video](https://asciinema.org/a/398761)* to see **how to execute the script**. + 4. **Review** every single file and **customize** it as you like. 5. Build your project. πŸš€ From 56b0d40de9da0f0b0f5cff09e6b23b3aaa54ef6f Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sun, 14 Mar 2021 13:48:21 +0100 Subject: [PATCH 040/152] "fixed some typos" --- .gitignore | 39 ++------------------------------------- CHANGELOG.md | 2 +- EXECUTEME.sh | 4 ++-- README.md | 2 +- 4 files changed, 6 insertions(+), 41 deletions(-) diff --git a/.gitignore b/.gitignore index fcf6472..4556ab6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,39 +1,4 @@ -# Created by https://www.toptal.com/developers/gitignore/api/linux,visualstudiocode,jetbrains -# Edit at https://www.toptal.com/developers/gitignore?templates=linux,visualstudiocode,jetbrains - -### JetBrains ### - -.idea/ - -### Linux ### -*~ - -# temporary files which can be created if a process still has a handle open of a deleted file -.fuse_hidden* - -# KDE directory preferences -.directory - -# Linux trash folder which might appear on any partition or disk -.Trash-* - -# .nfs files are created when an open file is removed but is still being accessed -.nfs* - -### VisualStudioCode ### -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -### VisualStudioCode Patch ### -# Ignore all local history of files -.history - -# End of https://www.toptal.com/developers/gitignore/api/linux,visualstudiocode - ###> Josee9988/project-template ### - +.vscode/ +.idea/ ###< Josee9988/project-template ### diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b0197a..44ec8ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,4 +56,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Added * Added a CHANGELOG.md. -* Support for the CHANGELOG in the EXECUTEME.sh file (when run, it will remove all of the content and create a new from scratch). +* Support for the CHANGELOG in the EXECUTEME.sh file (when run, it will remove all of the content and create a new file from scratch). diff --git a/EXECUTEME.sh b/EXECUTEME.sh index 39a4f98..d0cbc4c 100644 --- a/EXECUTEME.sh +++ b/EXECUTEME.sh @@ -35,7 +35,7 @@ if [ ! -d ".github/" ]; then exit 1 # exit with error code 1 fi -### Checks if the root giles exist ### +### Checks if the root files exist ### if [ ! -f "CHANGELOG.md" ] || [ ! -f "README.md" ] || [ ! -f ".gitignore" ]; then echo -e "${RED}There are files missing. Have you modified the repository before executing this command?${NC}" echo -e "${RED}The script couldn't found one or many of these files${NC}: '${UPurple}CHANGELOG.md${NC}', '${UPurple}README.md${NC}' or '${UPurple}.gitignore${NC}'.\n" @@ -76,7 +76,7 @@ y | Y) echo -e "* A basic \`.gitignore\` file ignoring some linux files and IDE trash files." >>CHANGELOG.md echo -e "* A \`.github/\` folder with issue templates, code of conduct, a contributing guide, pull request template security advisory file, a funding and support file and an issue label bot file." >>CHANGELOG.md - # remove jose's custom funding links + # remove author's custom funding links echo -e "# add your own funding links" >.github/FUNDING.yml echo -e "Remember to review every file and customize it as you like.\nYou are ready to start your brand new awesome projectπŸš€πŸš€." diff --git a/README.md b/README.md index 002fdf4..c8aa993 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ A couple of screenshots to delight you before you use this template. --- -For the right maintenance of the CHANGELOG we recommend this [VSCode extension](https://github.com/Josee9988/Changelog-and-Markdown-snippets) +For the right maintenance of the CHANGELOG.md, we recommend this [VSCode extension](https://github.com/Josee9988/Changelog-and-Markdown-snippets) and the read and understanding of the [keep a changelog guide](https://keepachangelog.com/en/1.0.0/). Enjoy! From fffbfebb5c3147a97f895949be416a1ababda107 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Tue, 16 Mar 2021 10:41:07 +0100 Subject: [PATCH 041/152] "simplified PR template" --- .github/pull_request_template.md | 45 ++++++++++++++------------------ CHANGELOG.md | 6 +++++ 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f2800f3..f768058 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,48 +1,41 @@ -# **This pull request fixes # issue** +# **Name of PR** - + ## **Description** -* +* --- ### **Type of change** - + -* [ ] **Bug fix** (non-breaking change which fixes an issue). -* [ ] **Enhancement** (non-breaking change which adds functionality). -* [ ] **Breaking change** (fix or feature that would cause existing functionality to not work as expected). -* [ ] This change requires a documentation update. -* [ ] Other. +* [] **Bug fix** (non-breaking change which fixes an issue). +* [] **Enhancement** (non-breaking change which adds functionality). +* [] **Breaking change** (fix or feature that would cause existing functionality to not work as expected). +* [] This change requires a documentation update. +* [] Other. --- -### **Checklist** - -* [ ] My code follows the style guidelines of this project. -* [ ] I have commented my code, particularly in hard-to-understand areas. -* [ ] I have made corresponding changes to the documentation. -* [ ] My changes generate no new warnings or errors. -* [ ] New (if you add any feature you should add tests to prove that your feature works) and existing unit tests pass locally with my changes (*test/*). - ### **Additional context** -* +* + + diff --git a/CHANGELOG.md b/CHANGELOG.md index 44ec8ca..ba6fdb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.0.6**] - 2021-03-16 + +### Changed + +* Simplified PR template to make it easier. + ## [**1.0.5**] - 2021-03-13 ### Added From 7a6b079c25310d3181e388ac070e0bb8dfe51210 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Tue, 16 Mar 2021 20:35:12 +0100 Subject: [PATCH 042/152] "1.0.7 fixed some typos" --- .github/CODE_OF_CONDUCT.md | 2 +- .github/CONTRIBUTING.md | 2 +- .github/ISSUE_TEMPLATE/1-bug-report.md | 2 +- .github/SECURITY.md | 4 ++-- CHANGELOG.md | 6 ++++++ EXECUTEME.sh | 2 +- README.md | 2 +- 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 1624413..b60dfc1 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -58,7 +58,7 @@ Instances of abusive, harassing or otherwise unacceptable behaviour may be reported by contacting the project team at jgracia9988@gmail.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. +obligated to maintain confidentiality concerning the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 83aaf7c..dbd4ce7 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -10,7 +10,7 @@ Please note we have a [code of conduct](CODE_OF_CONDUCT.md), please follow it in 1. Ensure any install or build dependencies are removed before the end of the layer when doing a build. 2. Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports useful file locations and container parameters. -3. Increase the version numbers in any examples files, and the README.md to the new version that this +3. Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). 4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that you may request the second reviewer to merge it for you. diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md index 1d52f7f..13ca699 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.md +++ b/.github/ISSUE_TEMPLATE/1-bug-report.md @@ -26,7 +26,7 @@ Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.m --- ### **Is this a regression?** - + --- diff --git a/.github/SECURITY.md b/.github/SECURITY.md index ac1fa3a..30a193d 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -2,7 +2,7 @@ The project's team and community take security issues. -We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions. +We appreciate your efforts to responsibly disclose your findings and will make every effort to acknowledge your contributions. To report a security issue, go to the project's issues and create a new issue using the ⚠️ Security Report``issue template. @@ -10,4 +10,4 @@ Read carefully the instructions of this issue template, and if your report could how to gain access to a restricted area or break the system, please email [jgracia9988@gmail.com](mailto:jgracia9988@gmail.com) and include the word "SECURITY" in the subject line. -We'll endeavor to respond quickly, and will keep you updated throughout the process. +We'll endeavour to respond quickly, and will keep you updated throughout the process. diff --git a/CHANGELOG.md b/CHANGELOG.md index ba6fdb4..c47a698 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.0.7**] - 2021-03-16 + +### Fixed + +* Some minnor typos + ## [**1.0.6**] - 2021-03-16 ### Changed diff --git a/EXECUTEME.sh b/EXECUTEME.sh index d0cbc4c..c205ca0 100644 --- a/EXECUTEME.sh +++ b/EXECUTEME.sh @@ -11,7 +11,7 @@ # then this script will auto remove itself, to leave the new project without this file (EXECUTEME.sh). # TITLE: EXECUTEME.sh # AUTHOR: Jose Gracia -# VERSION: 1.0.3 +# VERSION: See in CHANGELOG.md # NOTES: This script will auto remove itself, and in case of wanting to run it again, the user must download # it again or do a 'git stash' and revert the changes. # BASH_VERSION: 5.0.17(1)-release diff --git a/README.md b/README.md index c8aa993..5f14429 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,6 @@ Enjoy! > ⚠️Remember that this template should be reviewed and modified to fit your requirements. > The script **EXECUTEME.sh** should be executed right when you clone your new repository. -> There will be files that will need manual revision (such as the funding.yml)⚠️ +> There will be files that will need manual revision⚠️ _Made with a lot of ❀️❀️ by **[@Josee9988](https://github.com/Josee9988)**_ From 838bfb5218908ebeb306fd46000ab416e780db82 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Wed, 17 Mar 2021 09:06:53 +0100 Subject: [PATCH 043/152] "1.0.8 improved readme structure and documentation" --- CHANGELOG.md | 10 ++++++++++ README.md | 44 +++++++++++++++++++++++++++++--------------- 2 files changed, 39 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c47a698..b07f0ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.0.8**] - 2021-03-17 + +### Changed + +* Improved README.md structure and fixed some typos. + +### Added + +* 'Extra recommendations' section in the README.md file. + ## [**1.0.7**] - 2021-03-16 ### Fixed diff --git a/README.md b/README.md index 5f14429..faa4133 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # **Josee9988's Github Project Template** -## **What is this template all about?** +## **What is this template all about?** πŸ”₯ -* This template, can be used as a base layer for any of your future repositories/projects. +* This template can be used as a base layer for any of your future repositories/projects. * Make your project easy to maintain with **7 issue templates**. * Make your _community healthier_ with all the guides like code of conduct, contributing, support, security... * Learn more with the [official Github guide on creating repositories from a template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). @@ -13,10 +13,10 @@ clone your new repository and execute the `EXECUTEME.sh` shell script to persona --- -## **How to use it as a template for my new repositories?** +## **How to use it as a template for my new repositories?** πŸš€ 1. To create a new repository from this template [generate your new repository from this template](https://github.com/Josee9988/project-template/generate) -for more information or guidance follow the [github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). +for more information or guidance follow the [Github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). 2. Clone your repo and cd into it. 3. Execute the `EXECUTEME.sh` shell script to customize the files with your data. @@ -26,7 +26,7 @@ for more information or guidance follow the [github guide](https://docs.github.c bash EXECUTEME.sh # execute the setup script. ``` - Aditionally watch *[this video](https://asciinema.org/a/398761)* to see **how to execute the script**. + Additionally watch *[this video](https://asciinema.org/a/398761)* to see **how to execute the script**. 4. **Review** every single file and **customize** it as you like. 5. Build your project. πŸš€ @@ -35,25 +35,24 @@ for more information or guidance follow the [github guide](https://docs.github.c --- -## **What does it include?** +## **What does it include?** πŸ“š 1. An **`EXECUTEME.sh`** script that **MUST be executed right when you clone your repository**. The script will replace Jose's username and email (the author) with yours. It will remove all the _content_ from the CHANGELOG.md and write the basic structure for you to write your own. -The script will also remove all the _content_ from the README.md, will remove the LICENSE to let you freely choose your own -and will auto remove itself (the script). +The script will also remove all the _content_ from the README.md, and it will remove the `LICENSE` file to let you freely choose your own and will auto remove itself (the script). 1. A `.gitignore` ignoring Jetbrains/Intellij and VSCode IDE's folders and Linux files. 1. A CHANGELOG.md file that the `EXECUTEME.sh` script will remove to let you write your own. 1. A README.md file that its content will be erased when you run the `EXECUTEME.sh` script. 1. A fully customized `.github` folder with: - 1. A [funding](/.github/FUNDING.yml) to display a sponsor button (should be manually modified). [Learn more with the Github guide](https://docs.github.com/en/github/administering-a-repository/displaying-a-sponsor-button-in-your-repository) - 1. A [issue_label_bot.yaml](/.github/issue_label_bot.yaml) to use the popular github bot. [Activate it or check its documentation](https://github.com/marketplace/issue-label-bot). + 1. A [funding](/.github/FUNDING.yml) section to display a sponsor button (should be manually modified). [Learn more with the Github guide](https://docs.github.com/en/github/administering-a-repository/displaying-a-sponsor-button-in-your-repository) + 1. A [issue_label_bot.yaml](/.github/issue_label_bot.yaml) file to use the popular Github bot. [Activate it or check its documentation](https://github.com/marketplace/issue-label-bot). 1. A [CONTRIBUTING](/.github/CONTRIBUTING.md) explaining how to contribute to the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/setting-guidelines-for-repository-contributors). 1. A [SUPPORT](/.github/SUPPORT.md) explaining how to support the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-support-resources-to-your-project). 1. A [SECURITY](/.github/SECURITY.md) with a guide on how to post a security issue. [Learn more with the Github guide](https://docs.github.com/es/github/managing-security-vulnerabilities/adding-a-security-policy-to-your-repository). 1. A [CODE_OF_CONDUCT](/.github/CODE_OF_CONDUCT.md) with a basic code of conduct. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-a-code-of-conduct-to-your-project). 1. A [PULL_REQUEST_TEMPLATE](/.github/pull_request_template.md) with a template for your pull request that closes issues with keywords. [Learn more with the Github guide](https://docs.github.com/es/github/building-a-strong-community/creating-a-pull-request-template-for-your-repository). - 1. Multiple [issues templates](/.github/ISSUE_TEMPLATE) . [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository). + 1. Multiple [issues templates](/.github/ISSUE_TEMPLATE). [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository). 1. A [config.yml](/.github/ISSUE_TEMPLATE/config.yml) with the config and information about the issue templates. 1. A [Blank issue template](/.github/ISSUE_TEMPLATE) with the super basic stuff, all the issues should contain. 1. A [Bug issue template](/.github/ISSUE_TEMPLATE/1-bug-report.md). @@ -65,12 +64,12 @@ and will auto remove itself (the script). --- -### **Project tree** +### **Project tree** 🌲 ```text . β”œβ”€β”€ CHANGELOG.md -β”œβ”€β”€ EXECUTEME.sh +β”œβ”€β”€ EXECUTEME.sh (will get removed) β”œβ”€β”€ .github β”‚Β Β  β”œβ”€β”€ CODE_OF_CONDUCT.md β”‚Β Β  β”œβ”€β”€ CONTRIBUTING.md @@ -97,7 +96,20 @@ and will auto remove itself (the script). --- -## **Screenshots** +## **Extra recommendations** πŸ•΅οΈ + +* After **[generating your new repo with this template](https://github.com/Josee9988/project-template/generate)**, make sure to, right after you clone it, run the script `EXECUTEME.sh`. + +* Then you will be presented with all the files modified with your project details and information. It is very important to **manually review every file** to check if it fits your requirements, and perform any necessary changes to customize the project as you want. + +* If you are using **Windows** and you don't know how to execute the `EXECUTEME.sh` script: + 1. Install **[git for Windows](https://git-scm.com/download/win)**. + 2. Right-click on the git repository folder and click "*git bash here*". + 3. Then just perform *`bash EXECUTEME.sh`* **or** *`chmod u+x EXECUTEME.sh && ./EXECUTEME.sh`*. + +--- + +## **Screenshots** πŸ“· A couple of screenshots to delight you before you use this template. @@ -126,7 +138,9 @@ A couple of screenshots to delight you before you use this template. For the right maintenance of the CHANGELOG.md, we recommend this [VSCode extension](https://github.com/Josee9988/Changelog-and-Markdown-snippets) and the read and understanding of the [keep a changelog guide](https://keepachangelog.com/en/1.0.0/). -Enjoy! +If you liked it please, make sure to star this project. ❀️ + +Enjoy! πŸ˜ƒ > ⚠️Remember that this template should be reviewed and modified to fit your requirements. > The script **EXECUTEME.sh** should be executed right when you clone your new repository. From 3581a946bcbc54cbb338e1df680d18da2a5cb814 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Wed, 17 Mar 2021 11:20:10 +0100 Subject: [PATCH 044/152] "commit new files after modification" --- CHANGELOG.md | 6 ++++++ EXECUTEME.sh | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b07f0ca..1265857 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.0.9**] - 2021-03-17 + +### Added + +* The script will git add and commit the new files/changes for you. + ## [**1.0.8**] - 2021-03-17 ### Changed diff --git a/EXECUTEME.sh b/EXECUTEME.sh index c205ca0..86f8868 100644 --- a/EXECUTEME.sh +++ b/EXECUTEME.sh @@ -79,7 +79,15 @@ y | Y) # remove author's custom funding links echo -e "# add your own funding links" >.github/FUNDING.yml - echo -e "Remember to review every file and customize it as you like.\nYou are ready to start your brand new awesome projectπŸš€πŸš€." + # commit the new files + git add CHANGELOG.md README.md .gitignore .github EXECUTEME.sh LICENSE + git commit -m "Set up Josee9988's template: Personalized files by executing the EXECUTEME.sh script." + + echo -e "Commiting the changes for you :)\n" + + git -c color.status=always status | less -REX # show git status with colours + + echo -e "\nRemember to review every file and customize it as you like.\nYou are ready to start your brand new awesome projectπŸš€πŸš€." # self remove this script rm -- "$0" From 6a60f0ea2596a937a3d9442dd46e0c623f4d02ba Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 18 Mar 2021 09:09:58 +0100 Subject: [PATCH 045/152] "from EXECUTEME.sh to a more specific shell script name 'SETUP_TEMPLATE'" --- CHANGELOG.md | 12 +++++++++--- README.md | 32 +++++++++++++++++-------------- EXECUTEME.sh => SETUP_TEMPLATE.sh | 12 ++++++------ 3 files changed, 33 insertions(+), 23 deletions(-) rename EXECUTEME.sh => SETUP_TEMPLATE.sh (94%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1265857..ed51fba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.0.10**] - 2021-03-17 + +### Changed + +* `EXECUTEME.sh` script changed to `SETUP_TEMPLATE.sh`. + ## [**1.0.9**] - 2021-03-17 ### Added @@ -63,7 +69,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Added * One more screenshot to the README.md file showing the community profile. -* Documentation for the EXECUTEME.sh script. +* Documentation for the SETUP_TEMPLATE.sh script. ### Changed @@ -73,7 +79,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Added -* A LICENSE for the project that will be removed with the EXECUTEME.sh script. +* A LICENSE for the project that will be removed with the SETUP_TEMPLATE.sh script. ### Changed @@ -84,4 +90,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Added * Added a CHANGELOG.md. -* Support for the CHANGELOG in the EXECUTEME.sh file (when run, it will remove all of the content and create a new file from scratch). +* Support for the CHANGELOG in the SETUP_TEMPLATE.sh file (when run, it will remove all of the content and create a new file from scratch). diff --git a/README.md b/README.md index faa4133..e7782ac 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ * Make your _community healthier_ with all the guides like code of conduct, contributing, support, security... * Learn more with the [official Github guide on creating repositories from a template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). * To start using it; "**[click use this template](https://github.com/Josee9988/project-template/generate)**", create your new repository, -clone your new repository and execute the `EXECUTEME.sh` shell script to personalize the markdowns with your private details. Check how to execute it [here](https://asciinema.org/a/398761). +clone your new repository and execute the `SETUP_TEMPLATE.sh` shell script to personalize the markdowns with your private details. Check how to execute it [here](https://asciinema.org/a/398761). * All the markdown follows [MarkdownLint rules](https://github.com/DavidAnson/markdownlint). --- @@ -17,16 +17,20 @@ clone your new repository and execute the `EXECUTEME.sh` shell script to persona 1. To create a new repository from this template [generate your new repository from this template](https://github.com/Josee9988/project-template/generate) for more information or guidance follow the [Github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). -2. Clone your repo and cd into it. -3. Execute the `EXECUTEME.sh` shell script to customize the files with your data. +2. Clone your repo and `cd` into it. +3. **Execute** the `SETUP_TEMPLATE.sh` shell script to **customize** the files with your data. - Use `bash EXECUTEME.sh` or `./EXECUTEME.sh`. + ```bash + bash SETUP_TEMPLATE.sh # execute the setup script. + ``` + + Or you can also do it like this: ```bash - bash EXECUTEME.sh # execute the setup script. + chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE-sh # another way of executing it ``` - Additionally watch *[this video](https://asciinema.org/a/398761)* to see **how to execute the script**. + Additionally watch *[this video](https://asciinema.org/a/398761)* to see **how to execute the script**. 4. **Review** every single file and **customize** it as you like. 5. Build your project. πŸš€ @@ -37,13 +41,13 @@ for more information or guidance follow the [Github guide](https://docs.github.c ## **What does it include?** πŸ“š -1. An **`EXECUTEME.sh`** script that **MUST be executed right when you clone your repository**. +1. An **`SETUP_TEMPLATE.sh`** script that **MUST be executed right when you clone your repository**. The script will replace Jose's username and email (the author) with yours. It will remove all the _content_ from the CHANGELOG.md and write the basic structure for you to write your own. The script will also remove all the _content_ from the README.md, and it will remove the `LICENSE` file to let you freely choose your own and will auto remove itself (the script). 1. A `.gitignore` ignoring Jetbrains/Intellij and VSCode IDE's folders and Linux files. -1. A CHANGELOG.md file that the `EXECUTEME.sh` script will remove to let you write your own. -1. A README.md file that its content will be erased when you run the `EXECUTEME.sh` script. +1. A CHANGELOG.md file that the `SETUP_TEMPLATE.sh` script will remove to let you write your own. +1. A README.md file that its content will be erased when you run the `SETUP_TEMPLATE.sh` script. 1. A fully customized `.github` folder with: 1. A [funding](/.github/FUNDING.yml) section to display a sponsor button (should be manually modified). [Learn more with the Github guide](https://docs.github.com/en/github/administering-a-repository/displaying-a-sponsor-button-in-your-repository) 1. A [issue_label_bot.yaml](/.github/issue_label_bot.yaml) file to use the popular Github bot. [Activate it or check its documentation](https://github.com/marketplace/issue-label-bot). @@ -69,7 +73,7 @@ The script will also remove all the _content_ from the README.md, and it will re ```text . β”œβ”€β”€ CHANGELOG.md -β”œβ”€β”€ EXECUTEME.sh (will get removed) +β”œβ”€β”€ SETUP_TEMPLATE.sh (will get removed) β”œβ”€β”€ .github β”‚Β Β  β”œβ”€β”€ CODE_OF_CONDUCT.md β”‚Β Β  β”œβ”€β”€ CONTRIBUTING.md @@ -98,14 +102,14 @@ The script will also remove all the _content_ from the README.md, and it will re ## **Extra recommendations** πŸ•΅οΈ -* After **[generating your new repo with this template](https://github.com/Josee9988/project-template/generate)**, make sure to, right after you clone it, run the script `EXECUTEME.sh`. +* After **[generating your new repo with this template](https://github.com/Josee9988/project-template/generate)**, make sure to, right after you clone it, run the script `SETUP_TEMPLATE.sh`. * Then you will be presented with all the files modified with your project details and information. It is very important to **manually review every file** to check if it fits your requirements, and perform any necessary changes to customize the project as you want. -* If you are using **Windows** and you don't know how to execute the `EXECUTEME.sh` script: +* If you are using **Windows** and you don't know how to execute the `SETUP_TEMPLATE.sh` script: 1. Install **[git for Windows](https://git-scm.com/download/win)**. 2. Right-click on the git repository folder and click "*git bash here*". - 3. Then just perform *`bash EXECUTEME.sh`* **or** *`chmod u+x EXECUTEME.sh && ./EXECUTEME.sh`*. + 3. Then just perform *`bash SETUP_TEMPLATE.sh`* **or** *`chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE.sh`*. --- @@ -143,7 +147,7 @@ If you liked it please, make sure to star this project. ❀️ Enjoy! πŸ˜ƒ > ⚠️Remember that this template should be reviewed and modified to fit your requirements. -> The script **EXECUTEME.sh** should be executed right when you clone your new repository. +> The script **SETUP_TEMPLATE.sh** should be executed right when you clone your new repository. > There will be files that will need manual revision⚠️ _Made with a lot of ❀️❀️ by **[@Josee9988](https://github.com/Josee9988)**_ diff --git a/EXECUTEME.sh b/SETUP_TEMPLATE.sh similarity index 94% rename from EXECUTEME.sh rename to SETUP_TEMPLATE.sh index 86f8868..d42b834 100644 --- a/EXECUTEME.sh +++ b/SETUP_TEMPLATE.sh @@ -1,15 +1,15 @@ #!/bin/bash #~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# -# SCRIPT: EXECUTEME.sh -# USAGE: bash EXECUTEME.sh | ./EXECUTEME.sh +# SCRIPT: SETUP_TEMPLATE.sh +# USAGE: bash SETUP_TEMPLATE.sh | ./SETUP_TEMPLATE.sh # PURPOSE: Shell script that prompts the user for their GitHub username, email name of their project and # the type of project that it is. Then it will replace the author's (josee9988) username and email # with the new ones (the user that is using this template). It will fully remove the LICENSE file, # delete all of the content of the README.md file, and add a simple header, # delete all of the content of the CHANGELOG.md and add a basic CHANGELOG versioning and 1st version, -# then this script will auto remove itself, to leave the new project without this file (EXECUTEME.sh). -# TITLE: EXECUTEME.sh +# then this script will auto remove itself, to leave the new project without this file (SETUP_TEMPLATE.sh). +# TITLE: SETUP_TEMPLATE # AUTHOR: Jose Gracia # VERSION: See in CHANGELOG.md # NOTES: This script will auto remove itself, and in case of wanting to run it again, the user must download @@ -80,8 +80,8 @@ y | Y) echo -e "# add your own funding links" >.github/FUNDING.yml # commit the new files - git add CHANGELOG.md README.md .gitignore .github EXECUTEME.sh LICENSE - git commit -m "Set up Josee9988's template: Personalized files by executing the EXECUTEME.sh script." + git add CHANGELOG.md README.md .gitignore .github SETUP_TEMPLATE.sh LICENSE + git commit -m "Set up Josee9988's template: Personalized files by executing the SETUP_TEMPLATE.sh script." echo -e "Commiting the changes for you :)\n" From 6dda12e79f1461a225f37840dcae330fdef94cec Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 18 Mar 2021 09:17:52 +0100 Subject: [PATCH 046/152] "1.0.10 from executeme to setup_template" --- CHANGELOG.md | 1 + README.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed51fba..aa7d5be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Changed * `EXECUTEME.sh` script changed to `SETUP_TEMPLATE.sh`. +* Changed the execution video from the README.md file (asciinema's video). ## [**1.0.9**] - 2021-03-17 diff --git a/README.md b/README.md index e7782ac..28aa15e 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ for more information or guidance follow the [Github guide](https://docs.github.c chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE-sh # another way of executing it ``` - Additionally watch *[this video](https://asciinema.org/a/398761)* to see **how to execute the script**. + Additionally watch *[this video](https://asciinema.org/a/400202)* to see **how to execute the script**. 4. **Review** every single file and **customize** it as you like. 5. Build your project. πŸš€ From 53d3942d037d008b7d44f3c4079b9d6ef7b41139 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 20 Mar 2021 11:40:56 +0100 Subject: [PATCH 047/152] "fixed typos and added the social links in the radme.md file" --- CHANGELOG.md | 16 +++++++++++++--- README.md | 23 +++++++++++++++-------- 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa7d5be..e700312 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.0.11**] - 2021-03-20 + +### Added + +* Social links of the repo in the README.md file. + +### Fixed + +* Some minor typos in the README.md file. + ## [**1.0.10**] - 2021-03-17 ### Changed @@ -34,7 +44,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed -* Some minnor typos +* Some minor typos ## [**1.0.6**] - 2021-03-16 @@ -47,7 +57,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Added * Checks to the shell script (check if the files exist) -* Colorized the output of the script. +* Colourized the output of the script. ## [**1.0.4**] - 2021-02-26 @@ -80,7 +90,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Added -* A LICENSE for the project that will be removed with the SETUP_TEMPLATE.sh script. +* A LICENSE for the project be removed with the SETUP_TEMPLATE.sh script. ### Changed diff --git a/README.md b/README.md index 28aa15e..d26d61c 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ clone your new repository and execute the `SETUP_TEMPLATE.sh` shell script to pe ## **How to use it as a template for my new repositories?** πŸš€ 1. To create a new repository from this template [generate your new repository from this template](https://github.com/Josee9988/project-template/generate) -for more information or guidance follow the [Github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). +for more information or guidance, follow the [Github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). 2. Clone your repo and `cd` into it. 3. **Execute** the `SETUP_TEMPLATE.sh` shell script to **customize** the files with your data. @@ -30,7 +30,7 @@ for more information or guidance follow the [Github guide](https://docs.github.c chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE-sh # another way of executing it ``` - Additionally watch *[this video](https://asciinema.org/a/400202)* to see **how to execute the script**. + Additionally, watch *[this video](https://asciinema.org/a/400202)* to see **how to execute the script**. 4. **Review** every single file and **customize** it as you like. 5. Build your project. πŸš€ @@ -41,16 +41,16 @@ for more information or guidance follow the [Github guide](https://docs.github.c ## **What does it include?** πŸ“š -1. An **`SETUP_TEMPLATE.sh`** script that **MUST be executed right when you clone your repository**. +1. A **`SETUP_TEMPLATE.sh`** script that **MUST be executed right when you clone your repository**. The script will replace Jose's username and email (the author) with yours. It will remove all the _content_ from the CHANGELOG.md and write the basic structure for you to write your own. The script will also remove all the _content_ from the README.md, and it will remove the `LICENSE` file to let you freely choose your own and will auto remove itself (the script). -1. A `.gitignore` ignoring Jetbrains/Intellij and VSCode IDE's folders and Linux files. +1. A basic `.gitignore` file, ignoring Jetbrains/Intellij and VSCode IDE's folders. 1. A CHANGELOG.md file that the `SETUP_TEMPLATE.sh` script will remove to let you write your own. 1. A README.md file that its content will be erased when you run the `SETUP_TEMPLATE.sh` script. 1. A fully customized `.github` folder with: 1. A [funding](/.github/FUNDING.yml) section to display a sponsor button (should be manually modified). [Learn more with the Github guide](https://docs.github.com/en/github/administering-a-repository/displaying-a-sponsor-button-in-your-repository) - 1. A [issue_label_bot.yaml](/.github/issue_label_bot.yaml) file to use the popular Github bot. [Activate it or check its documentation](https://github.com/marketplace/issue-label-bot). + 1. An [issue_label_bot.yaml](/.github/issue_label_bot.yaml) file to use the popular Github bot. [Activate it or check its documentation](https://github.com/marketplace/issue-label-bot). 1. A [CONTRIBUTING](/.github/CONTRIBUTING.md) explaining how to contribute to the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/setting-guidelines-for-repository-contributors). 1. A [SUPPORT](/.github/SUPPORT.md) explaining how to support the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-support-resources-to-your-project). 1. A [SECURITY](/.github/SECURITY.md) with a guide on how to post a security issue. [Learn more with the Github guide](https://docs.github.com/es/github/managing-security-vulnerabilities/adding-a-security-policy-to-your-repository). @@ -104,7 +104,7 @@ The script will also remove all the _content_ from the README.md, and it will re * After **[generating your new repo with this template](https://github.com/Josee9988/project-template/generate)**, make sure to, right after you clone it, run the script `SETUP_TEMPLATE.sh`. -* Then you will be presented with all the files modified with your project details and information. It is very important to **manually review every file** to check if it fits your requirements, and perform any necessary changes to customize the project as you want. +* Then you will be presented with all the files modified with your project details and information. It is very important to **manually review every file** to check if it fits your requirements and perform any necessary changes to customize the project as you want. * If you are using **Windows** and you don't know how to execute the `SETUP_TEMPLATE.sh` script: 1. Install **[git for Windows](https://git-scm.com/download/win)**. @@ -142,12 +142,19 @@ A couple of screenshots to delight you before you use this template. For the right maintenance of the CHANGELOG.md, we recommend this [VSCode extension](https://github.com/Josee9988/Changelog-and-Markdown-snippets) and the read and understanding of the [keep a changelog guide](https://keepachangelog.com/en/1.0.0/). -If you liked it please, make sure to star this project. ❀️ +--- + +## Was the template helpful? Help us raise these numbers up πŸ₯° πŸŽ‰ + +[![Github followers](https://img.shields.io/github/followers/Josee9988.svg?style=social)](#did-you-enjoy-the-template-help-us-raise-these-numbers-up--) +[![Github stars](https://img.shields.io/github/stars/Josee9988/project-template.svg?style=social)](#did-you-enjoy-the-template-help-us-raise-these-numbers-up--) +[![Github watchers](https://img.shields.io/github/watchers/Josee9988/project-template.svg?style=social)](#did-you-enjoy-the-template-help-us-raise-these-numbers-up--) +[![Github forks](https://img.shields.io/github/forks/Josee9988/project-template.svg?style=social)](#did-you-enjoy-the-template-help-us-raise-these-numbers-up--) Enjoy! πŸ˜ƒ > ⚠️Remember that this template should be reviewed and modified to fit your requirements. > The script **SETUP_TEMPLATE.sh** should be executed right when you clone your new repository. -> There will be files that will need manual revision⚠️ +> There will be files that will need *manual revision*⚠️ _Made with a lot of ❀️❀️ by **[@Josee9988](https://github.com/Josee9988)**_ From a1887a75fff9fe6b1661e7983abc9f5ec41fd822 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 20 Mar 2021 13:22:54 +0100 Subject: [PATCH 048/152] "added badges and logo and updated funding link" --- .github/FUNDING.yml | 3 ++- README.md | 27 +++++++++++++++++++++------ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 719baed..bf283fe 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1,3 @@ # These are supported funding model platforms -custom: ["https://www.paypal.me/josee9988", "https://www.buymeacoffee.com/josee9988"] +github: Josee9988 +custom: ['https://www.paypal.me/josee9988'] diff --git a/README.md b/README.md index d26d61c..c72a6b7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,22 @@ # **Josee9988's Github Project Template** +

+ Logo +
+ + Issues + + + GitHub pull requests + + + GitHub pull requests + + + +--- + ## **What is this template all about?** πŸ”₯ * This template can be used as a base layer for any of your future repositories/projects. @@ -44,12 +60,7 @@ for more information or guidance, follow the [Github guide](https://docs.github. 1. A **`SETUP_TEMPLATE.sh`** script that **MUST be executed right when you clone your repository**. The script will replace Jose's username and email (the author) with yours. It will remove all the _content_ from the CHANGELOG.md and write the basic structure for you to write your own. -The script will also remove all the _content_ from the README.md, and it will remove the `LICENSE` file to let you freely choose your own and will auto remove itself (the script). -1. A basic `.gitignore` file, ignoring Jetbrains/Intellij and VSCode IDE's folders. -1. A CHANGELOG.md file that the `SETUP_TEMPLATE.sh` script will remove to let you write your own. -1. A README.md file that its content will be erased when you run the `SETUP_TEMPLATE.sh` script. -1. A fully customized `.github` folder with: - 1. A [funding](/.github/FUNDING.yml) section to display a sponsor button (should be manually modified). [Learn more with the Github guide](https://docs.github.com/en/github/administering-a-repository/displaying-a-sponsor-button-in-your-repository) +The script will also remove all the _content_ from the READMiframea sponsor button (should be manually modified). [Learn more with the Github guide](https://docs.github.com/en/github/administering-a-repository/displaying-a-sponsor-button-in-your-repository) 1. An [issue_label_bot.yaml](/.github/issue_label_bot.yaml) file to use the popular Github bot. [Activate it or check its documentation](https://github.com/marketplace/issue-label-bot). 1. A [CONTRIBUTING](/.github/CONTRIBUTING.md) explaining how to contribute to the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/setting-guidelines-for-repository-contributors). 1. A [SUPPORT](/.github/SUPPORT.md) explaining how to support the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-support-resources-to-your-project). @@ -150,9 +161,13 @@ and the read and understanding of the [keep a changelog guide](https://keepachan [![Github stars](https://img.shields.io/github/stars/Josee9988/project-template.svg?style=social)](#did-you-enjoy-the-template-help-us-raise-these-numbers-up--) [![Github watchers](https://img.shields.io/github/watchers/Josee9988/project-template.svg?style=social)](#did-you-enjoy-the-template-help-us-raise-these-numbers-up--) [![Github forks](https://img.shields.io/github/forks/Josee9988/project-template.svg?style=social)](#did-you-enjoy-the-template-help-us-raise-these-numbers-up--) + + Sponsor + Enjoy! πŸ˜ƒ + > ⚠️Remember that this template should be reviewed and modified to fit your requirements. > The script **SETUP_TEMPLATE.sh** should be executed right when you clone your new repository. > There will be files that will need *manual revision*⚠️ From 492678d2e01feb1c608aad48d4e08fe88519d38b Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 20 Mar 2021 13:23:25 +0100 Subject: [PATCH 049/152] "readme mistake fixed" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c72a6b7..0378e25 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ + --- ## **What is this template all about?** πŸ”₯ @@ -167,7 +168,6 @@ and the read and understanding of the [keep a changelog guide](https://keepachan Enjoy! πŸ˜ƒ - > ⚠️Remember that this template should be reviewed and modified to fit your requirements. > The script **SETUP_TEMPLATE.sh** should be executed right when you clone your new repository. > There will be files that will need *manual revision*⚠️ From 9221c9e52334ab03cc4d2a2fde4bcedb1743bf9b Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 20 Mar 2021 16:07:54 +0100 Subject: [PATCH 050/152] "updated badges" --- CHANGELOG.md | 2 ++ README.md | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e700312..8a14f45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Added * Social links of the repo in the README.md file. +* Added badges in the README.md file. +* Added sponsor link in the contributing.yml file. ### Fixed diff --git a/README.md b/README.md index 0378e25..81aa4da 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,9 @@ GitHub pull requests - - GitHub pull requests + + - --- @@ -163,8 +162,8 @@ and the read and understanding of the [keep a changelog guide](https://keepachan [![Github watchers](https://img.shields.io/github/watchers/Josee9988/project-template.svg?style=social)](#did-you-enjoy-the-template-help-us-raise-these-numbers-up--) [![Github forks](https://img.shields.io/github/forks/Josee9988/project-template.svg?style=social)](#did-you-enjoy-the-template-help-us-raise-these-numbers-up--) - Sponsor - + Sponsor + Enjoy! πŸ˜ƒ From 4032f82bf133891f00c0f417005b5297342a15d9 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 20 Mar 2021 16:12:12 +0100 Subject: [PATCH 051/152] "updated badge links" --- README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 81aa4da..9cfdbb5 100644 --- a/README.md +++ b/README.md @@ -157,13 +157,11 @@ and the read and understanding of the [keep a changelog guide](https://keepachan ## Was the template helpful? Help us raise these numbers up πŸ₯° πŸŽ‰ -[![Github followers](https://img.shields.io/github/followers/Josee9988.svg?style=social)](#did-you-enjoy-the-template-help-us-raise-these-numbers-up--) -[![Github stars](https://img.shields.io/github/stars/Josee9988/project-template.svg?style=social)](#did-you-enjoy-the-template-help-us-raise-these-numbers-up--) -[![Github watchers](https://img.shields.io/github/watchers/Josee9988/project-template.svg?style=social)](#did-you-enjoy-the-template-help-us-raise-these-numbers-up--) -[![Github forks](https://img.shields.io/github/forks/Josee9988/project-template.svg?style=social)](#did-you-enjoy-the-template-help-us-raise-these-numbers-up--) - - Sponsor - +[![Github followers](https://img.shields.io/github/followers/Josee9988.svg?style=social)](https://github.com/Josee9988) +[![Github stars](https://img.shields.io/github/stars/Josee9988/project-template.svg?style=social)](https://github.com/Josee9988/project-template/stargazers) +[![Github watchers](https://img.shields.io/github/watchers/Josee9988/project-template.svg?style=social)](https://github.com/Josee9988/project-template/watchers) +[![Github forks](https://img.shields.io/github/forks/Josee9988/project-template.svg?style=social)](https://github.com/Josee9988/project-template/network/members) +[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=github-sponsors&color=red&style=social)](https://github.com/sponsors/Josee9988) Enjoy! πŸ˜ƒ From 1484ef8e354dbfd663c85dd0dabf0d5e77067189 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sun, 21 Mar 2021 14:26:07 +0100 Subject: [PATCH 052/152] "updated funding link" --- .github/FUNDING.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index bf283fe..a2d624f 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,2 @@ -# These are supported funding model platforms github: Josee9988 custom: ['https://www.paypal.me/josee9988'] From d3cef29684f2883f9a0dd96161bf87f199dce40d Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sun, 21 Mar 2021 15:58:30 +0100 Subject: [PATCH 053/152] "fixed readme closing tag" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9cfdbb5..63ad25e 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ - +

--- From 47eae8382eef001ac167576762df6286dd18d40a Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Wed, 31 Mar 2021 10:34:57 +0200 Subject: [PATCH 054/152] "emoji from the end of the readme.md header to the beginning" --- CHANGELOG.md | 14 ++++++++++++-- README.md | 16 ++++++++-------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a14f45..5747d13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [Unreleased] + +### Changed + +* Header's emoji from the end of the README.md headers to the beginning to be shown better by the new GitHub's README table of contents. + +### Fixed + +* Some typos in the CHANGELOG.md. + ## [**1.0.11**] - 2021-03-20 ### Added @@ -65,7 +75,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Added -* Markdownlint disable rule in the CHANGELOG.md file" +* Markdownlint disable the rule in the CHANGELOG.md file" ## [**1.0.3**] - 2021-02-23 @@ -92,7 +102,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Added -* A LICENSE for the project be removed with the SETUP_TEMPLATE.sh script. +* A LICENSE for the project will be removed with the SETUP_TEMPLATE.sh script. ### Changed diff --git a/README.md b/README.md index 63ad25e..c0ccaa6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# **Josee9988's Github Project Template** +# **Josee9988's Github Project Template** πŸ”₯

Logo @@ -17,7 +17,7 @@ --- -## **What is this template all about?** πŸ”₯ +## πŸ€” **What is this template all about?** * This template can be used as a base layer for any of your future repositories/projects. * Make your project easy to maintain with **7 issue templates**. @@ -29,7 +29,7 @@ clone your new repository and execute the `SETUP_TEMPLATE.sh` shell script to pe --- -## **How to use it as a template for my new repositories?** πŸš€ +## πŸš€ **How to use it as a template for my new repositories?** 1. To create a new repository from this template [generate your new repository from this template](https://github.com/Josee9988/project-template/generate) for more information or guidance, follow the [Github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). @@ -55,7 +55,7 @@ for more information or guidance, follow the [Github guide](https://docs.github. --- -## **What does it include?** πŸ“š +## πŸ“š **What does it include?** 1. A **`SETUP_TEMPLATE.sh`** script that **MUST be executed right when you clone your repository**. The script will replace Jose's username and email (the author) with yours. @@ -79,7 +79,7 @@ The script will also remove all the _content_ from the READMiframea sponsor butt --- -### **Project tree** 🌲 +### 🌲 **Project tree** ```text . @@ -111,7 +111,7 @@ The script will also remove all the _content_ from the READMiframea sponsor butt --- -## **Extra recommendations** πŸ•΅οΈ +## πŸ•΅οΈ **Extra recommendations** * After **[generating your new repo with this template](https://github.com/Josee9988/project-template/generate)**, make sure to, right after you clone it, run the script `SETUP_TEMPLATE.sh`. @@ -124,7 +124,7 @@ The script will also remove all the _content_ from the READMiframea sponsor butt --- -## **Screenshots** πŸ“· +## πŸ“Έ **Screenshots** A couple of screenshots to delight you before you use this template. @@ -155,7 +155,7 @@ and the read and understanding of the [keep a changelog guide](https://keepachan --- -## Was the template helpful? Help us raise these numbers up πŸ₯° πŸŽ‰ +## πŸŽ‰ Was the template helpful? Help us raise these numbers up [![Github followers](https://img.shields.io/github/followers/Josee9988.svg?style=social)](https://github.com/Josee9988) [![Github stars](https://img.shields.io/github/stars/Josee9988/project-template.svg?style=social)](https://github.com/Josee9988/project-template/stargazers) From e8955f0fa892fb7f08b8c83db763193eb98577ae Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Wed, 31 Mar 2021 15:11:55 +0200 Subject: [PATCH 055/152] "added README.md basic template" --- .gitignore | 1 + CHANGELOG.md | 5 +++++ SETUP_TEMPLATE.sh | 45 ++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 48 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 4556ab6..e1e5dad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ ###> Josee9988/project-template ### .vscode/ .idea/ +*.ignore.* ###< Josee9988/project-template ### diff --git a/CHANGELOG.md b/CHANGELOG.md index 5747d13..c2ad14e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [Unreleased] +### Added + +* Gitignore file ignores all \*.ignore.\* files. +* Basic README.md template. + ### Changed * Header's emoji from the end of the README.md headers to the beginning to be shown better by the new GitHub's README table of contents. diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index d42b834..c23ec1a 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -63,9 +63,8 @@ y | Y) # remove the license rm LICENSE - # delete the README.md and create one with just a header - echo -e "# **${NEW_USERNAME}'s project**" >README.md - echo "" >>README.md + # write the new README.md + writeREADME # write the basic structure of the CHANGELOG.md echo -e "\n# **Change Log** πŸ“œπŸ“\n" >CHANGELOG.md @@ -97,3 +96,43 @@ n | N) echo "Then try it again!" ;; esac exit 0 + +writeREADME() { + bash -c "NEW_USERNAME='NEW_USERNAME' PROJECT_NAME='PROJECT_NAME'; cat << EOF > script.md + +# πŸ”₯ **$NEW_USERNAME/$PROJECT_NAME** + +--- + +# ⚑ **Getting started** + +* + +--- + +# πŸš€ **Usage** + +* + +--- + +# πŸ“ **Aditional notes** + +* + +--- + +# βš–οΈ **License and Changelog** + +See the license in **[LICENSE](LICENSE)** file. + +Watch the changes in the **[CHANGELOG.md](CHANGELOG.md)** file. + +--- + + +This project was generated using *[Josee9988/project-template](https://github.com/Josee9988/project-template)* πŸ“š + +_Made with a lot of ❀️❀️ by **[@$NEW_USERNAME](https://github.com/$NEW_USERNAME)**_ +EOF" +} From 9015bf2e7f3e17d5d582feba578fc7d8ca7f0408 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Wed, 31 Mar 2021 15:24:35 +0200 Subject: [PATCH 056/152] "function helpers now contains the write changelog and write readme functions" --- SETUP_TEMPLATE.sh | 49 +------------------------------ bin/FUNCTION_HELPERS.sh | 64 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 48 deletions(-) create mode 100644 bin/FUNCTION_HELPERS.sh diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index c23ec1a..baa48f8 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -22,7 +22,6 @@ # MAIL: jgracia9988@gmail.com #~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# -ACTUAL_DATE=$(date '+%Y-%m-%d') RED='\033[1;31m' NC='\033[0m' # No Color UPurple='\033[4;35m' @@ -67,13 +66,7 @@ y | Y) writeREADME # write the basic structure of the CHANGELOG.md - echo -e "\n# **Change Log** πŸ“œπŸ“\n" >CHANGELOG.md - echo -e "All notable changes to the \"**${PROJECT_NAME}**\" ${PROJECT_TYPE} will be documented in this file.\n" >>CHANGELOG.md - echo -e "The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n" >>CHANGELOG.md - echo -e "---\n\n## [**0.0.1**] - ${ACTUAL_DATE}\n\n### Added\n" >>CHANGELOG.md - echo -e "* The basic project structure of [josee9988's](https://github.com/Josee9988) [project template](https://github.com/Josee9988/project-template)." >>CHANGELOG.md - echo -e "* A basic \`.gitignore\` file ignoring some linux files and IDE trash files." >>CHANGELOG.md - echo -e "* A \`.github/\` folder with issue templates, code of conduct, a contributing guide, pull request template security advisory file, a funding and support file and an issue label bot file." >>CHANGELOG.md + writeCHANGELOG # remove author's custom funding links echo -e "# add your own funding links" >.github/FUNDING.yml @@ -96,43 +89,3 @@ n | N) echo "Then try it again!" ;; esac exit 0 - -writeREADME() { - bash -c "NEW_USERNAME='NEW_USERNAME' PROJECT_NAME='PROJECT_NAME'; cat << EOF > script.md - -# πŸ”₯ **$NEW_USERNAME/$PROJECT_NAME** - ---- - -# ⚑ **Getting started** - -* - ---- - -# πŸš€ **Usage** - -* - ---- - -# πŸ“ **Aditional notes** - -* - ---- - -# βš–οΈ **License and Changelog** - -See the license in **[LICENSE](LICENSE)** file. - -Watch the changes in the **[CHANGELOG.md](CHANGELOG.md)** file. - ---- - - -This project was generated using *[Josee9988/project-template](https://github.com/Josee9988/project-template)* πŸ“š - -_Made with a lot of ❀️❀️ by **[@$NEW_USERNAME](https://github.com/$NEW_USERNAME)**_ -EOF" -} diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh new file mode 100644 index 0000000..72b1ccc --- /dev/null +++ b/bin/FUNCTION_HELPERS.sh @@ -0,0 +1,64 @@ +#!/bin/bash + +# SCRIPT WITH EXPORTED FUNCTIONS AND VARIABLES + +writeREADME() { + bash -c "NEW_USERNAME='NEW_USERNAME' PROJECT_NAME='PROJECT_NAME'; cat << EOF > README.md + +# πŸ”₯ **$NEW_USERNAME/$PROJECT_NAME** + +--- + +# ⚑ **Getting started** + +* + +--- + +# πŸš€ **Usage** + +* + +--- + +# πŸ“ **Aditional notes** + +* + +--- + +# βš–οΈ **License and Changelog** + +See the license in **[LICENSE](LICENSE)** file. + +Watch the changes in the **[CHANGELOG.md](CHANGELOG.md)** file. + +--- + + +This project was generated using *[Josee9988/project-template](https://github.com/Josee9988/project-template)* πŸ“š + +_Made with a lot of ❀️❀️ by **[@$NEW_USERNAME](https://github.com/$NEW_USERNAME)**_ +EOF" +} + +writeCHANGELOG() { + ACTUAL_DATE=$(date '+%Y-%m-%d') + bash -c "PROJECT_NAME='PROJECT_NAME' PROJECT_TYPE='PROJECT_TYPE' ACTUAL_DATE='ACTUAL_DATE'; cat << EOF > CHANGELOG.md + +# **Change Log** πŸ“œπŸ“ + +All notable changes to the \"**$PROJECT_NAME**\" $PROJECT_TYPE will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +--- + +## [**0.0.1**] - $ACTUAL_DATE + +### Added + +* The basic project structure from **[josee9988/project-template](https://github.com/Josee9988/project-template)**. + +EOF" +} From 9d0fc8265e6f700ef450e0916f523f49b78de63b Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Wed, 31 Mar 2021 15:29:02 +0200 Subject: [PATCH 057/152] "fixed file function helpers" --- SETUP_TEMPLATE.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index baa48f8..7c38ff8 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -27,6 +27,7 @@ NC='\033[0m' # No Color UPurple='\033[4;35m' BBLUE='\033[1;34m' GREEN='\033[1;32m' +FILE_FUNCTION_HELPERS=bin/FUNCTION_HELPERS.sh ### Check if the .github directory does exist ### if [ ! -d ".github/" ]; then @@ -44,6 +45,14 @@ if [ ! -f "CHANGELOG.md" ] || [ ! -f "README.md" ] || [ ! -f ".gitignore" ]; the exit 1 # exit with error code 1 fi +if [ ! -f "$FILE_FUNCTION_HELPERS" ]; then # check if the function helpers file is found + echo -e "${RED}Can not find ${FILE_FUNCTION_HELPERS}" + exit 1 # it will exit if the function helpers file is not found +else + # shellcheck source=bin/FUNCTION_HELPERS.sh disable=SC1091 + source $FILE_FUNCTION_HELPERS || exit # obtain some global functions and variables, if the file isn't found exit +fi + # prompt for the username, mail and name of the project read -p "Enter your $(echo -e "$BBLUE""username""$NC") (without '@'): " NEW_USERNAME read -p "Enter your $(echo -e "$BBLUE""email""$NC"): " NEW_EMAIL @@ -62,6 +71,9 @@ y | Y) # remove the license rm LICENSE + # remove the bin folder + rm -r bin/ + # write the new README.md writeREADME @@ -73,11 +85,11 @@ y | Y) # commit the new files git add CHANGELOG.md README.md .gitignore .github SETUP_TEMPLATE.sh LICENSE - git commit -m "Set up Josee9988's template: Personalized files by executing the SETUP_TEMPLATE.sh script." + git -c color.status=always status | less -REX # show git status with colours echo -e "Commiting the changes for you :)\n" - git -c color.status=always status | less -REX # show git status with colours + git commit -m "Set up Josee9988's template: Personalized files by executing the SETUP_TEMPLATE.sh script." echo -e "\nRemember to review every file and customize it as you like.\nYou are ready to start your brand new awesome projectπŸš€πŸš€." From d497dafaa8192529e4cb7faf7d06847f8234d872 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Wed, 31 Mar 2021 15:34:14 +0200 Subject: [PATCH 058/152] "documentation and minnor changes" --- CHANGELOG.md | 3 ++- README.md | 4 ++-- bin/FUNCTION_HELPERS.sh | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2ad14e..7b6580e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- -## [Unreleased] +## [**1.1.0**] - 2021-03-31 ### Added * Gitignore file ignores all \*.ignore.\* files. * Basic README.md template. +* bin/FUNCTION_HELPERS script to improve the readability of the SETUP_TEMPLATE.sh file. ### Changed diff --git a/README.md b/README.md index c0ccaa6..0a11195 100644 --- a/README.md +++ b/README.md @@ -81,10 +81,11 @@ The script will also remove all the _content_ from the READMiframea sponsor butt ### 🌲 **Project tree** +Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not shown! πŸ™ˆ + ```text . β”œβ”€β”€ CHANGELOG.md -β”œβ”€β”€ SETUP_TEMPLATE.sh (will get removed) β”œβ”€β”€ .github β”‚Β Β  β”œβ”€β”€ CODE_OF_CONDUCT.md β”‚Β Β  β”œβ”€β”€ CONTRIBUTING.md @@ -103,7 +104,6 @@ The script will also remove all the _content_ from the READMiframea sponsor butt β”‚Β Β  β”œβ”€β”€ SECURITY.md β”‚Β Β  └── SUPPORT.md β”œβ”€β”€ .gitignore -β”œβ”€β”€ LICENSE (will get removed) └── README.md 2 directories, 20 files diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh index 72b1ccc..093222e 100644 --- a/bin/FUNCTION_HELPERS.sh +++ b/bin/FUNCTION_HELPERS.sh @@ -59,6 +59,5 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Added * The basic project structure from **[josee9988/project-template](https://github.com/Josee9988/project-template)**. - EOF" } From d07b728c85f6dde578fe7f8fe5cdf1d0d8e3444f Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Wed, 31 Mar 2021 15:40:01 +0200 Subject: [PATCH 059/152] "improved readme documentation" --- CHANGELOG.md | 4 ++++ README.md | 11 ++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b6580e..23e5252 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed +* Git status is shown before the commit. + +### Fixed + * Some typos in the CHANGELOG.md. ## [**1.0.11**] - 2021-03-20 diff --git a/README.md b/README.md index 0a11195..ec1a944 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# **Josee9988's Github Project Template** πŸ”₯ +# πŸ”₯ **Josee9988's Github Project Template**

Logo @@ -29,7 +29,7 @@ clone your new repository and execute the `SETUP_TEMPLATE.sh` shell script to pe --- -## πŸš€ **How to use it as a template for my new repositories?** +## ⚑ **Installation** 1. To create a new repository from this template [generate your new repository from this template](https://github.com/Josee9988/project-template/generate) for more information or guidance, follow the [Github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). @@ -58,9 +58,10 @@ for more information or guidance, follow the [Github guide](https://docs.github. ## πŸ“š **What does it include?** 1. A **`SETUP_TEMPLATE.sh`** script that **MUST be executed right when you clone your repository**. -The script will replace Jose's username and email (the author) with yours. -It will remove all the _content_ from the CHANGELOG.md and write the basic structure for you to write your own. -The script will also remove all the _content_ from the READMiframea sponsor button (should be manually modified). [Learn more with the Github guide](https://docs.github.com/en/github/administering-a-repository/displaying-a-sponsor-button-in-your-repository) +The script will replace Jose's username and email (the author) with yours from all the. + + 1. A README template file with a default template to start documenting your project. + 1. A CHANGELOG template file based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). 1. An [issue_label_bot.yaml](/.github/issue_label_bot.yaml) file to use the popular Github bot. [Activate it or check its documentation](https://github.com/marketplace/issue-label-bot). 1. A [CONTRIBUTING](/.github/CONTRIBUTING.md) explaining how to contribute to the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/setting-guidelines-for-repository-contributors). 1. A [SUPPORT](/.github/SUPPORT.md) explaining how to support the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-support-resources-to-your-project). From 0ff80d6826e2b6e246e2c042161506010a99af51 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Wed, 31 Mar 2021 15:44:05 +0200 Subject: [PATCH 060/152] "added images about the new readme and changelog template" --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index ec1a944..5956470 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,16 @@ A couple of screenshots to delight you before you use this template. Bug issue template opened.

+* The README template. +

+ README.md template. +

+ +* The CHANGELOG template. +

+ CHANGELOG.md template. +

+ * Security policy

Security issue. From b8f9428d4b26fa3cebc37c9a905f28c971b0503f Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Wed, 31 Mar 2021 15:45:35 +0200 Subject: [PATCH 061/152] "removed type of change in the PRS as this was so annoying" --- .github/pull_request_template.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f768058..7177e1e 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -13,16 +13,6 @@ List any dependencies that are required for this change if there are any. --- -### **Type of change** - - - -* [] **Bug fix** (non-breaking change which fixes an issue). -* [] **Enhancement** (non-breaking change which adds functionality). -* [] **Breaking change** (fix or feature that would cause existing functionality to not work as expected). -* [] This change requires a documentation update. -* [] Other. - --- ### **Additional context** From 68d172f0f2a551b6e1e140337fd1a02524144005 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Wed, 31 Mar 2021 15:46:44 +0200 Subject: [PATCH 062/152] "removed extra space in the pr template" --- .github/pull_request_template.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 7177e1e..8d31ec6 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -13,8 +13,6 @@ List any dependencies that are required for this change if there are any. --- ---- - ### **Additional context** From 257a6d1239de02bca167bcfb3e5085acb898070a Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Wed, 31 Mar 2021 20:35:41 +0200 Subject: [PATCH 063/152] "minnor fixes" --- SETUP_TEMPLATE.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index 7c38ff8..c9c517a 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -84,12 +84,13 @@ y | Y) echo -e "# add your own funding links" >.github/FUNDING.yml # commit the new files - git add CHANGELOG.md README.md .gitignore .github SETUP_TEMPLATE.sh LICENSE + git add CHANGELOG.md README.md .gitignore .github SETUP_TEMPLATE.sh LICENSE bin git -c color.status=always status | less -REX # show git status with colours + echo -e "Commiting the changes for you :)\n" - git commit -m "Set up Josee9988's template: Personalized files by executing the SETUP_TEMPLATE.sh script." + git commit -m "Set up 'Josee9988/project-template' template: Personalized files by executing the SETUP_TEMPLATE.sh script.πŸš€" echo -e "\nRemember to review every file and customize it as you like.\nYou are ready to start your brand new awesome projectπŸš€πŸš€." From 5b958820438d11b6bab5d640465eafbcb0b43e8f Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Wed, 31 Mar 2021 21:16:04 +0200 Subject: [PATCH 064/152] "added readme badges" --- SETUP_TEMPLATE.sh | 4 ++-- bin/FUNCTION_HELPERS.sh | 23 ++++++++++++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index c9c517a..bc26374 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -54,9 +54,9 @@ else fi # prompt for the username, mail and name of the project -read -p "Enter your $(echo -e "$BBLUE""username""$NC") (without '@'): " NEW_USERNAME +read -p "Enter your $(echo -e "$BBLUE""Github username""$NC") (without '@'): " NEW_USERNAME read -p "Enter your $(echo -e "$BBLUE""email""$NC"): " NEW_EMAIL -read -p "Enter the $(echo -e "$BBLUE""name of the project""$NC"): " PROJECT_NAME +read -p "Enter the name of the $(echo -e "$BBLUE""Github's project""$NC"): " PROJECT_NAME read -p "Enter $(echo -e "$BBLUE""what your project is""$NC") (program/extension/API/web/CLI tool/backend/frontend/scrapper/automation tool/etc): " PROJECT_TYPE # confirm that the data is correct diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh index 093222e..08e657f 100644 --- a/bin/FUNCTION_HELPERS.sh +++ b/bin/FUNCTION_HELPERS.sh @@ -3,10 +3,19 @@ # SCRIPT WITH EXPORTED FUNCTIONS AND VARIABLES writeREADME() { - bash -c "NEW_USERNAME='NEW_USERNAME' PROJECT_NAME='PROJECT_NAME'; cat << EOF > README.md + bash -c "NEW_USERNAME='NEW_USERNAME' PROJECT_NAME='PROJECT_NAME' PROJECT_TYPE='PROJECT_TYPE'; cat << EOF > README.md # πŸ”₯ **$NEW_USERNAME/$PROJECT_NAME** +

+ + \"Issues\" + + + \"GitHub + +

+ --- # ⚑ **Getting started** @@ -38,6 +47,18 @@ Watch the changes in the **[CHANGELOG.md](CHANGELOG.md)** file. This project was generated using *[Josee9988/project-template](https://github.com/Josee9988/project-template)* πŸ“š +--- + +## πŸŽ‰ Was the $PROJECT_TYPE helpful? Help us raise these numbers up + +[![Github followers](https://img.shields.io/github/followers/$NEW_USERNAME.svg?style=social)](https://github.com/$NEW_USERNAME) +[![Github stars](https://img.shields.io/github/stars/$NEW_USERNAME/$PROJECT_NAME.svg?style=social)](https://github.com/$NEW_USERNAME/$PROJECT_NAME/stargazers) +[![Github watchers](https://img.shields.io/github/watchers/$NEW_USERNAME/$PROJECT_NAME.svg?style=social)](https://github.com/$NEW_USERNAME/$PROJECT_NAME/watchers) +[![Github forks](https://img.shields.io/github/forks/$NEW_USERNAME/$PROJECT_NAME.svg?style=social)](https://github.com/$NEW_USERNAME/$PROJECT_NAME/network/members) +[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=github-sponsors&color=red&style=social)](https://github.com/sponsors/$NEW_USERNAME) + +Enjoy! πŸ˜ƒ + _Made with a lot of ❀️❀️ by **[@$NEW_USERNAME](https://github.com/$NEW_USERNAME)**_ EOF" } From 26c39b4c02674c1050faaaa16f8dee587f905840 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 1 Apr 2021 18:33:09 +0200 Subject: [PATCH 065/152] "documented the readme with the new badges feature" --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5956470..c78554c 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ * This template can be used as a base layer for any of your future repositories/projects. * Make your project easy to maintain with **7 issue templates**. +* Quickstart your documentation with **badges** and a cool readme structure. * Make your _community healthier_ with all the guides like code of conduct, contributing, support, security... * Learn more with the [official Github guide on creating repositories from a template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). * To start using it; "**[click use this template](https://github.com/Josee9988/project-template/generate)**", create your new repository, @@ -60,7 +61,7 @@ for more information or guidance, follow the [Github guide](https://docs.github. 1. A **`SETUP_TEMPLATE.sh`** script that **MUST be executed right when you clone your repository**. The script will replace Jose's username and email (the author) with yours from all the. - 1. A README template file with a default template to start documenting your project. + 1. A README template file with a default template to start documenting your project. (it includes personalized badges and text with your project details) 1. A CHANGELOG template file based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). 1. An [issue_label_bot.yaml](/.github/issue_label_bot.yaml) file to use the popular Github bot. [Activate it or check its documentation](https://github.com/marketplace/issue-label-bot). 1. A [CONTRIBUTING](/.github/CONTRIBUTING.md) explaining how to contribute to the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/setting-guidelines-for-repository-contributors). @@ -116,7 +117,7 @@ Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not s * After **[generating your new repo with this template](https://github.com/Josee9988/project-template/generate)**, make sure to, right after you clone it, run the script `SETUP_TEMPLATE.sh`. -* Then you will be presented with all the files modified with your project details and information. It is very important to **manually review every file** to check if it fits your requirements and perform any necessary changes to customize the project as you want. +* Then you will be presented with all the files modified with your project details and information. It is very important to **manually review every file** to check if it fits your requirements and performs any necessary changes to customize the project as you want. * If you are using **Windows** and you don't know how to execute the `SETUP_TEMPLATE.sh` script: 1. Install **[git for Windows](https://git-scm.com/download/win)**. @@ -139,12 +140,12 @@ A couple of screenshots to delight you before you use this template. Bug issue template opened.

-* The README template. +* The README template. (badges and texts will be replaced with your project details)

- README.md template. + README.md template.

-* The CHANGELOG template. +* The CHANGELOG template. (project name and project type will be replaced with yours)

CHANGELOG.md template.

From b9e10ae171317d8fd0b48c102f6426f1565483cf Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 2 Apr 2021 09:12:31 +0200 Subject: [PATCH 066/152] "user and project name are selected automatically" --- CHANGELOG.md | 6 ++++++ SETUP_TEMPLATE.sh | 19 ++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23e5252..7a7353b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.1.1**] - 2021-04-02 + +### Added + +* Username and project name are automatically selected (user can manually force change them using bash parameters) + ## [**1.1.0**] - 2021-03-31 ### Added diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index bc26374..d4eb8d0 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -53,10 +53,23 @@ else source $FILE_FUNCTION_HELPERS || exit # obtain some global functions and variables, if the file isn't found exit fi -# prompt for the username, mail and name of the project -read -p "Enter your $(echo -e "$BBLUE""Github username""$NC") (without '@'): " NEW_USERNAME +# READ GITHUB USERNAME AND GITHUB PROJECT NAME +NAME_AND_PROJECT_UNPARSED=$(git ls-remote --get-url) + +if [ -z "$1" ]; then # if the username has been manually specified + NEW_USERNAME=$(echo "$NAME_AND_PROJECT_UNPARSED" | cut -d':' -f 2 | cut -d'/' -f 1) +else + NEW_USERNAME=$1 +fi + +if [ -z "$2" ]; then # if the project name has been manually specified + PROJECT_NAME=$(echo "$NAME_AND_PROJECT_UNPARSED" | cut -d'/' -f 2 | cut -d'.' -f 1) +else + PROJECT_NAME=$2 +fi + +# prompt for the, mail and type of the project read -p "Enter your $(echo -e "$BBLUE""email""$NC"): " NEW_EMAIL -read -p "Enter the name of the $(echo -e "$BBLUE""Github's project""$NC"): " PROJECT_NAME read -p "Enter $(echo -e "$BBLUE""what your project is""$NC") (program/extension/API/web/CLI tool/backend/frontend/scrapper/automation tool/etc): " PROJECT_TYPE # confirm that the data is correct From 55861c38639048fa2b54d7135e204d49a3939589 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 2 Apr 2021 09:22:45 +0200 Subject: [PATCH 067/152] "added information in the script about the arguments" --- README.md | 4 ++-- SETUP_TEMPLATE.sh | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c78554c..9315759 100644 --- a/README.md +++ b/README.md @@ -38,13 +38,13 @@ for more information or guidance, follow the [Github guide](https://docs.github. 3. **Execute** the `SETUP_TEMPLATE.sh` shell script to **customize** the files with your data. ```bash - bash SETUP_TEMPLATE.sh # execute the setup script. + bash SETUP_TEMPLATE.sh ``` Or you can also do it like this: ```bash - chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE-sh # another way of executing it + chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE.sh ``` Additionally, watch *[this video](https://asciinema.org/a/400202)* to see **how to execute the script**. diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index d4eb8d0..6a59f06 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -110,7 +110,12 @@ y | Y) # self remove this script rm -- "$0" ;; -n | N) echo "Then try it again!" ;; +n | N) + echo -e "\nIf your username or project name are NOT right (the autoselection wasn't successful), execute the script and give as a first argument your username and as a second argument your project name." + echo "As an example:" + echo -e "${UPurple}$0 MyCorrectUsername MyCorrectProjectName${NC}" + echo "Being the profile as: $0 " + ;; *) echo -e "${RED}Invalid option${NC}" ;; esac From 78225adc8961a4bb3ddbd3097206a2930443661c Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 2 Apr 2021 09:38:45 +0200 Subject: [PATCH 068/152] "updated documentation" --- CHANGELOG.md | 6 +++++- README.md | 8 +++++--- SETUP_TEMPLATE.sh | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a7353b..d71aada 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Added -* Username and project name are automatically selected (user can manually force change them using bash parameters) +* Username and project name are automatically selected (user can manually force change them using bash parameters [Username] [Project-Name]) + +### Changed + +* Asciinema video ## [**1.1.0**] - 2021-03-31 diff --git a/README.md b/README.md index 9315759..71a2dac 100644 --- a/README.md +++ b/README.md @@ -38,16 +38,18 @@ for more information or guidance, follow the [Github guide](https://docs.github. 3. **Execute** the `SETUP_TEMPLATE.sh` shell script to **customize** the files with your data. ```bash - bash SETUP_TEMPLATE.sh + bash SETUP_TEMPLATE.sh # additional parameters [Username] [Project-Name] ``` Or you can also do it like this: ```bash - chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE.sh + chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE.sh # additional parameters [Username] [Project-Name] ``` - Additionally, watch *[this video](https://asciinema.org/a/400202)* to see **how to execute the script**. + Additionally, watch *[this video](https://asciinema.org/a/404568)* to see **how to execute the script**. + + If the automatic detection of the username and project name are NOT right, please post an issue, and you can **manually correct** them like: `bash SETUP_TEMPLATE.sh RightUsername RightProjectName` being `$1` the new username and `$2` the new project name. 4. **Review** every single file and **customize** it as you like. 5. Build your project. πŸš€ diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index 6a59f06..760f1ed 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -114,7 +114,7 @@ n | N) echo -e "\nIf your username or project name are NOT right (the autoselection wasn't successful), execute the script and give as a first argument your username and as a second argument your project name." echo "As an example:" echo -e "${UPurple}$0 MyCorrectUsername MyCorrectProjectName${NC}" - echo "Being the profile as: $0 " + echo "Being the profile as: $0 [Username] [Project-Name]" ;; *) echo -e "${RED}Invalid option${NC}" ;; esac From ff31af93e5ae1eb09c458513f9882c10387f7efb Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 2 Apr 2021 09:46:46 +0200 Subject: [PATCH 069/152] "added dev.to post" --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 71a2dac..0d62516 100644 --- a/README.md +++ b/README.md @@ -166,6 +166,7 @@ A couple of screenshots to delight you before you use this template. For the right maintenance of the CHANGELOG.md, we recommend this [VSCode extension](https://github.com/Josee9988/Changelog-and-Markdown-snippets) and the read and understanding of the [keep a changelog guide](https://keepachangelog.com/en/1.0.0/). +Read and comment about it in this [dev.to post](https://dev.to/josee9988/the-ultimate-github-project-template-1264). --- From e8939b44484687796f96c893580ab0b52c6bb42c Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Apr 2021 08:43:44 +0200 Subject: [PATCH 070/152] "bug issue template will have the preceding '[BUG]' title" --- .github/ISSUE_TEMPLATE/1-bug-report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md index 13ca699..4fa6a65 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.md +++ b/.github/ISSUE_TEMPLATE/1-bug-report.md @@ -1,7 +1,7 @@ --- name: "🐞 Bug Report" about: "Report an issue to help the project improve." -title: "" +title: "[Bug] " labels: bug assignees: Josee9988 From 12979b19023c3916eaf79e0795087efc40221c1f Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Apr 2021 08:57:55 +0200 Subject: [PATCH 071/152] "improved and added multiple more sections to the user readme.md" --- CHANGELOG.md | 8 +++++ bin/FUNCTION_HELPERS.sh | 67 ++++++++++++++++++++++++++++++----------- 2 files changed, 57 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d71aada..ab4d709 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.2.0**] - 2021-04-07 + +### Added + +* Bug report issue templates have the preceding "[BUG]" title. +* Multiple readme template headings (About the project, project tree, screenshots, donators). +* Improved README.md template by fixing some minor problems. + ## [**1.1.1**] - 2021-04-02 ### Added diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh index 08e657f..3f18b5f 100644 --- a/bin/FUNCTION_HELPERS.sh +++ b/bin/FUNCTION_HELPERS.sh @@ -3,53 +3,84 @@ # SCRIPT WITH EXPORTED FUNCTIONS AND VARIABLES writeREADME() { - bash -c "NEW_USERNAME='NEW_USERNAME' PROJECT_NAME='PROJECT_NAME' PROJECT_TYPE='PROJECT_TYPE'; cat << EOF > README.md - + bash -c "NEW_USERNAME='NEW_USERNAME' PROJECT_NAME='PROJECT_NAME' PROJECT_TYPE='PROJECT_TYPE'; cat << EOF > README.md + # πŸ”₯ **$NEW_USERNAME/$PROJECT_NAME** -

+

\"Issues\" \"GitHub -

+
--- -# ⚑ **Getting started** +## πŸ€” **About the project** -* +* --- -# πŸš€ **Usage** +## ⚑ **Installation** -* +* --- -# πŸ“ **Aditional notes** +### πŸš€ **Usage** -* +* --- -# βš–οΈ **License and Changelog** +### 🌲 **Project tree** -See the license in **[LICENSE](LICENSE)** file. +* -Watch the changes in the **[CHANGELOG.md](CHANGELOG.md)** file. +--- + +## πŸ“ **Additional notes** + +* + +--- + +## πŸ“Έ **Screenshots** + + + +--- + +## 🍰 **Supporters and donators** + +We are currently looking for new donators to help and maintain this project! ❀️ + +By donating, you will help the development of this project and, *you will be featured in this $PROJECT_NAME's README.md* so everyone can see your kindness and visit your content ⭐. + + + + + + + +--- + +## βš–οΈπŸ“ **License and Changelog** + +See the license in the '**[LICENSE](LICENSE)**' file. + +Watch the changes in the '**[CHANGELOG.md](CHANGELOG.md)**' file. --- - -This project was generated using *[Josee9988/project-template](https://github.com/Josee9988/project-template)* πŸ“š +$PROJECT_NAME was generated from *[Josee9988/project-template](https://github.com/Josee9988/project-template)* πŸ“š --- -## πŸŽ‰ Was the $PROJECT_TYPE helpful? Help us raise these numbers up +## πŸŽ‰ Was the $PROJECT_TYPE helpful? Help us raise these numbers up! [![Github followers](https://img.shields.io/github/followers/$NEW_USERNAME.svg?style=social)](https://github.com/$NEW_USERNAME) [![Github stars](https://img.shields.io/github/stars/$NEW_USERNAME/$PROJECT_NAME.svg?style=social)](https://github.com/$NEW_USERNAME/$PROJECT_NAME/stargazers) @@ -64,8 +95,8 @@ EOF" } writeCHANGELOG() { - ACTUAL_DATE=$(date '+%Y-%m-%d') - bash -c "PROJECT_NAME='PROJECT_NAME' PROJECT_TYPE='PROJECT_TYPE' ACTUAL_DATE='ACTUAL_DATE'; cat << EOF > CHANGELOG.md + ACTUAL_DATE=$(date '+%Y-%m-%d') + bash -c "PROJECT_NAME='PROJECT_NAME' PROJECT_TYPE='PROJECT_TYPE' ACTUAL_DATE='ACTUAL_DATE'; cat << EOF > CHANGELOG.md # **Change Log** πŸ“œπŸ“ From 7f2698f0f8397773a5356a742e9cddfc65075166 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Apr 2021 09:02:35 +0200 Subject: [PATCH 072/152] "fixed donator badge" --- bin/FUNCTION_HELPERS.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh index 3f18b5f..e15d422 100644 --- a/bin/FUNCTION_HELPERS.sh +++ b/bin/FUNCTION_HELPERS.sh @@ -3,6 +3,7 @@ # SCRIPT WITH EXPORTED FUNCTIONS AND VARIABLES writeREADME() { + PROJECT_NAME=${PROJECT_NAME/-/ } bash -c "NEW_USERNAME='NEW_USERNAME' PROJECT_NAME='PROJECT_NAME' PROJECT_TYPE='PROJECT_TYPE'; cat << EOF > README.md # πŸ”₯ **$NEW_USERNAME/$PROJECT_NAME** @@ -61,7 +62,7 @@ We are currently looking for new donators to help and maintain this project! ❀ By donating, you will help the development of this project and, *you will be featured in this $PROJECT_NAME's README.md* so everyone can see your kindness and visit your content ⭐. - + From bfe7d331f4f4891c24c595d740eb9015a918a0e3 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Apr 2021 09:05:01 +0200 Subject: [PATCH 073/152] "added name to the github sponsors badge" --- bin/FUNCTION_HELPERS.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh index e15d422..a58869f 100644 --- a/bin/FUNCTION_HELPERS.sh +++ b/bin/FUNCTION_HELPERS.sh @@ -31,15 +31,15 @@ writeREADME() { --- -### πŸš€ **Usage** +## πŸš€ **Usage** * --- -### 🌲 **Project tree** +## 🌲 **Project tree** -* +* --- @@ -62,7 +62,7 @@ We are currently looking for new donators to help and maintain this project! ❀ By donating, you will help the development of this project and, *you will be featured in this $PROJECT_NAME's README.md* so everyone can see your kindness and visit your content ⭐. - + From b370974f99319c2d9853071bf0d7bf7049861338 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Apr 2021 09:11:31 +0200 Subject: [PATCH 074/152] "reorganized and reordered both user and repo readme.md" --- README.md | 4 +++- bin/FUNCTION_HELPERS.sh | 23 ++++++++++++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0d62516..5a16e7b 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not s --- -## πŸ•΅οΈ **Extra recommendations** +## πŸ“ **Additional notes** * After **[generating your new repo with this template](https://github.com/Josee9988/project-template/generate)**, make sure to, right after you clone it, run the script `SETUP_TEMPLATE.sh`. @@ -164,6 +164,8 @@ A couple of screenshots to delight you before you use this template. --- +## πŸ•΅οΈ **Extra recommendations** + For the right maintenance of the CHANGELOG.md, we recommend this [VSCode extension](https://github.com/Josee9988/Changelog-and-Markdown-snippets) and the read and understanding of the [keep a changelog guide](https://keepachangelog.com/en/1.0.0/). Read and comment about it in this [dev.to post](https://dev.to/josee9988/the-ultimate-github-project-template-1264). diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh index a58869f..d275ab2 100644 --- a/bin/FUNCTION_HELPERS.sh +++ b/bin/FUNCTION_HELPERS.sh @@ -69,28 +69,37 @@ By donating, you will help the development of this project and, *you will be fea --- -## βš–οΈπŸ“ **License and Changelog** - -See the license in the '**[LICENSE](LICENSE)**' file. - -Watch the changes in the '**[CHANGELOG.md](CHANGELOG.md)**' file. +$PROJECT_NAME was generated from *[Josee9988/project-template](https://github.com/Josee9988/project-template)* πŸ“š --- -$PROJECT_NAME was generated from *[Josee9988/project-template](https://github.com/Josee9988/project-template)* πŸ“š +πŸ•΅οΈ Extra recommendations + +* --- -## πŸŽ‰ Was the $PROJECT_TYPE helpful? Help us raise these numbers up! +## πŸŽ‰ Was the $PROJECT_TYPE helpful? Help us raise these numbers up [![Github followers](https://img.shields.io/github/followers/$NEW_USERNAME.svg?style=social)](https://github.com/$NEW_USERNAME) [![Github stars](https://img.shields.io/github/stars/$NEW_USERNAME/$PROJECT_NAME.svg?style=social)](https://github.com/$NEW_USERNAME/$PROJECT_NAME/stargazers) [![Github watchers](https://img.shields.io/github/watchers/$NEW_USERNAME/$PROJECT_NAME.svg?style=social)](https://github.com/$NEW_USERNAME/$PROJECT_NAME/watchers) [![Github forks](https://img.shields.io/github/forks/$NEW_USERNAME/$PROJECT_NAME.svg?style=social)](https://github.com/$NEW_USERNAME/$PROJECT_NAME/network/members) + [![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=github-sponsors&color=red&style=social)](https://github.com/sponsors/$NEW_USERNAME) Enjoy! πŸ˜ƒ +--- + +## βš–οΈπŸ“ **License and Changelog** + +See the license in the '**[LICENSE](LICENSE)**' file. + +Watch the changes in the '**[CHANGELOG.md](CHANGELOG.md)**' file. + +--- + _Made with a lot of ❀️❀️ by **[@$NEW_USERNAME](https://github.com/$NEW_USERNAME)**_ EOF" } From 63b3cdc7caf836e95993314d10b64f151d96311e Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Apr 2021 09:14:39 +0200 Subject: [PATCH 075/152] "for the github sponsor badge the project name will not have any '-'" --- bin/FUNCTION_HELPERS.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh index d275ab2..cfd665f 100644 --- a/bin/FUNCTION_HELPERS.sh +++ b/bin/FUNCTION_HELPERS.sh @@ -3,7 +3,7 @@ # SCRIPT WITH EXPORTED FUNCTIONS AND VARIABLES writeREADME() { - PROJECT_NAME=${PROJECT_NAME/-/ } + PROJECT_NAME_PARSED=${PROJECT_NAME/-/ } bash -c "NEW_USERNAME='NEW_USERNAME' PROJECT_NAME='PROJECT_NAME' PROJECT_TYPE='PROJECT_TYPE'; cat << EOF > README.md # πŸ”₯ **$NEW_USERNAME/$PROJECT_NAME** @@ -62,7 +62,7 @@ We are currently looking for new donators to help and maintain this project! ❀ By donating, you will help the development of this project and, *you will be featured in this $PROJECT_NAME's README.md* so everyone can see your kindness and visit your content ⭐. - + From b5e107197cdf324ef2423c9c7dfdd4dce4997e85 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Apr 2021 09:34:13 +0200 Subject: [PATCH 076/152] "updated project screenshots to fit the new readme changs" --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5a16e7b..b99b2a2 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,9 @@ A couple of screenshots to delight you before you use this template. * The README template. (badges and texts will be replaced with your project details)

- README.md template. + README.md template. + + README.md template.

* The CHANGELOG template. (project name and project type will be replaced with yours) From a154759f5e56617a8844ba8d5fdfe7172c40d706 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Apr 2021 09:37:26 +0200 Subject: [PATCH 077/152] "added video to see the whole readme.md video" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b99b2a2..0576af7 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ A couple of screenshots to delight you before you use this template.

README.md template. - README.md template. + Or watch a [this video](https://i.imgur.com/tKs4fFc.mp4) to see the whole README template.

* The CHANGELOG template. (project name and project type will be replaced with yours) From d44ef97138c5db8a38a45c80303d73d127fffb79 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Apr 2021 09:39:20 +0200 Subject: [PATCH 078/152] "video now has more quality" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0576af7..40683e2 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ A couple of screenshots to delight you before you use this template.

README.md template. - Or watch a [this video](https://i.imgur.com/tKs4fFc.mp4) to see the whole README template. + Or watch a [this video](https://gifs.com/gif/josee9988-s-readme-md-MwO5E3) to see the whole README template.

* The CHANGELOG template. (project name and project type will be replaced with yours) From 66016121271ba524c92a9e9f2cb9db2f3a46e5ed Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Wed, 14 Apr 2021 15:41:06 +0200 Subject: [PATCH 079/152] "added codeowners file" --- .github/CODEOWNERS | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..4cb66d4 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,6 @@ +# These owners will be the default owners for everything in +# the repo. Unless a later match takes precedence, +# @Josee9988 will be requested for +# review when someone opens a pull request. +# if you want to add more owners just write it after @Josee9988 +* @Josee9988 From e5f5abd600a2fcdea7f5f53d57ca074e744ecb47 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 15 Apr 2021 08:27:25 +0200 Subject: [PATCH 080/152] "1.3.0 added codeowners file" --- CHANGELOG.md | 10 ++++++++++ README.md | 38 +++++++++++++++++++++++++------------- 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab4d709..e24548b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.3.0**] - 2021-04-14 + +### Added + +* CODEOWNERS file inside the .github folder. + +### Fixed + +* Some README.md markdownlint bugs. + ## [**1.2.0**] - 2021-04-07 ### Added diff --git a/README.md b/README.md index 40683e2..d6cf3b6 100644 --- a/README.md +++ b/README.md @@ -32,9 +32,9 @@ clone your new repository and execute the `SETUP_TEMPLATE.sh` shell script to pe ## ⚑ **Installation** -1. To create a new repository from this template [generate your new repository from this template](https://github.com/Josee9988/project-template/generate) +1. To create a new repository from this template **[generate your new repository from this template](https://github.com/Josee9988/project-template/generate)** for more information or guidance, follow the [Github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). -2. Clone your repo and `cd` into it. +2. Clone your new repository **[generated from this template](https://github.com/Josee9988/project-template/generate)** and `cd` into it. 3. **Execute** the `SETUP_TEMPLATE.sh` shell script to **customize** the files with your data. ```bash @@ -69,9 +69,10 @@ The script will replace Jose's username and email (the author) with yours from a 1. A [CONTRIBUTING](/.github/CONTRIBUTING.md) explaining how to contribute to the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/setting-guidelines-for-repository-contributors). 1. A [SUPPORT](/.github/SUPPORT.md) explaining how to support the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-support-resources-to-your-project). 1. A [SECURITY](/.github/SECURITY.md) with a guide on how to post a security issue. [Learn more with the Github guide](https://docs.github.com/es/github/managing-security-vulnerabilities/adding-a-security-policy-to-your-repository). - 1. A [CODE_OF_CONDUCT](/.github/CODE_OF_CONDUCT.md) with a basic code of conduct. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-a-code-of-conduct-to-your-project). - 1. A [PULL_REQUEST_TEMPLATE](/.github/pull_request_template.md) with a template for your pull request that closes issues with keywords. [Learn more with the Github guide](https://docs.github.com/es/github/building-a-strong-community/creating-a-pull-request-template-for-your-repository). - 1. Multiple [issues templates](/.github/ISSUE_TEMPLATE). [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository). +1. A [CODEOWNERS](/.github/CODEOWNERS) with the new user as the main owner. [Learn more with the Github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners). +1. A [CODE_OF_CONDUCT](/.github/CODE_OF_CONDUCT.md) with a basic code of conduct. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-a-code-of-conduct-to-your-project). +1. A [PULL_REQUEST_TEMPLATE](/.github/pull_request_template.md) with a template for your pull request that closes issues with keywords. [Learn more with the Github guide](https://docs.github.com/es/github/building-a-strong-community/creating-a-pull-request-template-for-your-repository). +1. Multiple [issues templates](/.github/ISSUE_TEMPLATE). [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository). 1. A [config.yml](/.github/ISSUE_TEMPLATE/config.yml) with the config and information about the issue templates. 1. A [Blank issue template](/.github/ISSUE_TEMPLATE) with the super basic stuff, all the issues should contain. 1. A [Bug issue template](/.github/ISSUE_TEMPLATE/1-bug-report.md). @@ -91,6 +92,7 @@ Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not s . β”œβ”€β”€ CHANGELOG.md β”œβ”€β”€ .github +β”‚Β Β  β”œβ”€β”€ CODEOWNERS β”‚Β Β  β”œβ”€β”€ CODE_OF_CONDUCT.md β”‚Β Β  β”œβ”€β”€ CONTRIBUTING.md β”‚Β Β  β”œβ”€β”€ FUNDING.yml @@ -110,7 +112,7 @@ Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not s β”œβ”€β”€ .gitignore └── README.md -2 directories, 20 files +2 directories, 21 files ``` --- @@ -132,34 +134,44 @@ Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not s A couple of screenshots to delight you before you use this template. -* All the issue templates. +### πŸ”Ί All the issue templates +

All the issue templates.

-* An issue template opened. +### πŸ”» An issue template opened +

Bug issue template opened.

-* The README template. (badges and texts will be replaced with your project details) +### πŸ“˜ The README template + +(badges and texts will be replaced with your project details) +

README.md template. - Or watch a [this video](https://gifs.com/gif/josee9988-s-readme-md-MwO5E3) to see the whole README template. + Or watch [this video](https://gifs.com/gif/josee9988-s-readme-md-MwO5E3) to see the whole README template.

-* The CHANGELOG template. (project name and project type will be replaced with yours) +### πŸ“ The CHANGELOG template + +(project name and project type will be replaced with yours) +

CHANGELOG.md template.

-* Security policy +### πŸ›‘οΈ Security policy +

Security issue.

-* Community profile at 100% +### πŸ’Ό Community profile at 100% +

Community profile.

From 878a9230c75eb994b489259b4e9c93c0b7f69c3a Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 16 Apr 2021 19:17:52 +0200 Subject: [PATCH 081/152] "added used bots section in the readme.md" --- CHANGELOG.md | 7 +++++++ README.md | 5 +++++ SETUP_TEMPLATE.sh | 3 +++ 3 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e24548b..077046c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [Unreleased] + +### Added + +* Readme section with the recommended/used bots that the users should install. +* Some informational comments in the script referencing the project's documentation. + ## [**1.3.0**] - 2021-04-14 ### Added diff --git a/README.md b/README.md index d6cf3b6..2931cec 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,10 @@ Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not s 2. Right-click on the git repository folder and click "*git bash here*". 3. Then just perform *`bash SETUP_TEMPLATE.sh`* **or** *`chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE.sh`*. +### πŸ€– **Used Github bots** + +1. The `issue_label_bot.yaml` file depends on the **[issue label bot](https://github.com/marketplace/issue-label-bot)**. + --- ## πŸ“Έ **Screenshots** @@ -183,6 +187,7 @@ A couple of screenshots to delight you before you use this template. For the right maintenance of the CHANGELOG.md, we recommend this [VSCode extension](https://github.com/Josee9988/Changelog-and-Markdown-snippets) and the read and understanding of the [keep a changelog guide](https://keepachangelog.com/en/1.0.0/). Read and comment about it in this [dev.to post](https://dev.to/josee9988/the-ultimate-github-project-template-1264). +We also recommend installing all the used bots. --- diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index 760f1ed..9cbade8 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -29,6 +29,7 @@ BBLUE='\033[1;34m' GREEN='\033[1;32m' FILE_FUNCTION_HELPERS=bin/FUNCTION_HELPERS.sh +###### CHECKS BEFORE THE SCRIPT STARTS ###### ### Check if the .github directory does exist ### if [ ! -d ".github/" ]; then echo -e "${RED}Directory .github/ DOES NOT EXIST.${NC}" @@ -68,6 +69,8 @@ else PROJECT_NAME=$2 fi +###### START OF THE SCRIPT ###### +echo -e "Read carefully all the documentation before you continue executing this script: \t${UPurple}https://github.com/Josee9988/project-template${NC}" # prompt for the, mail and type of the project read -p "Enter your $(echo -e "$BBLUE""email""$NC"): " NEW_EMAIL read -p "Enter $(echo -e "$BBLUE""what your project is""$NC") (program/extension/API/web/CLI tool/backend/frontend/scrapper/automation tool/etc): " PROJECT_TYPE From 2cf9a4e7b5cc41c81c794c9148d60c84f8c10a64 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 17 Apr 2021 09:30:59 +0200 Subject: [PATCH 082/152] "added some labels in the new settings.yml file" --- .github/settings.yml | 144 +++++++++++++++++++++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 145 insertions(+), 1 deletion(-) create mode 100644 .github/settings.yml diff --git a/.github/settings.yml b/.github/settings.yml new file mode 100644 index 0000000..1430cf8 --- /dev/null +++ b/.github/settings.yml @@ -0,0 +1,144 @@ +repository: + # See https://developer.github.com/v3/repos/#edit for all available settings. + + # The name of the repository. Changing this will rename the repository + #name: repo-name + + # A short description of the repository that will show up on GitHub + #description: description of repo + + # A URL with more information about the repository + #homepage: https://example.github.io/ + + # A comma-separated list of topics to set on the repository + #topics: project, template, project-template + + # Either `true` to make the repository private, or `false` to make it public. + #private: false + + # Either `true` to enable issues for this repository, `false` to disable them. + #has_issues: true + + # Either `true` to enable the wiki for this repository, `false` to disable it. + #has_wiki: true + + # Either `true` to enable downloads for this repository, `false` to disable them. + #has_downloads: true + + # Updates the default branch for this repository. + #default_branch: master + + # Either `true` to allow squash-merging pull requests, or `false` to prevent + # squash-merging. + #allow_squash_merge: true + + # Either `true` to allow merging pull requests with a merge commit, or `false` + # to prevent merging pull requests with merge commits. + #allow_merge_commit: true + + # Either `true` to allow rebase-merging pull requests, or `false` to prevent + # rebase-merging. + #allow_rebase_merge: true + +# Labels: define labels for Issues and Pull Requests +labels: + - name: Bug + color: CC0000 + description: 🐞 An issue with the project + oldname: bug + + - name: Feature + color: 486DB8 + description: πŸš€ Suggest a new feature for the project + oldname: enhancement + + - name: Invalid + color: E2E62E + description: This issue doesn't seem right + oldname: invalid + + - name: Question + color: 962EE6 + description: ❓ This issue is just a question + oldname: question + + - name: Extra information needed + color: D9840D + description: ⚠️ This won't be solved until we have more information about the issue + + - name: 3rd party issue + color: D90D8B + description: πŸ“¦ This issue might be caused by a 3rd party script/package/... + + - name: Windows + color: 2E65E6 + Description: Is windows-specific + + - name: Mac + color: AEB1C2 + Description: Is mac-specific + + - name: Linux + color: B56838 + Description: Is linux-specific +# # Collaborators: give specific users access to this repository. +# # See https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator for available options +# collaborators: +# # - username: bkeepers +# # permission: push +# # - username: hubot +# # permission: pull + +# # Note: `permission` is only valid on organization-owned repositories. +# # The permission to grant the collaborator. Can be one of: +# # * `pull` - can pull, but not push to or administer this repository. +# # * `push` - can pull and push, but not administer this repository. +# # * `admin` - can pull, push and administer this repository. +# # * `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions. +# # * `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access. + +# # See https://developer.github.com/v3/teams/#add-or-update-team-repository for available options +# teams: +# - name: core +# # The permission to grant the team. Can be one of: +# # * `pull` - can pull, but not push to or administer this repository. +# # * `push` - can pull and push, but not administer this repository. +# # * `admin` - can pull, push and administer this repository. +# # * `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions. +# # * `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access. +# permission: admin +# - name: docs +# permission: push + +# branches: +# - name: master +# # https://developer.github.com/v3/repos/branches/#update-branch-protection +# # Branch Protection settings. Set to null to disable +# protection: +# # Required. Require at least one approving review on a pull request, before merging. Set to null to disable. +# required_pull_request_reviews: +# # The number of approvals required. (1-6) +# required_approving_review_count: 1 +# # Dismiss approved reviews automatically when a new commit is pushed. +# dismiss_stale_reviews: true +# # Blocks merge until code owners have reviewed. +# require_code_owner_reviews: true +# # Specify which users and teams can dismiss pull request reviews. Pass an empty dismissal_restrictions object to disable. User and team dismissal_restrictions are only available for organization-owned repositories. Omit this parameter for personal repositories. +# dismissal_restrictions: +# users: [] +# teams: [] +# # Required. Require status checks to pass before merging. Set to null to disable +# required_status_checks: +# # Required. Require branches to be up to date before merging. +# strict: true +# # Required. The list of status checks to require in order to merge into this branch +# contexts: [] +# # Required. Enforce all configured restrictions for administrators. Set to true to enforce required status checks for repository administrators. Set to null to disable. +# enforce_admins: true +# # Prevent merge commits from being pushed to matching branches +# required_linear_history: true +# # Required. Restrict who can push to this branch. Team and user restrictions are only available for organization-owned repositories. Set to null to disable. +# restrictions: +# apps: [] +# users: [] +# teams: [] diff --git a/README.md b/README.md index 2931cec..d6d6722 100644 --- a/README.md +++ b/README.md @@ -187,7 +187,7 @@ A couple of screenshots to delight you before you use this template. For the right maintenance of the CHANGELOG.md, we recommend this [VSCode extension](https://github.com/Josee9988/Changelog-and-Markdown-snippets) and the read and understanding of the [keep a changelog guide](https://keepachangelog.com/en/1.0.0/). Read and comment about it in this [dev.to post](https://dev.to/josee9988/the-ultimate-github-project-template-1264). -We also recommend installing all the used bots. +We also recommend installing all the [used bots](https://github.com/Josee9988/project-template#-used-github-bots). --- From 8feb39761e3eb385e808583f77e3fc40fef58a07 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 17 Apr 2021 09:43:52 +0200 Subject: [PATCH 083/152] "updated some new labels" --- .github/issue_label_bot.yaml | 6 +++--- .github/settings.yml | 30 +++++++++--------------------- 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/.github/issue_label_bot.yaml b/.github/issue_label_bot.yaml index b642226..c5b27aa 100644 --- a/.github/issue_label_bot.yaml +++ b/.github/issue_label_bot.yaml @@ -1,4 +1,4 @@ label-alias: - bug: 'bug' - feature_request: 'enhancement' - question: 'question' + bug: 'Bug' + feature_request: 'Feature' + question: 'Question' diff --git a/.github/settings.yml b/.github/settings.yml index 1430cf8..ef245e7 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -44,43 +44,31 @@ repository: labels: - name: Bug color: CC0000 - description: 🐞 An issue with the project - oldname: bug - + description: '🐞 An issue with the project' - name: Feature color: 486DB8 - description: πŸš€ Suggest a new feature for the project - oldname: enhancement - + description: 'πŸš€ Suggest a new feature for the project' - name: Invalid color: E2E62E - description: This issue doesn't seem right - oldname: invalid - + description: "⚠️ This issue doesn't seem right" - name: Question color: 962EE6 - description: ❓ This issue is just a question - oldname: question - + description: '❓ This issue is just a question' - name: Extra information needed color: D9840D - description: ⚠️ This won't be solved until we have more information about the issue - + description: "This won't be solved until we have more information about the issue" - name: 3rd party issue color: D90D8B - description: πŸ“¦ This issue might be caused by a 3rd party script/package/... - + description: 'πŸ“¦ This issue might be caused by a 3rd party script/package/...' - name: Windows color: 2E65E6 - Description: Is windows-specific - + Description: 'Is windows-specific' - name: Mac color: AEB1C2 - Description: Is mac-specific - + Description: 'Is mac-specific' - name: Linux color: B56838 - Description: Is linux-specific + Description: 'Is linux-specific' # # Collaborators: give specific users access to this repository. # # See https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator for available options # collaborators: From 5f23a5b430876a4218ce7a2750f8aff3bb1cd7c4 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sun, 18 Apr 2021 09:28:58 +0200 Subject: [PATCH 084/152] "quoted all the labels to prevent scaping" --- .github/settings.yml | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/.github/settings.yml b/.github/settings.yml index ef245e7..04bd56e 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -42,32 +42,36 @@ repository: # Labels: define labels for Issues and Pull Requests labels: - - name: Bug - color: CC0000 + - name: 'bug' + color: 'CC0000' description: '🐞 An issue with the project' - - name: Feature - color: 486DB8 + oldname: 'bug' + - name: 'Feature' + color: '486DB8' description: 'πŸš€ Suggest a new feature for the project' - - name: Invalid - color: E2E62E + oldname: 'enhancement' + - name: 'Invalid' + color: 'E2E62E' description: "⚠️ This issue doesn't seem right" - - name: Question - color: 962EE6 + oldname: 'invalid' + - name: 'Question' + color: '962EE6' description: '❓ This issue is just a question' - - name: Extra information needed - color: D9840D + oldname: 'question' + - name: 'Extra information needed' + color: 'D9840D' description: "This won't be solved until we have more information about the issue" - - name: 3rd party issue - color: D90D8B + - name: '3rd party issue' + color: 'D90D8B' description: 'πŸ“¦ This issue might be caused by a 3rd party script/package/...' - - name: Windows - color: 2E65E6 + - name: 'Windows' + color: '2E65E6' Description: 'Is windows-specific' - - name: Mac - color: AEB1C2 + - name: 'Mac' + color: 'AEB1C2' Description: 'Is mac-specific' - - name: Linux - color: B56838 + - name: 'Linux' + color: 'B56838' Description: 'Is linux-specific' # # Collaborators: give specific users access to this repository. # # See https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator for available options From 2f108a8a7e3fc4f91deb66063ad768d91a3f44a2 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sun, 18 Apr 2021 09:29:10 +0200 Subject: [PATCH 085/152] "all issues are now appearing" --- .github/settings.yml | 93 +++++++++++++++++++++++++++++++------------- 1 file changed, 67 insertions(+), 26 deletions(-) diff --git a/.github/settings.yml b/.github/settings.yml index 04bd56e..6f5f72d 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -41,38 +41,79 @@ repository: #allow_rebase_merge: true # Labels: define labels for Issues and Pull Requests + labels: - - name: 'bug' - color: 'CC0000' - description: '🐞 An issue with the project' - oldname: 'bug' - - name: 'Feature' - color: '486DB8' - description: 'πŸš€ Suggest a new feature for the project' - oldname: 'enhancement' + - name: 'Type: Bug' + color: CC0000 + description: Something isn't working as expected. + + - name: 'Type: Feature' + color: 486DB8 + description: Suggest an improvement for an existing feature. + + - name: 'Type: Enhancement' + color: 486DB8 + description: Suggest a new feature. + + - name: 'Type: Question' + color: 312DEB + description: Request for information. + + - name: 'Status: Awaiting Review' + color: 24d15d + description: Ready for review. + + - name: 'Status: Waiting' + color: EBCB2D + description: Waiting on something else to be ready. + + - name: 'Status: Stale' + color: C8D9E6 + description: Has had no activity for some time. + + - name: 'Duplicate' + color: EB862D + description: Duplicate of another task. + - name: 'Invalid' - color: 'E2E62E' - description: "⚠️ This issue doesn't seem right" - oldname: 'invalid' - - name: 'Question' - color: '962EE6' - description: '❓ This issue is just a question' - oldname: 'question' - - name: 'Extra information needed' - color: 'D9840D' - description: "This won't be solved until we have more information about the issue" + color: EB862D + description: This issue doesn't seem right. + + - name: 'Priority: High' + color: cf1d8d + description: Task is considered higher-priority. + + - name: 'Priority: Low' + color: 992389 + description: Task is considered lower-priority. + + - name: 'WIP' + color: f0cc1d + description: Currently being worked on. + + - name: 'Documentation' + color: 2fbceb + description: An issue with the documentation. + + - name: "Won't Fix" + color: C8D9E6 + description: Reported issue is working as intended. + - name: '3rd party issue' - color: 'D90D8B' - description: 'πŸ“¦ This issue might be caused by a 3rd party script/package/...' + color: D90D8B + description: This issue might be caused by a 3rd party script/package/... + - name: 'Windows' - color: '2E65E6' - Description: 'Is windows-specific' + color: 2E65E6 + Description: Is windows-specific + - name: 'Mac' - color: 'AEB1C2' - Description: 'Is mac-specific' + color: AEB1C2 + Description: Is mac-specific + - name: 'Linux' - color: 'B56838' - Description: 'Is linux-specific' + color: B56838 + Description: Is linux-specific # # Collaborators: give specific users access to this repository. # # See https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator for available options # collaborators: From 297452e865d9f760266c06a1b37eb369a08365f1 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sun, 18 Apr 2021 09:34:22 +0200 Subject: [PATCH 086/152] "updated colors" --- .github/settings.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/settings.yml b/.github/settings.yml index 6f5f72d..15bd4d2 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -48,15 +48,15 @@ labels: description: Something isn't working as expected. - name: 'Type: Feature' - color: 486DB8 + color: 6694f2 description: Suggest an improvement for an existing feature. - name: 'Type: Enhancement' - color: 486DB8 + color: 6694f2 description: Suggest a new feature. - name: 'Type: Question' - color: 312DEB + color: 9309ab description: Request for information. - name: 'Status: Awaiting Review' @@ -64,7 +64,7 @@ labels: description: Ready for review. - name: 'Status: Waiting' - color: EBCB2D + color: 38C968 description: Waiting on something else to be ready. - name: 'Status: Stale' @@ -76,15 +76,15 @@ labels: description: Duplicate of another task. - name: 'Invalid' - color: EB862D + color: faef50 description: This issue doesn't seem right. - name: 'Priority: High' - color: cf1d8d + color: ff0aa4 description: Task is considered higher-priority. - name: 'Priority: Low' - color: 992389 + color: 871c4b description: Task is considered lower-priority. - name: 'WIP' @@ -112,7 +112,7 @@ labels: Description: Is mac-specific - name: 'Linux' - color: B56838 + color: E95420 Description: Is linux-specific # # Collaborators: give specific users access to this repository. # # See https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator for available options From 8bb98ec3a5717e3328a5647f731671424e96dd4d Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sun, 18 Apr 2021 09:35:07 +0200 Subject: [PATCH 087/152] "updated issue label bot to match new settings.yml" --- .github/issue_label_bot.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/issue_label_bot.yaml b/.github/issue_label_bot.yaml index c5b27aa..b83d27f 100644 --- a/.github/issue_label_bot.yaml +++ b/.github/issue_label_bot.yaml @@ -1,4 +1,4 @@ label-alias: - bug: 'Bug' - feature_request: 'Feature' - question: 'Question' + bug: 'Type: Bug' + feature_request: 'Type: Feature' + question: 'Type: Question' From 42f75f2f5fd4d9965d7d4785c8a1a9561cebcdb9 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sun, 18 Apr 2021 10:02:58 +0200 Subject: [PATCH 088/152] "updated changelog and fixed and improved some labels" --- .github/settings.yml | 12 ++++++------ CHANGELOG.md | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/settings.yml b/.github/settings.yml index 15bd4d2..98cc801 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -73,17 +73,17 @@ labels: - name: 'Duplicate' color: EB862D - description: Duplicate of another task. + description: Duplicate of another issue. - name: 'Invalid' color: faef50 description: This issue doesn't seem right. - - name: 'Priority: High' + - name: 'Priority: High +' color: ff0aa4 description: Task is considered higher-priority. - - name: 'Priority: Low' + - name: 'Priority: Low -' color: 871c4b description: Task is considered lower-priority. @@ -105,15 +105,15 @@ labels: - name: 'Windows' color: 2E65E6 - Description: Is windows-specific + description: Is Windows-specific - name: 'Mac' color: AEB1C2 - Description: Is mac-specific + description: Is Mac-specific - name: 'Linux' color: E95420 - Description: Is linux-specific + description: Is Linux-specific # # Collaborators: give specific users access to this repository. # # See https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator for available options # collaborators: diff --git a/CHANGELOG.md b/CHANGELOG.md index 077046c..197a525 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) * Readme section with the recommended/used bots that the users should install. * Some informational comments in the script referencing the project's documentation. +* A total of 18 new labels that will be created right when you clone your repo using github probot settings. ## [**1.3.0**] - 2021-04-14 From 00a83ac613d5f0409c9115ce6fef89d90fc10945 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Mon, 19 Apr 2021 08:08:35 +0200 Subject: [PATCH 089/152] prepared documentation for the new settings bot feature --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d6d6722..8009c17 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,8 @@ The script will replace Jose's username and email (the author) with yours from a 1. A README template file with a default template to start documenting your project. (it includes personalized badges and text with your project details) 1. A CHANGELOG template file based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - 1. An [issue_label_bot.yaml](/.github/issue_label_bot.yaml) file to use the popular Github bot. [Activate it or check its documentation](https://github.com/marketplace/issue-label-bot). + 1. An [issue_label_bot.yaml](/.github/issue_label_bot.yaml) file to use the issue adder Github bot. [Activate it or check its documentation](https://github.com/marketplace/issue-label-bot). + 1. An [settings.yml](/.github/settings.yml) file to use the popular settings Github bot. [Activate it or check its documentation](https://probot.github.io/apps/settings/). 1. A [CONTRIBUTING](/.github/CONTRIBUTING.md) explaining how to contribute to the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/setting-guidelines-for-repository-contributors). 1. A [SUPPORT](/.github/SUPPORT.md) explaining how to support the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-support-resources-to-your-project). 1. A [SECURITY](/.github/SECURITY.md) with a guide on how to post a security issue. [Learn more with the Github guide](https://docs.github.com/es/github/managing-security-vulnerabilities/adding-a-security-policy-to-your-repository). @@ -92,6 +93,7 @@ Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not s . β”œβ”€β”€ CHANGELOG.md β”œβ”€β”€ .github +β”‚Β Β  β”œβ”€β”€ settings.yml β”‚Β Β  β”œβ”€β”€ CODEOWNERS β”‚Β Β  β”œβ”€β”€ CODE_OF_CONDUCT.md β”‚Β Β  β”œβ”€β”€ CONTRIBUTING.md @@ -112,7 +114,7 @@ Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not s β”œβ”€β”€ .gitignore └── README.md -2 directories, 21 files +2 directories, 22 files ``` --- @@ -131,6 +133,8 @@ Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not s ### πŸ€– **Used Github bots** 1. The `issue_label_bot.yaml` file depends on the **[issue label bot](https://github.com/marketplace/issue-label-bot)**. +2. The `settings.yml` file depends on the **[settings label bot](https://probot.github.io/apps/settings/)**. +3. --- @@ -160,6 +164,14 @@ A couple of screenshots to delight you before you use this template. Or watch [this video](https://gifs.com/gif/josee9988-s-readme-md-MwO5E3) to see the whole README template.

+### πŸ”– The labels for your issues + +If the bot [probot-settings](https://probot.github.io/apps/settings/) is not installed you will not have these beautiful labels! + +

+ LABELS +

+ ### πŸ“ The CHANGELOG template (project name and project type will be replaced with yours) From 08b890acb90c3fe5bd2adf5cff4647a10285a10c Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Mon, 19 Apr 2021 08:22:10 +0200 Subject: [PATCH 090/152] "improved colors of labels" --- .github/settings.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/settings.yml b/.github/settings.yml index 98cc801..83a4ffa 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -44,7 +44,7 @@ repository: labels: - name: 'Type: Bug' - color: CC0000 + color: e80c0c description: Something isn't working as expected. - name: 'Type: Feature' @@ -63,12 +63,16 @@ labels: color: 24d15d description: Ready for review. + - name: 'Status: WIP' + color: 07b340 + description: Currently being worked on. + - name: 'Status: Waiting' color: 38C968 description: Waiting on something else to be ready. - name: 'Status: Stale' - color: C8D9E6 + color: 66b38a description: Has had no activity for some time. - name: 'Duplicate' @@ -80,39 +84,35 @@ labels: description: This issue doesn't seem right. - name: 'Priority: High +' - color: ff0aa4 + color: ff008c description: Task is considered higher-priority. - name: 'Priority: Low -' - color: 871c4b + color: 690a34 description: Task is considered lower-priority. - - name: 'WIP' - color: f0cc1d - description: Currently being worked on. - - name: 'Documentation' color: 2fbceb description: An issue with the documentation. - - name: "Won't Fix" + - name: "Won't fix" color: C8D9E6 description: Reported issue is working as intended. - name: '3rd party issue' - color: D90D8B - description: This issue might be caused by a 3rd party script/package/... + color: e88707 + description: This issue might be caused by a 3rd party script/package/other reasons - - name: 'Windows' - color: 2E65E6 + - name: 'Os: Windows' + color: AEB1C2 description: Is Windows-specific - - name: 'Mac' + - name: 'Os: Mac' color: AEB1C2 description: Is Mac-specific - - name: 'Linux' - color: E95420 + - name: 'Os: Linux' + color: AEB1C2 description: Is Linux-specific # # Collaborators: give specific users access to this repository. # # See https://developer.github.com/v3/repos/collaborators/#add-user-as-a-collaborator for available options From cd08db871a01a95ee6cffc6c997b17a496d414bf Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Mon, 19 Apr 2021 08:24:03 +0200 Subject: [PATCH 091/152] "documented the readme and the changelog. v1.4.0" --- CHANGELOG.md | 6 +++--- README.md | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 197a525..d37cc35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,13 +7,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- -## [Unreleased] +## [**1.4.0**] - 2021-04-19 ### Added -* Readme section with the recommended/used bots that the users should install. +* Readme file with the section with the recommended/used bots that the users should install. * Some informational comments in the script referencing the project's documentation. -* A total of 18 new labels that will be created right when you clone your repo using github probot settings. +* A total of 18 new labels will be created right when you clone your repo using Github Probot settings. ## [**1.3.0**] - 2021-04-14 diff --git a/README.md b/README.md index 8009c17..8cba4e5 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,8 @@ * This template can be used as a base layer for any of your future repositories/projects. * Make your project easy to maintain with **7 issue templates**. -* Quickstart your documentation with **badges** and a cool readme structure. +* Quickstart your documentation with personalized **readme badges** and a cool readme structure. +* Manage your issues with **18 issue labels** created just for you! * Make your _community healthier_ with all the guides like code of conduct, contributing, support, security... * Learn more with the [official Github guide on creating repositories from a template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). * To start using it; "**[click use this template](https://github.com/Josee9988/project-template/generate)**", create your new repository, @@ -66,7 +67,7 @@ The script will replace Jose's username and email (the author) with yours from a 1. A README template file with a default template to start documenting your project. (it includes personalized badges and text with your project details) 1. A CHANGELOG template file based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). 1. An [issue_label_bot.yaml](/.github/issue_label_bot.yaml) file to use the issue adder Github bot. [Activate it or check its documentation](https://github.com/marketplace/issue-label-bot). - 1. An [settings.yml](/.github/settings.yml) file to use the popular settings Github bot. [Activate it or check its documentation](https://probot.github.io/apps/settings/). + 1. A [settings.yml](/.github/settings.yml) file to use the popular settings Github bot. [Activate it or check its documentation](https://probot.github.io/apps/settings/). 1. A [CONTRIBUTING](/.github/CONTRIBUTING.md) explaining how to contribute to the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/setting-guidelines-for-repository-contributors). 1. A [SUPPORT](/.github/SUPPORT.md) explaining how to support the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-support-resources-to-your-project). 1. A [SECURITY](/.github/SECURITY.md) with a guide on how to post a security issue. [Learn more with the Github guide](https://docs.github.com/es/github/managing-security-vulnerabilities/adding-a-security-policy-to-your-repository). @@ -134,7 +135,6 @@ Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not s 1. The `issue_label_bot.yaml` file depends on the **[issue label bot](https://github.com/marketplace/issue-label-bot)**. 2. The `settings.yml` file depends on the **[settings label bot](https://probot.github.io/apps/settings/)**. -3. --- @@ -156,7 +156,7 @@ A couple of screenshots to delight you before you use this template. ### πŸ“˜ The README template -(badges and texts will be replaced with your project details) +Badges and texts will be replaced with your project details!

README.md template. @@ -169,7 +169,7 @@ A couple of screenshots to delight you before you use this template. If the bot [probot-settings](https://probot.github.io/apps/settings/) is not installed you will not have these beautiful labels!

- LABELS + LABELS

### πŸ“ The CHANGELOG template From 56743473877699711b60b768807ff315b4c51722 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Mon, 19 Apr 2021 09:52:53 +0200 Subject: [PATCH 092/152] "switched enhancement and feature label descriptions" --- .github/settings.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/settings.yml b/.github/settings.yml index 83a4ffa..cd5af0a 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -47,12 +47,12 @@ labels: color: e80c0c description: Something isn't working as expected. - - name: 'Type: Feature' - color: 6694f2 + - name: 'Type: Enhancement' + color: 54b2ff description: Suggest an improvement for an existing feature. - - name: 'Type: Enhancement' - color: 6694f2 + - name: 'Type: Feature' + color: 54b2ff description: Suggest a new feature. - name: 'Type: Question' From 2d2919efe8b07340ff6e78259132592ad31414bc Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Tue, 20 Apr 2021 08:05:30 +0200 Subject: [PATCH 093/152] "added security label" --- .github/settings.yml | 6 +++++- CHANGELOG.md | 10 ++++++++++ README.md | 10 +++++----- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/settings.yml b/.github/settings.yml index cd5af0a..f321745 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -55,6 +55,10 @@ labels: color: 54b2ff description: Suggest a new feature. + - name: 'Type: Security' + color: fbff00 + description: A problem or enhancement related to a security issue. + - name: 'Type: Question' color: 9309ab description: Request for information. @@ -93,7 +97,7 @@ labels: - name: 'Documentation' color: 2fbceb - description: An issue with the documentation. + description: An issue/change with the documentation. - name: "Won't fix" color: C8D9E6 diff --git a/CHANGELOG.md b/CHANGELOG.md index d37cc35..cd55f06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.4.1**] - 2021-04-20 + +### Added + +* Security label + +### Changed + +* Project tree to its updated version. + ## [**1.4.0**] - 2021-04-19 ### Added diff --git a/README.md b/README.md index 8cba4e5..a59fb1c 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ * This template can be used as a base layer for any of your future repositories/projects. * Make your project easy to maintain with **7 issue templates**. * Quickstart your documentation with personalized **readme badges** and a cool readme structure. -* Manage your issues with **18 issue labels** created just for you! +* Manage your issues with **19 issue labels** created just for you! * Make your _community healthier_ with all the guides like code of conduct, contributing, support, security... * Learn more with the [official Github guide on creating repositories from a template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). * To start using it; "**[click use this template](https://github.com/Josee9988/project-template/generate)**", create your new repository, @@ -94,9 +94,8 @@ Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not s . β”œβ”€β”€ CHANGELOG.md β”œβ”€β”€ .github -β”‚Β Β  β”œβ”€β”€ settings.yml -β”‚Β Β  β”œβ”€β”€ CODEOWNERS β”‚Β Β  β”œβ”€β”€ CODE_OF_CONDUCT.md +β”‚Β Β  β”œβ”€β”€ CODEOWNERS β”‚Β Β  β”œβ”€β”€ CONTRIBUTING.md β”‚Β Β  β”œβ”€β”€ FUNDING.yml β”‚Β Β  β”œβ”€β”€ issue_label_bot.yaml @@ -111,11 +110,12 @@ Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not s β”‚Β Β  β”œβ”€β”€ ISSUE_TEMPLATE.md β”‚Β Β  β”œβ”€β”€ pull_request_template.md β”‚Β Β  β”œβ”€β”€ SECURITY.md +β”‚Β Β  β”œβ”€β”€ settings.yml β”‚Β Β  └── SUPPORT.md β”œβ”€β”€ .gitignore └── README.md -2 directories, 22 files +2 directories, 20 files ``` --- @@ -169,7 +169,7 @@ Badges and texts will be replaced with your project details! If the bot [probot-settings](https://probot.github.io/apps/settings/) is not installed you will not have these beautiful labels!

- LABELS + LABELS

### πŸ“ The CHANGELOG template From 5458b039a6472cd64f66f862cf7b16320747de45 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Tue, 20 Apr 2021 08:36:24 +0200 Subject: [PATCH 094/152] "issue templates now uses the new labels" --- .github/ISSUE_TEMPLATE/1-bug-report.md | 2 +- .github/ISSUE_TEMPLATE/2-failing-test.md | 2 +- .github/ISSUE_TEMPLATE/3-docs-bug.md | 2 +- .github/ISSUE_TEMPLATE/4-feature-request.md | 2 +- .github/ISSUE_TEMPLATE/5-security-report.md | 2 +- .github/ISSUE_TEMPLATE/6-question-support.md | 2 +- CHANGELOG.md | 8 +++++++- 7 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md index 4fa6a65..d009fca 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.md +++ b/.github/ISSUE_TEMPLATE/1-bug-report.md @@ -2,7 +2,7 @@ name: "🐞 Bug Report" about: "Report an issue to help the project improve." title: "[Bug] " -labels: bug +labels: "Type: Bug" assignees: Josee9988 --- diff --git a/.github/ISSUE_TEMPLATE/2-failing-test.md b/.github/ISSUE_TEMPLATE/2-failing-test.md index bcdc961..e32deb3 100644 --- a/.github/ISSUE_TEMPLATE/2-failing-test.md +++ b/.github/ISSUE_TEMPLATE/2-failing-test.md @@ -1,7 +1,7 @@ --- name: "πŸ’‰ Failing Test" about: "Report failing tests or CI jobs." -labels: failing-test +labels: "Type: Bug" assignees: Josee9988 --- diff --git a/.github/ISSUE_TEMPLATE/3-docs-bug.md b/.github/ISSUE_TEMPLATE/3-docs-bug.md index fc412ea..46c65f5 100644 --- a/.github/ISSUE_TEMPLATE/3-docs-bug.md +++ b/.github/ISSUE_TEMPLATE/3-docs-bug.md @@ -2,7 +2,7 @@ name: "πŸ“š Documentation or README.md issue report" about: "Report an issue in the project's documentation or README.md file." title: "" -labels: documentation +labels: "Documentation" assignees: Josee9988 --- diff --git a/.github/ISSUE_TEMPLATE/4-feature-request.md b/.github/ISSUE_TEMPLATE/4-feature-request.md index 12d8d36..382cc9b 100644 --- a/.github/ISSUE_TEMPLATE/4-feature-request.md +++ b/.github/ISSUE_TEMPLATE/4-feature-request.md @@ -2,7 +2,7 @@ name: "πŸš€ Feature Request" about: "Suggest an idea or possible enhancement for this project." title: "" -labels: enhancement +labels: "Type: Enhancement", "Type: Feature" assignees: Josee9988 --- diff --git a/.github/ISSUE_TEMPLATE/5-security-report.md b/.github/ISSUE_TEMPLATE/5-security-report.md index e37f3a2..81f6fef 100644 --- a/.github/ISSUE_TEMPLATE/5-security-report.md +++ b/.github/ISSUE_TEMPLATE/5-security-report.md @@ -2,7 +2,7 @@ name: "⚠️ Security Report" about: "Report an issue to help the project improve." title: "" -labels: bug, security +labels: "Type: Security" assignees: Josee9988 --- diff --git a/.github/ISSUE_TEMPLATE/6-question-support.md b/.github/ISSUE_TEMPLATE/6-question-support.md index 5bdd44c..87ada4e 100644 --- a/.github/ISSUE_TEMPLATE/6-question-support.md +++ b/.github/ISSUE_TEMPLATE/6-question-support.md @@ -2,7 +2,7 @@ name: "❓ Question or Support Request" about: "Questions and requests for support." title: "" -labels: question +labels: "Type: Question" assignees: Josee9988 --- diff --git a/CHANGELOG.md b/CHANGELOG.md index cd55f06..070bed6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.4.2**] - 2021-04-20 + +### Fixed + +* Issue templates now auto asigns the new labels. + ## [**1.4.1**] - 2021-04-20 ### Added @@ -90,7 +96,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Changed * `EXECUTEME.sh` script changed to `SETUP_TEMPLATE.sh`. -* Changed the execution video from the README.md file (asciinema's video). +* Changed the execution video from the README.md file (Asciinema's video). ## [**1.0.9**] - 2021-03-17 From e23d9d740508f1b03de2899a3c84a7fd711539a0 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Tue, 20 Apr 2021 08:38:56 +0200 Subject: [PATCH 095/152] "feature request now only adds the feature label" --- .github/ISSUE_TEMPLATE/4-feature-request.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/4-feature-request.md b/.github/ISSUE_TEMPLATE/4-feature-request.md index 382cc9b..285559e 100644 --- a/.github/ISSUE_TEMPLATE/4-feature-request.md +++ b/.github/ISSUE_TEMPLATE/4-feature-request.md @@ -2,7 +2,7 @@ name: "πŸš€ Feature Request" about: "Suggest an idea or possible enhancement for this project." title: "" -labels: "Type: Enhancement", "Type: Feature" +labels: "Type: Feature" assignees: Josee9988 --- From ea935bfc1dd20393d21b92a0cffa213875e9a80d Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Wed, 21 Apr 2021 08:33:43 +0200 Subject: [PATCH 096/152] "documented the new changes" --- README.md | 3 +++ SETUP_TEMPLATE.sh | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a59fb1c..e2f7f99 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ The script will replace Jose's username and email (the author) with yours from a 1. A README template file with a default template to start documenting your project. (it includes personalized badges and text with your project details) 1. A CHANGELOG template file based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). 1. An [issue_label_bot.yaml](/.github/issue_label_bot.yaml) file to use the issue adder Github bot. [Activate it or check its documentation](https://github.com/marketplace/issue-label-bot). + 1. A [config.yml](/.github/config.yml) file to modify multiple bot's behaviour. 1. A [settings.yml](/.github/settings.yml) file to use the popular settings Github bot. [Activate it or check its documentation](https://probot.github.io/apps/settings/). 1. A [CONTRIBUTING](/.github/CONTRIBUTING.md) explaining how to contribute to the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/setting-guidelines-for-repository-contributors). 1. A [SUPPORT](/.github/SUPPORT.md) explaining how to support the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-support-resources-to-your-project). @@ -99,6 +100,7 @@ Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not s β”‚Β Β  β”œβ”€β”€ CONTRIBUTING.md β”‚Β Β  β”œβ”€β”€ FUNDING.yml β”‚Β Β  β”œβ”€β”€ issue_label_bot.yaml +β”‚Β Β  β”œβ”€β”€ config.yml β”‚Β Β  β”œβ”€β”€ ISSUE_TEMPLATE β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 1-bug-report.md β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 2-failing-test.md @@ -135,6 +137,7 @@ Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not s 1. The `issue_label_bot.yaml` file depends on the **[issue label bot](https://github.com/marketplace/issue-label-bot)**. 2. The `settings.yml` file depends on the **[settings label bot](https://probot.github.io/apps/settings/)**. +3. The `config.yml` file depends on the bot **[welcome bot](https://probot.github.io/apps/welcome/)**. --- diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index 9cbade8..52eb968 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -70,7 +70,8 @@ else fi ###### START OF THE SCRIPT ###### -echo -e "Read carefully all the documentation before you continue executing this script: \t${UPurple}https://github.com/Josee9988/project-template${NC}" +echo -e "Thanks for using ${GREEN}Josee9988/project-template${NC}" +echo -e "Read carefully all the documentation before you continue executing this script: \t${UPurple}https://github.com/Josee9988/project-template${NC}\n" # prompt for the, mail and type of the project read -p "Enter your $(echo -e "$BBLUE""email""$NC"): " NEW_EMAIL read -p "Enter $(echo -e "$BBLUE""what your project is""$NC") (program/extension/API/web/CLI tool/backend/frontend/scrapper/automation tool/etc): " PROJECT_TYPE From 42ba63e263b45c906cd151fc994aeec982f1dcd5 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Wed, 21 Apr 2021 08:33:56 +0200 Subject: [PATCH 097/152] "added the new config for the welcome bot" --- .github/config.yml | 17 +++++++++++++++++ CHANGELOG.md | 5 +++++ 2 files changed, 22 insertions(+) create mode 100644 .github/config.yml diff --git a/.github/config.yml b/.github/config.yml new file mode 100644 index 0000000..9c5089b --- /dev/null +++ b/.github/config.yml @@ -0,0 +1,17 @@ +# Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome + +# Comment to be posted to on first time issues +newIssueWelcomeComment: > + Thanks for opening your first issue in Josee9988/project-template! Be sure to follow the issue template and provide every bit of information to help the developers! + +# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome + +# Comment to be posted to on PRs from first time contributors in your repository +newPRWelcomeComment: > + Thanks for opening this pull request! Please check out our contributing guidelines and make sure to follow the pull request template. + +# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge + +# Comment to be posted to on pull requests merged by a first time user +firstPRMergeComment: > + Congrats on merging your first pull request! Keep making great things with us, thanks!! diff --git a/CHANGELOG.md b/CHANGELOG.md index 070bed6..f548b27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ## [**1.4.2**] - 2021-04-20 +### Added + +* An extra informational message in the script. +* Welcome bot and its config (.github/config.yml) + ### Fixed * Issue templates now auto asigns the new labels. From 846b51459d01709fdc57bf02426cbdab6db4da98 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Wed, 21 Apr 2021 08:39:09 +0200 Subject: [PATCH 098/152] "minnor fixes" --- .github/ISSUE_TEMPLATE/2-failing-test.md | 1 + .github/settings.yml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/2-failing-test.md b/.github/ISSUE_TEMPLATE/2-failing-test.md index e32deb3..585018e 100644 --- a/.github/ISSUE_TEMPLATE/2-failing-test.md +++ b/.github/ISSUE_TEMPLATE/2-failing-test.md @@ -1,6 +1,7 @@ --- name: "πŸ’‰ Failing Test" about: "Report failing tests or CI jobs." +title: "" labels: "Type: Bug" assignees: Josee9988 diff --git a/.github/settings.yml b/.github/settings.yml index f321745..69ccd86 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -41,7 +41,8 @@ repository: #allow_rebase_merge: true # Labels: define labels for Issues and Pull Requests - +# @todo +# @body add label for tests labels: - name: 'Type: Bug' color: e80c0c From 125f7b4da1ac59b231f12ea3cd9ef17e65c99b8f Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Wed, 21 Apr 2021 08:43:07 +0200 Subject: [PATCH 099/152] "added config for todo bot with '@issue' keyword" --- .github/config.yml | 3 +++ .github/settings.yml | 2 +- CHANGELOG.md | 6 ++++++ README.md | 5 ++++- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/config.yml b/.github/config.yml index 9c5089b..68f6f87 100644 --- a/.github/config.yml +++ b/.github/config.yml @@ -15,3 +15,6 @@ newPRWelcomeComment: > # Comment to be posted to on pull requests merged by a first time user firstPRMergeComment: > Congrats on merging your first pull request! Keep making great things with us, thanks!! + +todo: + keyword: '@issue' diff --git a/.github/settings.yml b/.github/settings.yml index 69ccd86..169d6b8 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -41,7 +41,7 @@ repository: #allow_rebase_merge: true # Labels: define labels for Issues and Pull Requests -# @todo +# @issue Tests label # @body add label for tests labels: - name: 'Type: Bug' diff --git a/CHANGELOG.md b/CHANGELOG.md index f548b27..d288565 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.4.3**] - 2021-04-21 + +### Added + +* Support for github todo app. + ## [**1.4.2**] - 2021-04-20 ### Added diff --git a/README.md b/README.md index e2f7f99..92dacab 100644 --- a/README.md +++ b/README.md @@ -135,9 +135,12 @@ Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not s ### πŸ€– **Used Github bots** +These are recommended bots that are prepared and configured for this template. If you install them your coding experience will probably be much better. +We deeply recommend at least installing the [issue label bot](https://github.com/marketplace/issue-label-bot) as this bot is the one that adds all the labels used in the issue templates. + 1. The `issue_label_bot.yaml` file depends on the **[issue label bot](https://github.com/marketplace/issue-label-bot)**. 2. The `settings.yml` file depends on the **[settings label bot](https://probot.github.io/apps/settings/)**. -3. The `config.yml` file depends on the bot **[welcome bot](https://probot.github.io/apps/welcome/)**. +3. The `config.yml` file depends on the bot **[welcome bot](https://probot.github.io/apps/welcome/)** and **[todo bot](https://probot.github.io/apps/todo/)** --- From 04f63095c528d8aedcc4b0c3b481025b66e072e8 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Wed, 21 Apr 2021 22:18:41 +0200 Subject: [PATCH 100/152] "test issue label bot" --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d288565..73c4039 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- + + ## [**1.4.3**] - 2021-04-21 ### Added From 0556539f085f0e2d77fd0954d3c196a15d17231c Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Wed, 21 Apr 2021 22:20:22 +0200 Subject: [PATCH 101/152] "todo bot using label @todo" --- .github/config.yml | 2 +- .github/settings.yml | 2 -- CHANGELOG.md | 5 ----- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/config.yml b/.github/config.yml index 68f6f87..1e537f7 100644 --- a/.github/config.yml +++ b/.github/config.yml @@ -17,4 +17,4 @@ firstPRMergeComment: > Congrats on merging your first pull request! Keep making great things with us, thanks!! todo: - keyword: '@issue' + keyword: '@todo' diff --git a/.github/settings.yml b/.github/settings.yml index 169d6b8..d72512d 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -41,8 +41,6 @@ repository: #allow_rebase_merge: true # Labels: define labels for Issues and Pull Requests -# @issue Tests label -# @body add label for tests labels: - name: 'Type: Bug' color: e80c0c diff --git a/CHANGELOG.md b/CHANGELOG.md index 73c4039..d288565 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- - - ## [**1.4.3**] - 2021-04-21 ### Added From 055f842538d4030ce42a1307e4b7dbc8592fea50 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 22 Apr 2021 09:17:57 +0200 Subject: [PATCH 102/152] "modularized the code; the file checks are now performed in function_helpers" --- SETUP_TEMPLATE.sh | 24 +++++------------------- bin/FUNCTION_HELPERS.sh | 28 +++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index 52eb968..e829ef4 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -29,24 +29,7 @@ BBLUE='\033[1;34m' GREEN='\033[1;32m' FILE_FUNCTION_HELPERS=bin/FUNCTION_HELPERS.sh -###### CHECKS BEFORE THE SCRIPT STARTS ###### -### Check if the .github directory does exist ### -if [ ! -d ".github/" ]; then - echo -e "${RED}Directory .github/ DOES NOT EXIST.${NC}" - exit 1 # exit with error code 1 -fi - -### Checks if the root files exist ### -if [ ! -f "CHANGELOG.md" ] || [ ! -f "README.md" ] || [ ! -f ".gitignore" ]; then - echo -e "${RED}There are files missing. Have you modified the repository before executing this command?${NC}" - echo -e "${RED}The script couldn't found one or many of these files${NC}: '${UPurple}CHANGELOG.md${NC}', '${UPurple}README.md${NC}' or '${UPurple}.gitignore${NC}'.\n" - echo -e "You should try to 'git stash' your changes and execute this script from the project root again, or clone again the repository without any changes.\n" - echo -e "For more information visit: ${UPurple}https://github.com/Josee9988/project-template${NC}" - echo -e "If you think this may be an issue please post it at: ${UPurple}https://github.com/Josee9988/project-template/issues${NC}" - exit 1 # exit with error code 1 -fi - -if [ ! -f "$FILE_FUNCTION_HELPERS" ]; then # check if the function helpers file is found +if [ ! -f "$FILE_FUNCTION_HELPERS" ]; then # check if the function helpers file is not found echo -e "${RED}Can not find ${FILE_FUNCTION_HELPERS}" exit 1 # it will exit if the function helpers file is not found else @@ -54,6 +37,9 @@ else source $FILE_FUNCTION_HELPERS || exit # obtain some global functions and variables, if the file isn't found exit fi +###### CHECKS BEFORE THE SCRIPT STARTS ###### +checkFiles + # READ GITHUB USERNAME AND GITHUB PROJECT NAME NAME_AND_PROJECT_UNPARSED=$(git ls-remote --get-url) @@ -71,7 +57,7 @@ fi ###### START OF THE SCRIPT ###### echo -e "Thanks for using ${GREEN}Josee9988/project-template${NC}" -echo -e "Read carefully all the documentation before you continue executing this script: \t${UPurple}https://github.com/Josee9988/project-template${NC}\n" +echo -e "Read carefully all the documentation before you continue executing this script: ${UPurple}https://github.com/Josee9988/project-template${NC}\n" # prompt for the, mail and type of the project read -p "Enter your $(echo -e "$BBLUE""email""$NC"): " NEW_EMAIL read -p "Enter $(echo -e "$BBLUE""what your project is""$NC") (program/extension/API/web/CLI tool/backend/frontend/scrapper/automation tool/etc): " PROJECT_TYPE diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh index cfd665f..ff86c8b 100644 --- a/bin/FUNCTION_HELPERS.sh +++ b/bin/FUNCTION_HELPERS.sh @@ -1,6 +1,9 @@ #!/bin/bash -# SCRIPT WITH EXPORTED FUNCTIONS AND VARIABLES +UPurple='\033[4;35m' +NC='\033[0m' # No Color + +# SCRIPT WITH EXPORTED FUNCTIONS AND VARIABLES USED IN THE MAIN SETUP_TEMPLATE writeREADME() { PROJECT_NAME_PARSED=${PROJECT_NAME/-/ } @@ -123,3 +126,26 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) * The basic project structure from **[josee9988/project-template](https://github.com/Josee9988/project-template)**. EOF" } + +checkFiles() { + ### Check if the .github directory does exist ### + if [ ! -d ".github/" ] || [ ! -d ".github/ISSUE_TEMPLATE" ]; then + echo -e "${RED}Directory .github/ DOES NOT EXIST WITH ALL THE FILES NEEDED.${NC}" + displayErrorInstructions + exit 1 # exit with error code 1 + fi + + ### Checks if the root files exist and some extra important files ### + if [ ! -f "CHANGELOG.md" ] || [ ! -f "README.md" ] || [ ! -f ".gitignore" ] || [ ! -f "LICENSE" ] || [ ! -f ".github/settings.yml" ] || [ ! -f ".github/pull_request_template.md" ] || [ ! -f ".github/ISSUE_TEMPLATE/1-bug-report.md" ] || [ ! -f ".github/ISSUE_TEMPLATE/config.yml" ]; then + echo -e "${RED}There are files missing. Have you modified the repository before executing this command?${NC}" + echo -e "${RED}The script couldn't find one or many of the template main files${NC}." + displayErrorInstructions + exit 1 # exit with error code 1 + fi +} + +displayErrorInstructions() { + echo -e "\nYou should try to 'git stash' your changes and execute this script from the project root again, or clone again the repository (the template) without any changes.\n" + echo -e "For more information visit: ${UPurple}https://github.com/Josee9988/project-template${NC}" + echo -e "If you think this may be an issue please post it at: ${UPurple}https://github.com/Josee9988/project-template/issues${NC}" +} From 0aaaece16bcc5f57638219ccf098c1e5ff47ac50 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 22 Apr 2021 09:36:47 +0200 Subject: [PATCH 103/152] "implemented --help argument in the script" --- CHANGELOG.md | 6 ++++++ README.md | 2 +- SETUP_TEMPLATE.sh | 3 +++ bin/FUNCTION_HELPERS.sh | 10 ++++++++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d288565..5b9d5db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [Unreleased] + +### Added + +* --help option in the script. + ## [**1.4.3**] - 2021-04-21 ### Added diff --git a/README.md b/README.md index 92dacab..a0c0c98 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ for more information or guidance, follow the [Github guide](https://docs.github. chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE.sh # additional parameters [Username] [Project-Name] ``` - Additionally, watch *[this video](https://asciinema.org/a/404568)* to see **how to execute the script**. + Additionally, watch *[this video](https://asciinema.org/a/404568)* to see **how to execute the script** or use `bash SETUP_TEMPLATE.sh --help` to obtain some extra information.. If the automatic detection of the username and project name are NOT right, please post an issue, and you can **manually correct** them like: `bash SETUP_TEMPLATE.sh RightUsername RightProjectName` being `$1` the new username and `$2` the new project name. diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index e829ef4..db1a8c9 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -37,6 +37,9 @@ else source $FILE_FUNCTION_HELPERS || exit # obtain some global functions and variables, if the file isn't found exit fi +# check if the help argument has been specified +helpCommand "$1" + ###### CHECKS BEFORE THE SCRIPT STARTS ###### checkFiles diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh index ff86c8b..d3516f4 100644 --- a/bin/FUNCTION_HELPERS.sh +++ b/bin/FUNCTION_HELPERS.sh @@ -149,3 +149,13 @@ displayErrorInstructions() { echo -e "For more information visit: ${UPurple}https://github.com/Josee9988/project-template${NC}" echo -e "If you think this may be an issue please post it at: ${UPurple}https://github.com/Josee9988/project-template/issues${NC}" } + +helpCommand() { + if [[ "$1" == *"--help" ]] || [[ "$1" == *"-h" ]]; then # if the user specified help command + echo -e "Script usage: ${BBLUE}$0 [Username] [Project-Name]${NC}\n" + echo "Arguments of username and project-name are automatically gathered from your git repository and git config, so they are optional in case they are not detected correctly." + echo -e "Make sure you have ${BBLUE}read the documentation before executing${NC} this script: ${UPurple}https://github.com/Josee9988/project-template${NC}" + echo -e "If you have any questions or if any issue is found, please make sure to report it at: ${UPurple}https://github.com/Josee9988/project-template/issues${NC}" + exit 0 + fi +} From 7e8e91c7f81ec857e6c6a4249d544ff795ce4ca2 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 22 Apr 2021 09:37:25 +0200 Subject: [PATCH 104/152] "1.4.4 --help argument and added more information in the script" --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b9d5db..9ddeab9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- -## [Unreleased] +## [**1.4.4**] - 2021-04-22 ### Added * --help option in the script. +* More documentation and information for the user in the script prompts ## [**1.4.3**] - 2021-04-21 From dcd3bea102f843eb0b0ac62206bcf2c54b74aff2 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 23 Apr 2021 13:38:57 +0200 Subject: [PATCH 105/152] "improved the scripts and added more docuemntation" --- CHANGELOG.md | 12 +++++++ README.md | 41 +++++++++++++++--------- SETUP_TEMPLATE.sh | 38 ++++++---------------- bin/FUNCTION_HELPERS.sh | 71 +++++++++++++++++++++-------------------- 4 files changed, 84 insertions(+), 78 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ddeab9..175540d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [Unreleased] + +### Added + +* Sponsor section in the project's main readme.md. +* Improved and added documentation in the scripts. + +### Fixed + +* Readme "What does it include" fixed list of files. +* Sponsor link in the generated README.md file. + ## [**1.4.4**] - 2021-04-22 ### Added diff --git a/README.md b/README.md index a0c0c98..fc953e6 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ GitHub pull requests - +

@@ -67,23 +67,23 @@ The script will replace Jose's username and email (the author) with yours from a 1. A README template file with a default template to start documenting your project. (it includes personalized badges and text with your project details) 1. A CHANGELOG template file based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). 1. An [issue_label_bot.yaml](/.github/issue_label_bot.yaml) file to use the issue adder Github bot. [Activate it or check its documentation](https://github.com/marketplace/issue-label-bot). - 1. A [config.yml](/.github/config.yml) file to modify multiple bot's behaviour. + 1. A [config.yml](/.github/config.yml) file to modify multiple bot's behaviours. 1. A [settings.yml](/.github/settings.yml) file to use the popular settings Github bot. [Activate it or check its documentation](https://probot.github.io/apps/settings/). 1. A [CONTRIBUTING](/.github/CONTRIBUTING.md) explaining how to contribute to the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/setting-guidelines-for-repository-contributors). 1. A [SUPPORT](/.github/SUPPORT.md) explaining how to support the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-support-resources-to-your-project). 1. A [SECURITY](/.github/SECURITY.md) with a guide on how to post a security issue. [Learn more with the Github guide](https://docs.github.com/es/github/managing-security-vulnerabilities/adding-a-security-policy-to-your-repository). -1. A [CODEOWNERS](/.github/CODEOWNERS) with the new user as the main owner. [Learn more with the Github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners). -1. A [CODE_OF_CONDUCT](/.github/CODE_OF_CONDUCT.md) with a basic code of conduct. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-a-code-of-conduct-to-your-project). -1. A [PULL_REQUEST_TEMPLATE](/.github/pull_request_template.md) with a template for your pull request that closes issues with keywords. [Learn more with the Github guide](https://docs.github.com/es/github/building-a-strong-community/creating-a-pull-request-template-for-your-repository). -1. Multiple [issues templates](/.github/ISSUE_TEMPLATE). [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository). - 1. A [config.yml](/.github/ISSUE_TEMPLATE/config.yml) with the config and information about the issue templates. - 1. A [Blank issue template](/.github/ISSUE_TEMPLATE) with the super basic stuff, all the issues should contain. - 1. A [Bug issue template](/.github/ISSUE_TEMPLATE/1-bug-report.md). - 1. A [Failing test issue template](/.github/ISSUE_TEMPLATE/2-failing-test.md). - 1. A [Documentation issue template](/.github/ISSUE_TEMPLATE/3-docs-bug.md). - 1. A [Feature request issue template](/.github/ISSUE_TEMPLATE/4-feature-request.md). - 1. A [Security report issue template](/.github/ISSUE_TEMPLATE/5-security-report.md). - 1. A [Question or support issue template](/.github/ISSUE_TEMPLATE/6-question-support.md). + 1. A [CODEOWNERS](/.github/CODEOWNERS) with the new user as the main owner. [Learn more with the Github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners). + 1. A [CODE_OF_CONDUCT](/.github/CODE_OF_CONDUCT.md) with a basic code of conduct. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-a-code-of-conduct-to-your-project). + 1. A [PULL_REQUEST_TEMPLATE](/.github/pull_request_template.md) with a template for your pull request that closes issues with keywords. [Learn more with the Github guide](https://docs.github.com/es/github/building-a-strong-community/creating-a-pull-request-template-for-your-repository). + 1. Multiple [issues templates](/.github/ISSUE_TEMPLATE). [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository). + 1. A [config.yml](/.github/ISSUE_TEMPLATE/config.yml) with the config and information about the issue templates. + 1. A [Blank issue template](/.github/ISSUE_TEMPLATE) with the super basic stuff, all the issues should contain. + 1. A [Bug issue template](/.github/ISSUE_TEMPLATE/1-bug-report.md). + 1. A [Failing test issue template](/.github/ISSUE_TEMPLATE/2-failing-test.md). + 1. A [Documentation issue template](/.github/ISSUE_TEMPLATE/3-docs-bug.md). + 1. A [Feature request issue template](/.github/ISSUE_TEMPLATE/4-feature-request.md). + 1. A [Security report issue template](/.github/ISSUE_TEMPLATE/5-security-report.md). + 1. A [Question or support issue template](/.github/ISSUE_TEMPLATE/6-question-support.md). --- @@ -209,13 +209,24 @@ We also recommend installing all the [used bots](https://github.com/Josee9988/pr --- +## 🍰 **Supporters and donators** + +We are currently looking for new donators to help and maintain this project! ❀️ + +By donating, you will help the development of this project and, *you will be featured in this project's README.md* so everyone can see your kindness and visit your content ⭐. + + + + + +--- + ## πŸŽ‰ Was the template helpful? Help us raise these numbers up [![Github followers](https://img.shields.io/github/followers/Josee9988.svg?style=social)](https://github.com/Josee9988) [![Github stars](https://img.shields.io/github/stars/Josee9988/project-template.svg?style=social)](https://github.com/Josee9988/project-template/stargazers) [![Github watchers](https://img.shields.io/github/watchers/Josee9988/project-template.svg?style=social)](https://github.com/Josee9988/project-template/watchers) [![Github forks](https://img.shields.io/github/forks/Josee9988/project-template.svg?style=social)](https://github.com/Josee9988/project-template/network/members) -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=github-sponsors&color=red&style=social)](https://github.com/sponsors/Josee9988) Enjoy! πŸ˜ƒ diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index db1a8c9..c1d0f72 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -37,11 +37,8 @@ else source $FILE_FUNCTION_HELPERS || exit # obtain some global functions and variables, if the file isn't found exit fi -# check if the help argument has been specified -helpCommand "$1" - -###### CHECKS BEFORE THE SCRIPT STARTS ###### -checkFiles +helpCommand "$1" # check if the help argument has been specified; if so it will exit +checkFiles # check if the main files exists before starting the project # READ GITHUB USERNAME AND GITHUB PROJECT NAME NAME_AND_PROJECT_UNPARSED=$(git ls-remote --get-url) @@ -74,32 +71,17 @@ y | Y) find .github/ -type f -name "*" -print0 | xargs -0 sed -i "s/jgracia9988@gmail.com/${NEW_EMAIL}/g" find .gitignore -type f -name "*" -print0 | xargs -0 sed -i "s/Josee9988\/project-template/${NEW_USERNAME}\/${PROJECT_NAME}/g" - # remove the license - rm LICENSE - - # remove the bin folder - rm -r bin/ - - # write the new README.md - writeREADME - - # write the basic structure of the CHANGELOG.md - writeCHANGELOG - - # remove author's custom funding links - echo -e "# add your own funding links" >.github/FUNDING.yml - - # commit the new files - git add CHANGELOG.md README.md .gitignore .github SETUP_TEMPLATE.sh LICENSE bin - - git -c color.status=always status | less -REX # show git status with colours + rm LICENSE # remove the license + rm -r bin/ # remove the bin folder + writeREADME # write the new README.md + writeCHANGELOG # write the basic structure of the CHANGELOG.md + echo -e "# add your own funding links" >.github/FUNDING.yml # remove author's custom funding links + git add CHANGELOG.md README.md .gitignore .github SETUP_TEMPLATE.sh LICENSE bin # commit the new files + git -c color.status=always status | less -REX # show git status with colours echo -e "Commiting the changes for you :)\n" - - git commit -m "Set up 'Josee9988/project-template' template: Personalized files by executing the SETUP_TEMPLATE.sh script.πŸš€" - + git commit -m "Set up '@Josee9988/project-template' template: Personalized files by executing the SETUP_TEMPLATE.sh script.πŸš€" echo -e "\nRemember to review every file and customize it as you like.\nYou are ready to start your brand new awesome projectπŸš€πŸš€." - # self remove this script rm -- "$0" ;; diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh index d3516f4..e1cfa34 100644 --- a/bin/FUNCTION_HELPERS.sh +++ b/bin/FUNCTION_HELPERS.sh @@ -1,9 +1,43 @@ #!/bin/bash -UPurple='\033[4;35m' +# SCRIPT WITH EXPORTED FUNCTIONS AND VARIABLES USED IN THE MAIN SETUP_TEMPLATE +RED='\033[1;31m' NC='\033[0m' # No Color +UPurple='\033[4;35m' +BBLUE='\033[1;34m' -# SCRIPT WITH EXPORTED FUNCTIONS AND VARIABLES USED IN THE MAIN SETUP_TEMPLATE +checkFiles() { + ### Check if the .github directory does exist ### + if [ ! -d ".github/" ] || [ ! -d ".github/ISSUE_TEMPLATE" ]; then + echo -e "${RED}Directory .github/ DOES NOT EXIST WITH ALL THE FILES NEEDED.${NC}" + displayErrorInstructions + exit 1 # exit with error code 1 + fi + + ### Checks if the root files exist and some extra important files ### + if [ ! -f "CHANGELOG.md" ] || [ ! -f "README.md" ] || [ ! -f ".gitignore" ] || [ ! -f "LICENSE" ] || [ ! -f ".github/settings.yml" ] || [ ! -f ".github/pull_request_template.md" ] || [ ! -f ".github/ISSUE_TEMPLATE/1-bug-report.md" ] || [ ! -f ".github/ISSUE_TEMPLATE/config.yml" ]; then + echo -e "${RED}The script couldn't find one or many of the template main files${NC}." + displayErrorInstructions + exit 1 # exit with error code 1 + fi +} + +displayErrorInstructions() { + echo -e "${RED}There are files missing. Have you modified the repository before executing this command?${NC}" + echo -e "\nYou should try to 'git stash' your changes and execute this script from the project root again, or clone again the repository (the template) without any changes.\n" + echo -e "For more information visit: ${UPurple}https://github.com/Josee9988/project-template${NC}" + echo -e "If you think this may be an issue please post it at: ${UPurple}https://github.com/Josee9988/project-template/issues${NC}" +} + +helpCommand() { + if [[ "$1" == *"--help" ]] || [[ "$1" == *"-h" ]]; then # if the user specified help command + echo -e "Script usage: ${BBLUE}$0 [Username] [Project-Name]${NC}\n" + echo "Arguments of username and project-name are automatically gathered from your git repository and git config, so they are optional in case they are not detected correctly." + echo -e "Make sure you have ${BBLUE}read the documentation before executing${NC} this script: ${UPurple}https://github.com/Josee9988/project-template${NC}" + echo -e "If you have any questions or if any issue is found, please make sure to report it at: ${UPurple}https://github.com/Josee9988/project-template/issues${NC}" + exit 0 + fi +} writeREADME() { PROJECT_NAME_PARSED=${PROJECT_NAME/-/ } @@ -126,36 +160,3 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) * The basic project structure from **[josee9988/project-template](https://github.com/Josee9988/project-template)**. EOF" } - -checkFiles() { - ### Check if the .github directory does exist ### - if [ ! -d ".github/" ] || [ ! -d ".github/ISSUE_TEMPLATE" ]; then - echo -e "${RED}Directory .github/ DOES NOT EXIST WITH ALL THE FILES NEEDED.${NC}" - displayErrorInstructions - exit 1 # exit with error code 1 - fi - - ### Checks if the root files exist and some extra important files ### - if [ ! -f "CHANGELOG.md" ] || [ ! -f "README.md" ] || [ ! -f ".gitignore" ] || [ ! -f "LICENSE" ] || [ ! -f ".github/settings.yml" ] || [ ! -f ".github/pull_request_template.md" ] || [ ! -f ".github/ISSUE_TEMPLATE/1-bug-report.md" ] || [ ! -f ".github/ISSUE_TEMPLATE/config.yml" ]; then - echo -e "${RED}There are files missing. Have you modified the repository before executing this command?${NC}" - echo -e "${RED}The script couldn't find one or many of the template main files${NC}." - displayErrorInstructions - exit 1 # exit with error code 1 - fi -} - -displayErrorInstructions() { - echo -e "\nYou should try to 'git stash' your changes and execute this script from the project root again, or clone again the repository (the template) without any changes.\n" - echo -e "For more information visit: ${UPurple}https://github.com/Josee9988/project-template${NC}" - echo -e "If you think this may be an issue please post it at: ${UPurple}https://github.com/Josee9988/project-template/issues${NC}" -} - -helpCommand() { - if [[ "$1" == *"--help" ]] || [[ "$1" == *"-h" ]]; then # if the user specified help command - echo -e "Script usage: ${BBLUE}$0 [Username] [Project-Name]${NC}\n" - echo "Arguments of username and project-name are automatically gathered from your git repository and git config, so they are optional in case they are not detected correctly." - echo -e "Make sure you have ${BBLUE}read the documentation before executing${NC} this script: ${UPurple}https://github.com/Josee9988/project-template${NC}" - echo -e "If you have any questions or if any issue is found, please make sure to report it at: ${UPurple}https://github.com/Josee9988/project-template/issues${NC}" - exit 0 - fi -} From 59a5927436fc2b83199a60b152e3acedf50f5ebd Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 24 Apr 2021 09:30:57 +0200 Subject: [PATCH 106/152] "fixed typos and added documentation" --- CHANGELOG.md | 9 +++++---- README.md | 2 +- SETUP_TEMPLATE.sh | 8 ++++---- bin/FUNCTION_HELPERS.sh | 18 +++++++++++++++++- 4 files changed, 27 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 175540d..28a0dc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,17 +7,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- -## [Unreleased] +## [**1.4.5**] - 2021-04-24 ### Added -* Sponsor section in the project's main readme.md. +* Sponsor section in the project's main readme.md file. * Improved and added documentation in the scripts. ### Fixed * Readme "What does it include" fixed list of files. * Sponsor link in the generated README.md file. +* Some typos ## [**1.4.4**] - 2021-04-22 @@ -30,7 +31,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Added -* Support for github todo app. +* Support for Github todo app. ## [**1.4.2**] - 2021-04-20 @@ -41,7 +42,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed -* Issue templates now auto asigns the new labels. +* Issue templates now auto assigns the new labels. ## [**1.4.1**] - 2021-04-20 diff --git a/README.md b/README.md index fc953e6..23b075a 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ for more information or guidance, follow the [Github guide](https://docs.github. chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE.sh # additional parameters [Username] [Project-Name] ``` - Additionally, watch *[this video](https://asciinema.org/a/404568)* to see **how to execute the script** or use `bash SETUP_TEMPLATE.sh --help` to obtain some extra information.. + Additionally, watch *[this video](https://asciinema.org/a/404568)* to see **how to execute the script** or use `bash SETUP_TEMPLATE.sh --help` to obtain some extra information. If the automatic detection of the username and project name are NOT right, please post an issue, and you can **manually correct** them like: `bash SETUP_TEMPLATE.sh RightUsername RightProjectName` being `$1` the new username and `$2` the new project name. diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index c1d0f72..cbee007 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -15,7 +15,7 @@ # NOTES: This script will auto remove itself, and in case of wanting to run it again, the user must download # it again or do a 'git stash' and revert the changes. # BASH_VERSION: 5.0.17(1)-release -# LICENSE: see in ../LICENSE (project root) or https://github.com/Josee9988/project-template/blob/master/LICENSE +# LICENSE: see in LICENSE (project root) or https://github.com/Josee9988/project-template/blob/master/LICENSE # GITHUB: https://github.com/Josee9988/ # REPOSITORY: https://github.com/Josee9988/project-template # ISSUES: https://github.com/Josee9988/project-template/issues @@ -38,7 +38,7 @@ else fi helpCommand "$1" # check if the help argument has been specified; if so it will exit -checkFiles # check if the main files exists before starting the project +checkFiles # check if the main files exist before starting the project # READ GITHUB USERNAME AND GITHUB PROJECT NAME NAME_AND_PROJECT_UNPARSED=$(git ls-remote --get-url) @@ -79,14 +79,14 @@ y | Y) git add CHANGELOG.md README.md .gitignore .github SETUP_TEMPLATE.sh LICENSE bin # commit the new files git -c color.status=always status | less -REX # show git status with colours - echo -e "Commiting the changes for you :)\n" + echo -e "Committing the changes for you :)\n" git commit -m "Set up '@Josee9988/project-template' template: Personalized files by executing the SETUP_TEMPLATE.sh script.πŸš€" echo -e "\nRemember to review every file and customize it as you like.\nYou are ready to start your brand new awesome projectπŸš€πŸš€." # self remove this script rm -- "$0" ;; n | N) - echo -e "\nIf your username or project name are NOT right (the autoselection wasn't successful), execute the script and give as a first argument your username and as a second argument your project name." + echo -e "\nIf your username or project name are NOT right (the auto selection wasn't successful), execute the script and give as a first argument your username and as a second argument your project name." echo "As an example:" echo -e "${UPurple}$0 MyCorrectUsername MyCorrectProjectName${NC}" echo "Being the profile as: $0 [Username] [Project-Name]" diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh index e1cfa34..39fb490 100644 --- a/bin/FUNCTION_HELPERS.sh +++ b/bin/FUNCTION_HELPERS.sh @@ -1,5 +1,21 @@ #!/bin/bash +#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# +# PURPOSE: Secondary script that is called by the main SETUP_TEMPLATE.sh file by +# obtaining some functions to better modularize the code. +# TITLE: FUNCTION_HELPERS +# AUTHOR: Jose Gracia +# VERSION: See in CHANGELOG.md +# NOTES: This script will auto remove itself, and in case of wanting to run it again, the user must download +# it again or do a 'git stash' and revert the changes. +# BASH_VERSION: 5.0.17(1)-release +# LICENSE: see in ../LICENSE (project root) or https://github.com/Josee9988/project-template/blob/master/LICENSE +# GITHUB: https://github.com/Josee9988/ +# REPOSITORY: https://github.com/Josee9988/project-template +# ISSUES: https://github.com/Josee9988/project-template/issues +# MAIL: jgracia9988@gmail.com +#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# + # SCRIPT WITH EXPORTED FUNCTIONS AND VARIABLES USED IN THE MAIN SETUP_TEMPLATE RED='\033[1;31m' NC='\033[0m' # No Color @@ -23,7 +39,7 @@ checkFiles() { } displayErrorInstructions() { - echo -e "${RED}There are files missing. Have you modified the repository before executing this command?${NC}" + echo -e "${RED}There are files missing! Have you modified the repository before executing this command?${NC}" echo -e "\nYou should try to 'git stash' your changes and execute this script from the project root again, or clone again the repository (the template) without any changes.\n" echo -e "For more information visit: ${UPurple}https://github.com/Josee9988/project-template${NC}" echo -e "If you think this may be an issue please post it at: ${UPurple}https://github.com/Josee9988/project-template/issues${NC}" From d666fef85a2fb19b1134fde15221245abec5bd40 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 15 May 2021 11:26:03 +0200 Subject: [PATCH 107/152] "the email is now detected automatically or received by the third argument" --- SETUP_TEMPLATE.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index cbee007..4d64b4e 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -55,11 +55,16 @@ else PROJECT_NAME=$2 fi +if [ -z "$3" ]; then # if the user mail has been manually specified + NEW_EMAIL=$(git config user.email) +else + NEW_EMAIL=$3 +fi + ###### START OF THE SCRIPT ###### echo -e "Thanks for using ${GREEN}Josee9988/project-template${NC}" echo -e "Read carefully all the documentation before you continue executing this script: ${UPurple}https://github.com/Josee9988/project-template${NC}\n" # prompt for the, mail and type of the project -read -p "Enter your $(echo -e "$BBLUE""email""$NC"): " NEW_EMAIL read -p "Enter $(echo -e "$BBLUE""what your project is""$NC") (program/extension/API/web/CLI tool/backend/frontend/scrapper/automation tool/etc): " PROJECT_TYPE # confirm that the data is correct From e3dc558d32923c7c5c4a31af055f50ed898a61f5 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 15 May 2021 11:43:05 +0200 Subject: [PATCH 108/152] "updated help command and added a spacer function" --- SETUP_TEMPLATE.sh | 8 ++++---- bin/FUNCTION_HELPERS.sh | 20 ++++++++++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index 4d64b4e..95ddee4 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -71,6 +71,8 @@ read -p "Enter $(echo -e "$BBLUE""what your project is""$NC") (program/extension read -p "Is this data correct: username \"$(echo -e "$GREEN""$NEW_USERNAME""$NC")\", email: \"$(echo -e "$GREEN""$NEW_EMAIL""$NC")\", project name: \"$(echo -e "$GREEN""$PROJECT_NAME""$NC")\", of type: \"$(echo -e "$GREEN""$PROJECT_TYPE""$NC")\" (y/n)? " choice case "$choice" in y | Y) + center "Setting everything up for you ;)" + exit 0 # replace the username and email find .github/ -type f -name "*" -print0 | xargs -0 sed -i "s/Josee9988/${NEW_USERNAME}/g" find .github/ -type f -name "*" -print0 | xargs -0 sed -i "s/jgracia9988@gmail.com/${NEW_EMAIL}/g" @@ -91,10 +93,8 @@ y | Y) rm -- "$0" ;; n | N) - echo -e "\nIf your username or project name are NOT right (the auto selection wasn't successful), execute the script and give as a first argument your username and as a second argument your project name." - echo "As an example:" - echo -e "${UPurple}$0 MyCorrectUsername MyCorrectProjectName${NC}" - echo "Being the profile as: $0 [Username] [Project-Name]" + echo -e "\nIf your username, project name or email were NOT right (the auto selection wasn't successful), execute the script and give as a first argument your username, as a second argument your project name and as a third you email.\n" + displayHelpTexts ;; *) echo -e "${RED}Invalid option${NC}" ;; esac diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh index 39fb490..3f1899b 100644 --- a/bin/FUNCTION_HELPERS.sh +++ b/bin/FUNCTION_HELPERS.sh @@ -22,6 +22,13 @@ NC='\033[0m' # No Color UPurple='\033[4;35m' BBLUE='\033[1;34m' +# Function that centers a text in the terminal +center() { + term_width="$(tput cols)" + padding="$(printf '%0.1s' ={1..500})" + echo -e "\n\n${BBLUE}$(printf '%*.*s %s %*.*s\n' 0 "$(((term_width - 2 - ${#1}) / 2))" "$padding" "$1" 0 "$(((term_width - 1 - ${#1}) / 2))" "$padding")${NC}\n" +} + checkFiles() { ### Check if the .github directory does exist ### if [ ! -d ".github/" ] || [ ! -d ".github/ISSUE_TEMPLATE" ]; then @@ -47,14 +54,19 @@ displayErrorInstructions() { helpCommand() { if [[ "$1" == *"--help" ]] || [[ "$1" == *"-h" ]]; then # if the user specified help command - echo -e "Script usage: ${BBLUE}$0 [Username] [Project-Name]${NC}\n" - echo "Arguments of username and project-name are automatically gathered from your git repository and git config, so they are optional in case they are not detected correctly." - echo -e "Make sure you have ${BBLUE}read the documentation before executing${NC} this script: ${UPurple}https://github.com/Josee9988/project-template${NC}" - echo -e "If you have any questions or if any issue is found, please make sure to report it at: ${UPurple}https://github.com/Josee9988/project-template/issues${NC}" + displayHelpTexts exit 0 fi } +displayHelpTexts() { + center "User help" + echo -e "Script usage: ${BBLUE}$0 [Username] [Project-Name] [Email]${NC} (The project name should not contain spaces)${NC}\n" + echo "Arguments of username, project-name and email are automatically gathered from your git repository and git config, so they are optional in case they are not detected correctly." + echo -e "Make sure you have ${BBLUE}read the documentation before executing${NC} this script: ${UPurple}https://github.com/Josee9988/project-template${NC}" + echo -e "If you have any questions or if any issue is found, please make sure to report it at: ${UPurple}https://github.com/Josee9988/project-template/issues${NC}" +} + writeREADME() { PROJECT_NAME_PARSED=${PROJECT_NAME/-/ } bash -c "NEW_USERNAME='NEW_USERNAME' PROJECT_NAME='PROJECT_NAME' PROJECT_TYPE='PROJECT_TYPE'; cat << EOF > README.md From 8d32580be1ff94efe1a6702958db2a3dfddf3cb7 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 15 May 2021 11:47:13 +0200 Subject: [PATCH 109/152] "updated readme and the changelog" --- CHANGELOG.md | 6 ++++++ README.md | 9 +++++---- SETUP_TEMPLATE.sh | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28a0dc1..37b993e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.5.0**] - 2021-05-15 + +### Added + +* Auto-detection of user email. + ## [**1.4.5**] - 2021-04-24 ### Added diff --git a/README.md b/README.md index 23b075a..629ecbe 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ * Make your _community healthier_ with all the guides like code of conduct, contributing, support, security... * Learn more with the [official Github guide on creating repositories from a template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). * To start using it; "**[click use this template](https://github.com/Josee9988/project-template/generate)**", create your new repository, +* All the basic setup is made through an easy script that will auto-detect all your data to make it lightning fast! ⚑⚑ clone your new repository and execute the `SETUP_TEMPLATE.sh` shell script to personalize the markdowns with your private details. Check how to execute it [here](https://asciinema.org/a/398761). * All the markdown follows [MarkdownLint rules](https://github.com/DavidAnson/markdownlint). @@ -39,18 +40,18 @@ for more information or guidance, follow the [Github guide](https://docs.github. 3. **Execute** the `SETUP_TEMPLATE.sh` shell script to **customize** the files with your data. ```bash - bash SETUP_TEMPLATE.sh # additional parameters [Username] [Project-Name] + bash SETUP_TEMPLATE.sh # additional parameters [Username] [Project-Name] [Email] ``` Or you can also do it like this: ```bash - chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE.sh # additional parameters [Username] [Project-Name] + chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE.sh # additional parameters [Username] [Project-Name] [Email] ``` - Additionally, watch *[this video](https://asciinema.org/a/404568)* to see **how to execute the script** or use `bash SETUP_TEMPLATE.sh --help` to obtain some extra information. + Additionally, watch *[this video](https://asciinema.org/a/404568)* to see **how to execute the script** or use *`bash SETUP_TEMPLATE.sh --help`* to obtain some extra information. - If the automatic detection of the username and project name are NOT right, please post an issue, and you can **manually correct** them like: `bash SETUP_TEMPLATE.sh RightUsername RightProjectName` being `$1` the new username and `$2` the new project name. + If the automatic detection of the username, project name or email is NOT right, please post an issue, and you can **manually correct** them like: `bash SETUP_TEMPLATE.sh RightUsername RightProjectName RightEmail` being `$1` the new username, `$2` the new project name and `$3` the new email. 4. **Review** every single file and **customize** it as you like. 5. Build your project. πŸš€ diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index 95ddee4..dbab27b 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -72,7 +72,7 @@ read -p "Is this data correct: username \"$(echo -e "$GREEN""$NEW_USERNAME""$NC" case "$choice" in y | Y) center "Setting everything up for you ;)" - exit 0 + # replace the username and email find .github/ -type f -name "*" -print0 | xargs -0 sed -i "s/Josee9988/${NEW_USERNAME}/g" find .github/ -type f -name "*" -print0 | xargs -0 sed -i "s/jgracia9988@gmail.com/${NEW_EMAIL}/g" From 2a769bb9ca973d2efe43a943f367f59733c0b236 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sun, 16 May 2021 08:35:45 +0200 Subject: [PATCH 110/152] "minnor fixes to the readme.md file" --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 629ecbe..17bdcb1 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,7 @@ * Make your _community healthier_ with all the guides like code of conduct, contributing, support, security... * Learn more with the [official Github guide on creating repositories from a template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). * To start using it; "**[click use this template](https://github.com/Josee9988/project-template/generate)**", create your new repository, -* All the basic setup is made through an easy script that will auto-detect all your data to make it lightning fast! ⚑⚑ -clone your new repository and execute the `SETUP_TEMPLATE.sh` shell script to personalize the markdowns with your private details. Check how to execute it [here](https://asciinema.org/a/398761). +* All the basic setup is made through an easy script that will auto-detect all your data to make it lightning fast! πŸ—²πŸ—² clone your new repository and execute the `SETUP_TEMPLATE.sh` shell script to personalize the files with your private details. Check how to execute it [here](https://asciinema.org/a/398761). * All the markdown follows [MarkdownLint rules](https://github.com/DavidAnson/markdownlint). --- From b62d26236f135acc8611d875970f46e3f354511d Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Mon, 17 May 2021 17:44:44 +0200 Subject: [PATCH 111/152] "fixed minnor typo" --- bin/FUNCTION_HELPERS.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh index 3f1899b..bcc4594 100644 --- a/bin/FUNCTION_HELPERS.sh +++ b/bin/FUNCTION_HELPERS.sh @@ -1,7 +1,7 @@ #!/bin/bash #~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# -# PURPOSE: Secondary script that is called by the main SETUP_TEMPLATE.sh file by +# PURPOSE: Secondary (helper) script that is called by the main SETUP_TEMPLATE.sh file by # obtaining some functions to better modularize the code. # TITLE: FUNCTION_HELPERS # AUTHOR: Jose Gracia From d35177dd4778484e9f59a837b7a44f9377498231 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 21 May 2021 08:04:05 +0200 Subject: [PATCH 112/152] "added the enhancement request template" --- .github/ISSUE_TEMPLATE/4-feature-request.md | 4 +- .../ISSUE_TEMPLATE/5-enhancement-request.md | 45 +++++++++++++++++++ ...ecurity-report.md => 6-security-report.md} | 0 ...stion-support.md => 7-question-support.md} | 0 4 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/5-enhancement-request.md rename .github/ISSUE_TEMPLATE/{5-security-report.md => 6-security-report.md} (100%) rename .github/ISSUE_TEMPLATE/{6-question-support.md => 7-question-support.md} (100%) diff --git a/.github/ISSUE_TEMPLATE/4-feature-request.md b/.github/ISSUE_TEMPLATE/4-feature-request.md index 285559e..c72bd32 100644 --- a/.github/ISSUE_TEMPLATE/4-feature-request.md +++ b/.github/ISSUE_TEMPLATE/4-feature-request.md @@ -1,6 +1,6 @@ --- -name: "πŸš€ Feature Request" -about: "Suggest an idea or possible enhancement for this project." +name: "πŸš€πŸ†• Feature Request" +about: "Suggest an idea or possible new feature for this project." title: "" labels: "Type: Feature" assignees: Josee9988 diff --git a/.github/ISSUE_TEMPLATE/5-enhancement-request.md b/.github/ISSUE_TEMPLATE/5-enhancement-request.md new file mode 100644 index 0000000..09787db --- /dev/null +++ b/.github/ISSUE_TEMPLATE/5-enhancement-request.md @@ -0,0 +1,45 @@ +--- +name: "πŸš€βž• Enhancement Request" +about: "Suggest an enhancement for this project. Improve an existing feature" +title: "" +labels: "Type: Enchancement" +assignees: Josee9988 + +--- + + + +# **πŸš€ Enhancement Request** + +## **Is your enhancement request related to a problem? Please describe.** + + +* + +--- + +## **Describe the solution you'd like** + + +* + +--- + +## **Describe alternatives you've considered** + + +* + +--- + +### **Additional context** + + +* diff --git a/.github/ISSUE_TEMPLATE/5-security-report.md b/.github/ISSUE_TEMPLATE/6-security-report.md similarity index 100% rename from .github/ISSUE_TEMPLATE/5-security-report.md rename to .github/ISSUE_TEMPLATE/6-security-report.md diff --git a/.github/ISSUE_TEMPLATE/6-question-support.md b/.github/ISSUE_TEMPLATE/7-question-support.md similarity index 100% rename from .github/ISSUE_TEMPLATE/6-question-support.md rename to .github/ISSUE_TEMPLATE/7-question-support.md From 961dd939ce4ffea122d522a3d5eb50e97af0cf01 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 21 May 2021 08:07:43 +0200 Subject: [PATCH 113/152] "moved disclaimer comments to the bottom" --- .github/ISSUE_TEMPLATE/1-bug-report.md | 18 +++++++++--------- .github/ISSUE_TEMPLATE/2-failing-test.md | 18 +++++++++--------- .github/ISSUE_TEMPLATE/3-docs-bug.md | 18 +++++++++--------- .github/ISSUE_TEMPLATE/4-feature-request.md | 18 +++++++++--------- .../ISSUE_TEMPLATE/5-enhancement-request.md | 18 +++++++++--------- .github/ISSUE_TEMPLATE/7-question-support.md | 14 +++++++------- 6 files changed, 52 insertions(+), 52 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md index d009fca..1376422 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.md +++ b/.github/ISSUE_TEMPLATE/1-bug-report.md @@ -7,15 +7,6 @@ assignees: Josee9988 --- - - # **🐞 Bug Report** ## **Describe the bug** @@ -77,3 +68,12 @@ and remove all the bulleted list elements that are not relevant for this issue. * + + diff --git a/.github/ISSUE_TEMPLATE/2-failing-test.md b/.github/ISSUE_TEMPLATE/2-failing-test.md index 585018e..a1b0bac 100644 --- a/.github/ISSUE_TEMPLATE/2-failing-test.md +++ b/.github/ISSUE_TEMPLATE/2-failing-test.md @@ -7,15 +7,6 @@ assignees: Josee9988 --- - - # **πŸ’‰ Failing Test** ## **Which jobs/test(s) are failing**: @@ -39,3 +30,12 @@ Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.m * + + diff --git a/.github/ISSUE_TEMPLATE/3-docs-bug.md b/.github/ISSUE_TEMPLATE/3-docs-bug.md index 46c65f5..7f14b5f 100644 --- a/.github/ISSUE_TEMPLATE/3-docs-bug.md +++ b/.github/ISSUE_TEMPLATE/3-docs-bug.md @@ -7,15 +7,6 @@ assignees: Josee9988 --- - - # **πŸ“š Documentation Issue Report** ## **Describe the bug** @@ -59,3 +50,12 @@ Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.m * + + diff --git a/.github/ISSUE_TEMPLATE/4-feature-request.md b/.github/ISSUE_TEMPLATE/4-feature-request.md index c72bd32..33ecf94 100644 --- a/.github/ISSUE_TEMPLATE/4-feature-request.md +++ b/.github/ISSUE_TEMPLATE/4-feature-request.md @@ -7,15 +7,6 @@ assignees: Josee9988 --- - - # **πŸš€ Feature Request** ## **Is your feature request related to a problem? Please describe.** @@ -43,3 +34,12 @@ Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.m * + + diff --git a/.github/ISSUE_TEMPLATE/5-enhancement-request.md b/.github/ISSUE_TEMPLATE/5-enhancement-request.md index 09787db..c431d8d 100644 --- a/.github/ISSUE_TEMPLATE/5-enhancement-request.md +++ b/.github/ISSUE_TEMPLATE/5-enhancement-request.md @@ -7,15 +7,6 @@ assignees: Josee9988 --- - - # **πŸš€ Enhancement Request** ## **Is your enhancement request related to a problem? Please describe.** @@ -43,3 +34,12 @@ Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.m * + + diff --git a/.github/ISSUE_TEMPLATE/7-question-support.md b/.github/ISSUE_TEMPLATE/7-question-support.md index 87ada4e..ec98c81 100644 --- a/.github/ISSUE_TEMPLATE/7-question-support.md +++ b/.github/ISSUE_TEMPLATE/7-question-support.md @@ -7,6 +7,13 @@ assignees: Josee9988 --- +# **❓ Question or Support Request** + +## **Describe your question or ask for support.** + + +* + - -# **❓ Question or Support Request** - -## **Describe your question or ask for support.** - - -* From 673d64391861e3a69dee323fd518cb5bd60cf3a6 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 21 May 2021 08:07:52 +0200 Subject: [PATCH 114/152] "updated changelog and readme" --- CHANGELOG.md | 10 ++++++++++ README.md | 17 +++++++++-------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37b993e..3ef2e7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.6.0**] - 2021-05-21 + +### Added + +* Divided the feature request into feature and enhancement request, each one with its respective labels. + +### Changed + +* Position of disclaimers and comments in the issue templates are moved to the bottom (but the security report) as some users directly erased everything to not read the text. + ## [**1.5.0**] - 2021-05-15 ### Added diff --git a/README.md b/README.md index 17bdcb1..366934f 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ ## πŸ€” **What is this template all about?** * This template can be used as a base layer for any of your future repositories/projects. -* Make your project easy to maintain with **7 issue templates**. +* Make your project easy to maintain with **8 issue templates**. * Quickstart your documentation with personalized **readme badges** and a cool readme structure. * Manage your issues with **19 issue labels** created just for you! * Make your _community healthier_ with all the guides like code of conduct, contributing, support, security... @@ -103,12 +103,13 @@ Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not s β”‚Β Β  β”œβ”€β”€ config.yml β”‚Β Β  β”œβ”€β”€ ISSUE_TEMPLATE β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 1-bug-report.md -β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 2-failing-test.md -β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 3-docs-bug.md -β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 4-feature-request.md -β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 5-security-report.md -β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 6-question-support.md -β”‚Β Β  β”‚Β Β  └── config.yml +β”‚ β”‚ β”œβ”€β”€ 2-failing-test.md +β”‚ β”‚ β”œβ”€β”€ 3-docs-bug.md +β”‚ β”‚ β”œβ”€β”€ 4-feature-request.md +β”‚ β”‚ β”œβ”€β”€ 5-enhancement-request.md +β”‚ β”‚ β”œβ”€β”€ 6-security-report.md +β”‚ β”‚ β”œβ”€β”€ 7-question-support.md +β”‚ β”‚ └── config.yml β”‚Β Β  β”œβ”€β”€ ISSUE_TEMPLATE.md β”‚Β Β  β”œβ”€β”€ pull_request_template.md β”‚Β Β  β”œβ”€β”€ SECURITY.md @@ -117,7 +118,7 @@ Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not s β”œβ”€β”€ .gitignore └── README.md -2 directories, 20 files +2 directories, 21 files ``` --- From cb49c4bbd2449c083b4387c688c1d1e584f1de79 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 21 May 2021 08:14:28 +0200 Subject: [PATCH 115/152] "fixed minnor markdown mistakes" --- .github/ISSUE_TEMPLATE/2-failing-test.md | 2 +- .github/ISSUE_TEMPLATE/3-docs-bug.md | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/2-failing-test.md b/.github/ISSUE_TEMPLATE/2-failing-test.md index a1b0bac..2fdfc93 100644 --- a/.github/ISSUE_TEMPLATE/2-failing-test.md +++ b/.github/ISSUE_TEMPLATE/2-failing-test.md @@ -9,7 +9,7 @@ assignees: Josee9988 # **πŸ’‰ Failing Test** -## **Which jobs/test(s) are failing**: +## **Which jobs/test(s) are failing** * diff --git a/.github/ISSUE_TEMPLATE/3-docs-bug.md b/.github/ISSUE_TEMPLATE/3-docs-bug.md index 7f14b5f..f987493 100644 --- a/.github/ISSUE_TEMPLATE/3-docs-bug.md +++ b/.github/ISSUE_TEMPLATE/3-docs-bug.md @@ -6,7 +6,6 @@ labels: "Documentation" assignees: Josee9988 --- - # **πŸ“š Documentation Issue Report** ## **Describe the bug** From 3f95669aa5bfd56707dc1b0f3663b4ffef281465 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 21 May 2021 08:14:40 +0200 Subject: [PATCH 116/152] "1.6.0 updated information" --- .github/ISSUE_TEMPLATE.md | 2 +- CHANGELOG.md | 1 + README.md | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 66082c4..bf21ae5 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -28,7 +28,7 @@ Please read our Rules of Conduct at this repository's `.github/CODE_OF_CONDUCT.m -* OS: +* OS: * Node version: * Npm version: * Browser name and version: diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ef2e7d..fbcf3ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Changed * Position of disclaimers and comments in the issue templates are moved to the bottom (but the security report) as some users directly erased everything to not read the text. +* Image of the issue templates in the readme.md file. ## [**1.5.0**] - 2021-05-15 diff --git a/README.md b/README.md index 366934f..312baa4 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ A couple of screenshots to delight you before you use this template. ### πŸ”Ί All the issue templates

- All the issue templates. + All the issue templates.

### πŸ”» An issue template opened From 9303fa275d98d78d4fc6faa9dade0cc8de03b33b Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 22 May 2021 09:22:31 +0200 Subject: [PATCH 117/152] "enhancement request label had a typo" --- .github/ISSUE_TEMPLATE/5-enhancement-request.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/5-enhancement-request.md b/.github/ISSUE_TEMPLATE/5-enhancement-request.md index c431d8d..2b29bd5 100644 --- a/.github/ISSUE_TEMPLATE/5-enhancement-request.md +++ b/.github/ISSUE_TEMPLATE/5-enhancement-request.md @@ -2,7 +2,7 @@ name: "πŸš€βž• Enhancement Request" about: "Suggest an enhancement for this project. Improve an existing feature" title: "" -labels: "Type: Enchancement" +labels: "Type: Enhancement" assignees: Josee9988 --- From 48a12b03339e42388f9042d9e19a4379ba1327b6 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Tue, 1 Jun 2021 09:56:15 +0200 Subject: [PATCH 118/152] "added the new test label" --- .github/ISSUE_TEMPLATE/2-failing-test.md | 4 ++-- .github/settings.yml | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/2-failing-test.md b/.github/ISSUE_TEMPLATE/2-failing-test.md index 2fdfc93..a239f2a 100644 --- a/.github/ISSUE_TEMPLATE/2-failing-test.md +++ b/.github/ISSUE_TEMPLATE/2-failing-test.md @@ -1,8 +1,8 @@ --- name: "πŸ’‰ Failing Test" about: "Report failing tests or CI jobs." -title: "" -labels: "Type: Bug" +title: "[Test] " +labels: "Type: Test" assignees: Josee9988 --- diff --git a/.github/settings.yml b/.github/settings.yml index d72512d..9288c72 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -62,6 +62,10 @@ labels: color: 9309ab description: Request for information. + - name: 'Type: Test' + color: ce54e3 + description: A problem or enhancement related to a test. + - name: 'Status: Awaiting Review' color: 24d15d description: Ready for review. From e24f8345f7c1f8e574abe3740c617bb5c0c0085b Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Tue, 1 Jun 2021 09:56:32 +0200 Subject: [PATCH 119/152] "1.7.0 added test issue label" --- CHANGELOG.md | 8 ++++++++ README.md | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbcf3ee..c84e9d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.7.0**] - 2021-06-01 + +### Added + +* Type: Test issue label. +* Failing test issue template adds the new Type Test issue label. +* Updated README.md with the new label. + ## [**1.6.0**] - 2021-05-21 ### Added diff --git a/README.md b/README.md index 312baa4..a23e8bf 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ * This template can be used as a base layer for any of your future repositories/projects. * Make your project easy to maintain with **8 issue templates**. * Quickstart your documentation with personalized **readme badges** and a cool readme structure. -* Manage your issues with **19 issue labels** created just for you! +* Manage your issues with **20 issue labels** created just for you! * Make your _community healthier_ with all the guides like code of conduct, contributing, support, security... * Learn more with the [official Github guide on creating repositories from a template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). * To start using it; "**[click use this template](https://github.com/Josee9988/project-template/generate)**", create your new repository, @@ -173,7 +173,7 @@ Badges and texts will be replaced with your project details! ### πŸ”– The labels for your issues -If the bot [probot-settings](https://probot.github.io/apps/settings/) is not installed you will not have these beautiful labels! +If the bot [probot-settings](https://probot.github.io/apps/settings/) is not installed you will not have these beautiful labels! (there are actually 1 more issue label than in the screenshot!)

LABELS From aac77c151091a5e9e7240a21649ad3a26c3839b3 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 2 Jul 2021 12:34:20 +0200 Subject: [PATCH 120/152] improved and fixed some bugs in the readme template --- bin/FUNCTION_HELPERS.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh index bcc4594..00f3329 100644 --- a/bin/FUNCTION_HELPERS.sh +++ b/bin/FUNCTION_HELPERS.sh @@ -70,7 +70,8 @@ displayHelpTexts() { writeREADME() { PROJECT_NAME_PARSED=${PROJECT_NAME/-/ } bash -c "NEW_USERNAME='NEW_USERNAME' PROJECT_NAME='PROJECT_NAME' PROJECT_TYPE='PROJECT_TYPE'; cat << EOF > README.md - + + # πŸ”₯ **$NEW_USERNAME/$PROJECT_NAME**

@@ -104,7 +105,7 @@ writeREADME() { ## 🌲 **Project tree** -* + --- @@ -138,7 +139,7 @@ $PROJECT_NAME was generated from *[Josee9988/project-template](https://github.co --- -πŸ•΅οΈ Extra recommendations +## πŸ•΅οΈ Extra recommendations * From 3b4d54188d06c612e44e0d9012e8df657d0034ce Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 2 Jul 2021 12:34:54 +0200 Subject: [PATCH 121/152] ignored .env files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e1e5dad..755b782 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ .vscode/ .idea/ *.ignore.* +.env ###< Josee9988/project-template ### From 3f7bf9f26667bdae127b67c96e2a417a71daf0bd Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 2 Jul 2021 12:35:01 +0200 Subject: [PATCH 122/152] 1.7.1 documented the changes --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c84e9d5..3df42a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.7.1**] - 2021-07-01 + +### Added + +* `.env` file will be ignored in the `.gitignore`. +* Disabled some markdownlint rules in the generated README.md +* Fixed some minnor errors in the README.md file + ## [**1.7.0**] - 2021-06-01 ### Added From 95a50ca85a4568d53a7cd6c60a2270852dd6a89f Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Jul 2021 11:57:25 +0200 Subject: [PATCH 123/152] "added .env lines and added some comments in the .gitignore" --- .gitignore | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitignore b/.gitignore index 755b782..49c69d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,16 @@ ###> Josee9988/project-template ### + +# Folders .vscode/ .idea/ + +# Files +ignore.* *.ignore.* + +# Environment variables and secret keys .env +.env.test +*.pem + ###< Josee9988/project-template ### From 3bce4e2c2bfc68a069f947ae79c71423d6e35223 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Jul 2021 11:57:48 +0200 Subject: [PATCH 124/152] "fixed some typos and added some extra mrkdownlint rules" --- bin/FUNCTION_HELPERS.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh index 00f3329..368005c 100644 --- a/bin/FUNCTION_HELPERS.sh +++ b/bin/FUNCTION_HELPERS.sh @@ -125,7 +125,7 @@ writeREADME() { We are currently looking for new donators to help and maintain this project! ❀️ -By donating, you will help the development of this project and, *you will be featured in this $PROJECT_NAME's README.md* so everyone can see your kindness and visit your content ⭐. +By donating, you will help the development of this project, and *you will be featured in this $PROJECT_NAME's README.md* so everyone can see your kindness and visit your content ⭐. From f3a54f776262a590bf96df652a90f96fcce5333b Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Jul 2021 11:58:10 +0200 Subject: [PATCH 125/152] "fixed a minnor typo" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a23e8bf..dc975e7 100644 --- a/README.md +++ b/README.md @@ -214,7 +214,7 @@ We also recommend installing all the [used bots](https://github.com/Josee9988/pr We are currently looking for new donators to help and maintain this project! ❀️ -By donating, you will help the development of this project and, *you will be featured in this project's README.md* so everyone can see your kindness and visit your content ⭐. +By donating, you will help the development of this project, and *you will be featured in this project's README.md* so everyone can see your kindness and visit your content ⭐. From 4b5d0ba7d01c692de3eab5e196419afa713ef26e Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Jul 2021 11:58:27 +0200 Subject: [PATCH 126/152] "1.7.2" --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3df42a6..03f1f20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.7.2**] - 2021-07-08 + +### Added + +* Multiple new .gitignore lines and improved its comment structure. + +### Fixed + +* Minnor typo in the generated README.md + ## [**1.7.1**] - 2021-07-01 ### Added From 4c6045701082c8b5b27b5a9387e9a13c5a5f6779 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Jul 2021 12:25:04 +0200 Subject: [PATCH 127/152] "added the base tests" --- tests/arguments_test.sh | 5 + tests/shunit2 | 1343 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 1348 insertions(+) create mode 100755 tests/arguments_test.sh create mode 100755 tests/shunit2 diff --git a/tests/arguments_test.sh b/tests/arguments_test.sh new file mode 100755 index 0000000..c0ba65f --- /dev/null +++ b/tests/arguments_test.sh @@ -0,0 +1,5 @@ +#! /bin/sh +# file: examples/arguments_test.sh + +# Load and run shUnit2. +. tests/shunit2 diff --git a/tests/shunit2 b/tests/shunit2 new file mode 100755 index 0000000..6239683 --- /dev/null +++ b/tests/shunit2 @@ -0,0 +1,1343 @@ +#! /bin/sh +# vim:et:ft=sh:sts=2:sw=2 +# +# Copyright 2008-2020 Kate Ward. All Rights Reserved. +# Released under the Apache 2.0 license. +# http://www.apache.org/licenses/LICENSE-2.0 +# +# shUnit2 -- Unit testing framework for Unix shell scripts. +# https://github.com/kward/shunit2 +# +# Author: kate.ward@forestent.com (Kate Ward) +# +# shUnit2 is a xUnit based unit test framework for Bourne shell scripts. It is +# based on the popular JUnit unit testing framework for Java. +# +# $() are not fully portable (POSIX != portable). +# shellcheck disable=SC2006 +# expr may be antiquated, but it is the only solution in some cases. +# shellcheck disable=SC2003 + +# Return if shunit2 already loaded. +command [ -n "${SHUNIT_VERSION:-}" ] && exit 0 +SHUNIT_VERSION='2.1.8' + +# Return values that scripts can use. +SHUNIT_TRUE=0 +SHUNIT_FALSE=1 +SHUNIT_ERROR=2 + +# Logging functions. +_shunit_warn() { + ${__SHUNIT_CMD_ECHO_ESC} \ + "${__shunit_ansi_yellow}shunit2:WARN${__shunit_ansi_none} $*" >&2 +} +_shunit_error() { + ${__SHUNIT_CMD_ECHO_ESC} \ + "${__shunit_ansi_red}shunit2:ERROR${__shunit_ansi_none} $*" >&2 +} +_shunit_fatal() { + ${__SHUNIT_CMD_ECHO_ESC} \ + "${__shunit_ansi_red}shunit2:FATAL${__shunit_ansi_none} $*" >&2 + exit ${SHUNIT_ERROR} +} + +# Determine some reasonable command defaults. +__SHUNIT_CMD_ECHO_ESC='echo -e' +# shellcheck disable=SC2039 +command [ "`echo -e test`" = '-e test' ] && __SHUNIT_CMD_ECHO_ESC='echo' + +__SHUNIT_UNAME_S=`uname -s` +case "${__SHUNIT_UNAME_S}" in + BSD) __SHUNIT_CMD_EXPR='gexpr' ;; + *) __SHUNIT_CMD_EXPR='expr' ;; +esac +__SHUNIT_CMD_TPUT='tput' + +# Commands a user can override if needed. +SHUNIT_CMD_EXPR=${SHUNIT_CMD_EXPR:-${__SHUNIT_CMD_EXPR}} +SHUNIT_CMD_TPUT=${SHUNIT_CMD_TPUT:-${__SHUNIT_CMD_TPUT}} + +# Enable color output. Options are 'never', 'always', or 'auto'. +SHUNIT_COLOR=${SHUNIT_COLOR:-auto} + +# Specific shell checks. +if command [ -n "${ZSH_VERSION:-}" ]; then + setopt |grep "^shwordsplit$" >/dev/null + if command [ $? -ne ${SHUNIT_TRUE} ]; then + _shunit_fatal 'zsh shwordsplit option is required for proper operation' + fi + if command [ -z "${SHUNIT_PARENT:-}" ]; then + _shunit_fatal "zsh does not pass \$0 through properly. please declare \ +\"SHUNIT_PARENT=\$0\" before calling shUnit2" + fi +fi + +# +# Constants +# + +__SHUNIT_MODE_SOURCED='sourced' +__SHUNIT_MODE_STANDALONE='standalone' +__SHUNIT_PARENT=${SHUNIT_PARENT:-$0} + +# User provided test prefix to display in front of the name of the test being +# executed. Define by setting the SHUNIT_TEST_PREFIX variable. +__SHUNIT_TEST_PREFIX=${SHUNIT_TEST_PREFIX:-} + +# ANSI colors. +__SHUNIT_ANSI_NONE='\033[0m' +__SHUNIT_ANSI_RED='\033[1;31m' +__SHUNIT_ANSI_GREEN='\033[1;32m' +__SHUNIT_ANSI_YELLOW='\033[1;33m' +__SHUNIT_ANSI_CYAN='\033[1;36m' + +# Set the constants readonly. +__shunit_constants=`set |grep '^__SHUNIT_' |cut -d= -f1` +echo "${__shunit_constants}" |grep '^Binary file' >/dev/null && \ + __shunit_constants=`set |grep -a '^__SHUNIT_' |cut -d= -f1` +for __shunit_const in ${__shunit_constants}; do + if command [ -z "${ZSH_VERSION:-}" ]; then + readonly "${__shunit_const}" + else + case ${ZSH_VERSION} in + [123].*) readonly "${__shunit_const}" ;; + *) readonly -g "${__shunit_const}" # Declare readonly constants globally. + esac + fi +done +unset __shunit_const __shunit_constants + +# +# Internal variables. +# + +# Variables. +__shunit_lineno='' # Line number of executed test. +__shunit_mode=${__SHUNIT_MODE_SOURCED} # Operating mode. +__shunit_reportGenerated=${SHUNIT_FALSE} # Is report generated. +__shunit_script='' # Filename of unittest script (standalone mode). +__shunit_skip=${SHUNIT_FALSE} # Is skipping enabled. +__shunit_suite='' # Suite of tests to execute. +__shunit_clean=${SHUNIT_FALSE} # _shunit_cleanup() was already called. + +# ANSI colors (populated by _shunit_configureColor()). +__shunit_ansi_none='' +__shunit_ansi_red='' +__shunit_ansi_green='' +__shunit_ansi_yellow='' +__shunit_ansi_cyan='' + +# Counts of tests. +__shunit_testSuccess=${SHUNIT_TRUE} +__shunit_testsTotal=0 +__shunit_testsPassed=0 +__shunit_testsFailed=0 + +# Counts of asserts. +__shunit_assertsTotal=0 +__shunit_assertsPassed=0 +__shunit_assertsFailed=0 +__shunit_assertsSkipped=0 + +# +# Macros. +# + +# shellcheck disable=SC2016,SC2089 +_SHUNIT_LINENO_='eval __shunit_lineno=""; if command [ "${1:-}" = "--lineno" ]; then command [ -n "$2" ] && __shunit_lineno="[$2] "; shift 2; fi' + +#----------------------------------------------------------------------------- +# Assertion functions. +# + +# Assert that two values are equal to one another. +# +# Args: +# message: string: failure message [optional] +# expected: string: expected value +# actual: string: actual value +# Returns: +# integer: success (TRUE/FALSE/ERROR constant) +assertEquals() { + # shellcheck disable=SC2090 + ${_SHUNIT_LINENO_} + if command [ $# -lt 2 -o $# -gt 3 ]; then + _shunit_error "assertEquals() requires two or three arguments; $# given" + _shunit_assertFail + return ${SHUNIT_ERROR} + fi + _shunit_shouldSkip && return ${SHUNIT_TRUE} + + shunit_message_=${__shunit_lineno} + if command [ $# -eq 3 ]; then + shunit_message_="${shunit_message_}$1" + shift + fi + shunit_expected_=$1 + shunit_actual_=$2 + + shunit_return=${SHUNIT_TRUE} + if command [ "${shunit_expected_}" = "${shunit_actual_}" ]; then + _shunit_assertPass + else + failNotEquals "${shunit_message_}" "${shunit_expected_}" "${shunit_actual_}" + shunit_return=${SHUNIT_FALSE} + fi + + unset shunit_message_ shunit_expected_ shunit_actual_ + return ${shunit_return} +} +# shellcheck disable=SC2016,SC2034 +_ASSERT_EQUALS_='eval assertEquals --lineno "${LINENO:-}"' + +# Assert that two values are not equal to one another. +# +# Args: +# message: string: failure message [optional] +# expected: string: expected value +# actual: string: actual value +# Returns: +# integer: success (TRUE/FALSE/ERROR constant) +assertNotEquals() { + # shellcheck disable=SC2090 + ${_SHUNIT_LINENO_} + if command [ $# -lt 2 -o $# -gt 3 ]; then + _shunit_error "assertNotEquals() requires two or three arguments; $# given" + _shunit_assertFail + return ${SHUNIT_ERROR} + fi + _shunit_shouldSkip && return ${SHUNIT_TRUE} + + shunit_message_=${__shunit_lineno} + if command [ $# -eq 3 ]; then + shunit_message_="${shunit_message_}$1" + shift + fi + shunit_expected_=$1 + shunit_actual_=$2 + + shunit_return=${SHUNIT_TRUE} + if command [ "${shunit_expected_}" != "${shunit_actual_}" ]; then + _shunit_assertPass + else + failSame "${shunit_message_}" "${shunit_expected_}" "${shunit_actual_}" + shunit_return=${SHUNIT_FALSE} + fi + + unset shunit_message_ shunit_expected_ shunit_actual_ + return ${shunit_return} +} +# shellcheck disable=SC2016,SC2034 +_ASSERT_NOT_EQUALS_='eval assertNotEquals --lineno "${LINENO:-}"' + +# Assert that a container contains a content. +# +# Args: +# message: string: failure message [optional] +# container: string: container to analyze +# content: string: content to find +# Returns: +# integer: success (TRUE/FALSE/ERROR constant) +assertContains() { + # shellcheck disable=SC2090 + ${_SHUNIT_LINENO_} + if command [ $# -lt 2 -o $# -gt 3 ]; then + _shunit_error "assertContains() requires two or three arguments; $# given" + _shunit_assertFail + return ${SHUNIT_ERROR} + fi + _shunit_shouldSkip && return ${SHUNIT_TRUE} + + shunit_message_=${__shunit_lineno} + if command [ $# -eq 3 ]; then + shunit_message_="${shunit_message_}$1" + shift + fi + shunit_container_=$1 + shunit_content_=$2 + + shunit_return=${SHUNIT_TRUE} + if echo "$shunit_container_" | grep -F -- "$shunit_content_" > /dev/null; then + _shunit_assertPass + else + failNotFound "${shunit_message_}" "${shunit_content_}" + shunit_return=${SHUNIT_FALSE} + fi + + unset shunit_message_ shunit_container_ shunit_content_ + return ${shunit_return} +} +# shellcheck disable=SC2016,SC2034 +_ASSERT_CONTAINS_='eval assertContains --lineno "${LINENO:-}"' + +# Assert that a container does not contain a content. +# +# Args: +# message: string: failure message [optional] +# container: string: container to analyze +# content: string: content to look for +# Returns: +# integer: success (TRUE/FALSE/ERROR constant) +assertNotContains() { + # shellcheck disable=SC2090 + ${_SHUNIT_LINENO_} + if command [ $# -lt 2 -o $# -gt 3 ]; then + _shunit_error "assertNotContains() requires two or three arguments; $# given" + _shunit_assertFail + return ${SHUNIT_ERROR} + fi + _shunit_shouldSkip && return ${SHUNIT_TRUE} + + shunit_message_=${__shunit_lineno} + if command [ $# -eq 3 ]; then + shunit_message_="${shunit_message_}$1" + shift + fi + shunit_container_=$1 + shunit_content_=$2 + + shunit_return=${SHUNIT_TRUE} + if echo "$shunit_container_" | grep -F -- "$shunit_content_" > /dev/null; then + failFound "${shunit_message_}" "${shunit_content_}" + shunit_return=${SHUNIT_FALSE} + else + _shunit_assertPass + fi + + unset shunit_message_ shunit_container_ shunit_content_ + return ${shunit_return} +} +# shellcheck disable=SC2016,SC2034 +_ASSERT_NOT_CONTAINS_='eval assertNotContains --lineno "${LINENO:-}"' + +# Assert that a value is null (i.e. an empty string) +# +# Args: +# message: string: failure message [optional] +# actual: string: actual value +# Returns: +# integer: success (TRUE/FALSE/ERROR constant) +assertNull() { + # shellcheck disable=SC2090 + ${_SHUNIT_LINENO_} + if command [ $# -lt 1 -o $# -gt 2 ]; then + _shunit_error "assertNull() requires one or two arguments; $# given" + _shunit_assertFail + return ${SHUNIT_ERROR} + fi + _shunit_shouldSkip && return ${SHUNIT_TRUE} + + shunit_message_=${__shunit_lineno} + if command [ $# -eq 2 ]; then + shunit_message_="${shunit_message_}$1" + shift + fi + assertTrue "${shunit_message_}" "[ -z '$1' ]" + shunit_return=$? + + unset shunit_message_ + return ${shunit_return} +} +# shellcheck disable=SC2016,SC2034 +_ASSERT_NULL_='eval assertNull --lineno "${LINENO:-}"' + +# Assert that a value is not null (i.e. a non-empty string) +# +# Args: +# message: string: failure message [optional] +# actual: string: actual value +# Returns: +# integer: success (TRUE/FALSE/ERROR constant) +assertNotNull() { + # shellcheck disable=SC2090 + ${_SHUNIT_LINENO_} + if command [ $# -gt 2 ]; then # allowing 0 arguments as $1 might actually be null + _shunit_error "assertNotNull() requires one or two arguments; $# given" + _shunit_assertFail + return ${SHUNIT_ERROR} + fi + _shunit_shouldSkip && return ${SHUNIT_TRUE} + + shunit_message_=${__shunit_lineno} + if command [ $# -eq 2 ]; then + shunit_message_="${shunit_message_}$1" + shift + fi + shunit_actual_=`_shunit_escapeCharactersInString "${1:-}"` + test -n "${shunit_actual_}" + assertTrue "${shunit_message_}" $? + shunit_return=$? + + unset shunit_actual_ shunit_message_ + return ${shunit_return} +} +# shellcheck disable=SC2016,SC2034 +_ASSERT_NOT_NULL_='eval assertNotNull --lineno "${LINENO:-}"' + +# Assert that two values are the same (i.e. equal to one another). +# +# Args: +# message: string: failure message [optional] +# expected: string: expected value +# actual: string: actual value +# Returns: +# integer: success (TRUE/FALSE/ERROR constant) +assertSame() { + # shellcheck disable=SC2090 + ${_SHUNIT_LINENO_} + if command [ $# -lt 2 -o $# -gt 3 ]; then + _shunit_error "assertSame() requires two or three arguments; $# given" + _shunit_assertFail + return ${SHUNIT_ERROR} + fi + _shunit_shouldSkip && return ${SHUNIT_TRUE} + + shunit_message_=${__shunit_lineno} + if command [ $# -eq 3 ]; then + shunit_message_="${shunit_message_}$1" + shift + fi + assertEquals "${shunit_message_}" "$1" "$2" + shunit_return=$? + + unset shunit_message_ + return ${shunit_return} +} +# shellcheck disable=SC2016,SC2034 +_ASSERT_SAME_='eval assertSame --lineno "${LINENO:-}"' + +# Assert that two values are not the same (i.e. not equal to one another). +# +# Args: +# message: string: failure message [optional] +# expected: string: expected value +# actual: string: actual value +# Returns: +# integer: success (TRUE/FALSE/ERROR constant) +assertNotSame() { + # shellcheck disable=SC2090 + ${_SHUNIT_LINENO_} + if command [ $# -lt 2 -o $# -gt 3 ]; then + _shunit_error "assertNotSame() requires two or three arguments; $# given" + _shunit_assertFail + return ${SHUNIT_ERROR} + fi + _shunit_shouldSkip && return ${SHUNIT_TRUE} + + shunit_message_=${__shunit_lineno} + if command [ $# -eq 3 ]; then + shunit_message_="${shunit_message_:-}$1" + shift + fi + assertNotEquals "${shunit_message_}" "$1" "$2" + shunit_return=$? + + unset shunit_message_ + return ${shunit_return} +} +# shellcheck disable=SC2016,SC2034 +_ASSERT_NOT_SAME_='eval assertNotSame --lineno "${LINENO:-}"' + +# Assert that a value or shell test condition is true. +# +# In shell, a value of 0 is true and a non-zero value is false. Any integer +# value passed can thereby be tested. +# +# Shell supports much more complicated tests though, and a means to support +# them was needed. As such, this function tests that conditions are true or +# false through evaluation rather than just looking for a true or false. +# +# The following test will succeed: +# assertTrue 0 +# assertTrue "[ 34 -gt 23 ]" +# The following test will fail with a message: +# assertTrue 123 +# assertTrue "test failed" "[ -r '/non/existent/file' ]" +# +# Args: +# message: string: failure message [optional] +# condition: string: integer value or shell conditional statement +# Returns: +# integer: success (TRUE/FALSE/ERROR constant) +assertTrue() { + # shellcheck disable=SC2090 + ${_SHUNIT_LINENO_} + if command [ $# -lt 1 -o $# -gt 2 ]; then + _shunit_error "assertTrue() takes one or two arguments; $# given" + _shunit_assertFail + return ${SHUNIT_ERROR} + fi + _shunit_shouldSkip && return ${SHUNIT_TRUE} + + shunit_message_=${__shunit_lineno} + if command [ $# -eq 2 ]; then + shunit_message_="${shunit_message_}$1" + shift + fi + shunit_condition_=$1 + + # See if condition is an integer, i.e. a return value. + shunit_match_=`expr "${shunit_condition_}" : '\([0-9]*\)'` + shunit_return=${SHUNIT_TRUE} + if command [ -z "${shunit_condition_}" ]; then + # Null condition. + shunit_return=${SHUNIT_FALSE} + elif command [ -n "${shunit_match_}" -a "${shunit_condition_}" = "${shunit_match_}" ] + then + # Possible return value. Treating 0 as true, and non-zero as false. + command [ "${shunit_condition_}" -ne 0 ] && shunit_return=${SHUNIT_FALSE} + else + # Hopefully... a condition. + ( eval "${shunit_condition_}" ) >/dev/null 2>&1 + command [ $? -ne 0 ] && shunit_return=${SHUNIT_FALSE} + fi + + # Record the test. + if command [ ${shunit_return} -eq ${SHUNIT_TRUE} ]; then + _shunit_assertPass + else + _shunit_assertFail "${shunit_message_}" + fi + + unset shunit_message_ shunit_condition_ shunit_match_ + return ${shunit_return} +} +# shellcheck disable=SC2016,SC2034 +_ASSERT_TRUE_='eval assertTrue --lineno "${LINENO:-}"' + +# Assert that a value or shell test condition is false. +# +# In shell, a value of 0 is true and a non-zero value is false. Any integer +# value passed can thereby be tested. +# +# Shell supports much more complicated tests though, and a means to support +# them was needed. As such, this function tests that conditions are true or +# false through evaluation rather than just looking for a true or false. +# +# The following test will succeed: +# assertFalse 1 +# assertFalse "[ 'apples' = 'oranges' ]" +# The following test will fail with a message: +# assertFalse 0 +# assertFalse "test failed" "[ 1 -eq 1 -a 2 -eq 2 ]" +# +# Args: +# message: string: failure message [optional] +# condition: string: integer value or shell conditional statement +# Returns: +# integer: success (TRUE/FALSE/ERROR constant) +assertFalse() { + # shellcheck disable=SC2090 + ${_SHUNIT_LINENO_} + if command [ $# -lt 1 -o $# -gt 2 ]; then + _shunit_error "assertFalse() requires one or two arguments; $# given" + _shunit_assertFail + return ${SHUNIT_ERROR} + fi + _shunit_shouldSkip && return ${SHUNIT_TRUE} + + shunit_message_=${__shunit_lineno} + if command [ $# -eq 2 ]; then + shunit_message_="${shunit_message_}$1" + shift + fi + shunit_condition_=$1 + + # See if condition is an integer, i.e. a return value. + shunit_match_=`expr "${shunit_condition_}" : '\([0-9]*\)'` + shunit_return=${SHUNIT_TRUE} + if command [ -z "${shunit_condition_}" ]; then + # Null condition. + shunit_return=${SHUNIT_FALSE} + elif command [ -n "${shunit_match_}" -a "${shunit_condition_}" = "${shunit_match_}" ] + then + # Possible return value. Treating 0 as true, and non-zero as false. + command [ "${shunit_condition_}" -eq 0 ] && shunit_return=${SHUNIT_FALSE} + else + # Hopefully... a condition. + ( eval "${shunit_condition_}" ) >/dev/null 2>&1 + command [ $? -eq 0 ] && shunit_return=${SHUNIT_FALSE} + fi + + # Record the test. + if command [ "${shunit_return}" -eq "${SHUNIT_TRUE}" ]; then + _shunit_assertPass + else + _shunit_assertFail "${shunit_message_}" + fi + + unset shunit_message_ shunit_condition_ shunit_match_ + return "${shunit_return}" +} +# shellcheck disable=SC2016,SC2034 +_ASSERT_FALSE_='eval assertFalse --lineno "${LINENO:-}"' + +#----------------------------------------------------------------------------- +# Failure functions. +# + +# Records a test failure. +# +# Args: +# message: string: failure message [optional] +# Returns: +# integer: success (TRUE/FALSE/ERROR constant) +fail() { + # shellcheck disable=SC2090 + ${_SHUNIT_LINENO_} + if command [ $# -gt 1 ]; then + _shunit_error "fail() requires zero or one arguments; $# given" + return ${SHUNIT_ERROR} + fi + _shunit_shouldSkip && return ${SHUNIT_TRUE} + + shunit_message_=${__shunit_lineno} + if command [ $# -eq 1 ]; then + shunit_message_="${shunit_message_}$1" + shift + fi + + _shunit_assertFail "${shunit_message_}" + + unset shunit_message_ + return ${SHUNIT_FALSE} +} +# shellcheck disable=SC2016,SC2034 +_FAIL_='eval fail --lineno "${LINENO:-}"' + +# Records a test failure, stating two values were not equal. +# +# Args: +# message: string: failure message [optional] +# expected: string: expected value +# actual: string: actual value +# Returns: +# integer: success (TRUE/FALSE/ERROR constant) +failNotEquals() { + # shellcheck disable=SC2090 + ${_SHUNIT_LINENO_} + if command [ $# -lt 2 -o $# -gt 3 ]; then + _shunit_error "failNotEquals() requires one or two arguments; $# given" + return ${SHUNIT_ERROR} + fi + _shunit_shouldSkip && return ${SHUNIT_TRUE} + + shunit_message_=${__shunit_lineno} + if command [ $# -eq 3 ]; then + shunit_message_="${shunit_message_}$1" + shift + fi + shunit_expected_=$1 + shunit_actual_=$2 + + shunit_message_=${shunit_message_%% } + _shunit_assertFail "${shunit_message_:+${shunit_message_} }expected:<${shunit_expected_}> but was:<${shunit_actual_}>" + + unset shunit_message_ shunit_expected_ shunit_actual_ + return ${SHUNIT_FALSE} +} +# shellcheck disable=SC2016,SC2034 +_FAIL_NOT_EQUALS_='eval failNotEquals --lineno "${LINENO:-}"' + +# Records a test failure, stating a value was found. +# +# Args: +# message: string: failure message [optional] +# content: string: found value +# Returns: +# integer: success (TRUE/FALSE/ERROR constant) +failFound() { + # shellcheck disable=SC2090 + ${_SHUNIT_LINENO_} + if command [ $# -lt 1 -o $# -gt 2 ]; then + _shunit_error "failFound() requires one or two arguments; $# given" + return ${SHUNIT_ERROR} + fi + _shunit_shouldSkip && return ${SHUNIT_TRUE} + + shunit_message_=${__shunit_lineno} + if command [ $# -eq 2 ]; then + shunit_message_="${shunit_message_}$1" + shift + fi + + shunit_message_=${shunit_message_%% } + _shunit_assertFail "${shunit_message_:+${shunit_message_} }Found" + + unset shunit_message_ + return ${SHUNIT_FALSE} +} +# shellcheck disable=SC2016,SC2034 +_FAIL_FOUND_='eval failFound --lineno "${LINENO:-}"' + +# Records a test failure, stating a content was not found. +# +# Args: +# message: string: failure message [optional] +# content: string: content not found +# Returns: +# integer: success (TRUE/FALSE/ERROR constant) +failNotFound() { + # shellcheck disable=SC2090 + ${_SHUNIT_LINENO_} + if command [ $# -lt 1 -o $# -gt 2 ]; then + _shunit_error "failNotFound() requires one or two arguments; $# given" + return ${SHUNIT_ERROR} + fi + _shunit_shouldSkip && return ${SHUNIT_TRUE} + + shunit_message_=${__shunit_lineno} + if command [ $# -eq 2 ]; then + shunit_message_="${shunit_message_}$1" + shift + fi + shunit_content_=$1 + + shunit_message_=${shunit_message_%% } + _shunit_assertFail "${shunit_message_:+${shunit_message_} }Not found:<${shunit_content_}>" + + unset shunit_message_ shunit_content_ + return ${SHUNIT_FALSE} +} +# shellcheck disable=SC2016,SC2034 +_FAIL_NOT_FOUND_='eval failNotFound --lineno "${LINENO:-}"' + +# Records a test failure, stating two values should have been the same. +# +# Args: +# message: string: failure message [optional] +# expected: string: expected value +# actual: string: actual value +# Returns: +# integer: success (TRUE/FALSE/ERROR constant) +failSame() +{ + # shellcheck disable=SC2090 + ${_SHUNIT_LINENO_} + if command [ $# -lt 2 -o $# -gt 3 ]; then + _shunit_error "failSame() requires two or three arguments; $# given" + return ${SHUNIT_ERROR} + fi + _shunit_shouldSkip && return ${SHUNIT_TRUE} + + shunit_message_=${__shunit_lineno} + if command [ $# -eq 3 ]; then + shunit_message_="${shunit_message_}$1" + shift + fi + + shunit_message_=${shunit_message_%% } + _shunit_assertFail "${shunit_message_:+${shunit_message_} }expected not same" + + unset shunit_message_ + return ${SHUNIT_FALSE} +} +# shellcheck disable=SC2016,SC2034 +_FAIL_SAME_='eval failSame --lineno "${LINENO:-}"' + +# Records a test failure, stating two values were not equal. +# +# This is functionally equivalent to calling failNotEquals(). +# +# Args: +# message: string: failure message [optional] +# expected: string: expected value +# actual: string: actual value +# Returns: +# integer: success (TRUE/FALSE/ERROR constant) +failNotSame() { + # shellcheck disable=SC2090 + ${_SHUNIT_LINENO_} + if command [ $# -lt 2 -o $# -gt 3 ]; then + _shunit_error "failNotSame() requires one or two arguments; $# given" + return ${SHUNIT_ERROR} + fi + _shunit_shouldSkip && return ${SHUNIT_TRUE} + + shunit_message_=${__shunit_lineno} + if command [ $# -eq 3 ]; then + shunit_message_="${shunit_message_}$1" + shift + fi + failNotEquals "${shunit_message_}" "$1" "$2" + shunit_return=$? + + unset shunit_message_ + return ${shunit_return} +} +# shellcheck disable=SC2016,SC2034 +_FAIL_NOT_SAME_='eval failNotSame --lineno "${LINENO:-}"' + +#----------------------------------------------------------------------------- +# Skipping functions. +# + +# Force remaining assert and fail functions to be "skipped". +# +# This function forces the remaining assert and fail functions to be "skipped", +# i.e. they will have no effect. Each function skipped will be recorded so that +# the total of asserts and fails will not be altered. +# +# Args: +# None +startSkipping() { __shunit_skip=${SHUNIT_TRUE}; } + +# Resume the normal recording behavior of assert and fail calls. +# +# Args: +# None +endSkipping() { __shunit_skip=${SHUNIT_FALSE}; } + +# Returns the state of assert and fail call skipping. +# +# Args: +# None +# Returns: +# boolean: (TRUE/FALSE constant) +isSkipping() { return ${__shunit_skip}; } + +#----------------------------------------------------------------------------- +# Suite functions. +# + +# Stub. This function should contains all unit test calls to be made. +# +# DEPRECATED (as of 2.1.0) +# +# This function can be optionally overridden by the user in their test suite. +# +# If this function exists, it will be called when shunit2 is sourced. If it +# does not exist, shunit2 will search the parent script for all functions +# beginning with the word 'test', and they will be added dynamically to the +# test suite. +# +# This function should be overridden by the user in their unit test suite. +# Note: see _shunit_mktempFunc() for actual implementation +# +# Args: +# None +#suite() { :; } # DO NOT UNCOMMENT THIS FUNCTION + +# Adds a function name to the list of tests schedule for execution. +# +# This function should only be called from within the suite() function. +# +# Args: +# function: string: name of a function to add to current unit test suite +suite_addTest() { + shunit_func_=${1:-} + + __shunit_suite="${__shunit_suite:+${__shunit_suite} }${shunit_func_}" + __shunit_testsTotal=`expr ${__shunit_testsTotal} + 1` + + unset shunit_func_ +} + +# Stub. This function will be called once before any tests are run. +# +# Common one-time environment preparation tasks shared by all tests can be +# defined here. +# +# This function should be overridden by the user in their unit test suite. +# Note: see _shunit_mktempFunc() for actual implementation +# +# Args: +# None +#oneTimeSetUp() { :; } # DO NOT UNCOMMENT THIS FUNCTION + +# Stub. This function will be called once after all tests are finished. +# +# Common one-time environment cleanup tasks shared by all tests can be defined +# here. +# +# This function should be overridden by the user in their unit test suite. +# Note: see _shunit_mktempFunc() for actual implementation +# +# Args: +# None +#oneTimeTearDown() { :; } # DO NOT UNCOMMENT THIS FUNCTION + +# Stub. This function will be called before each test is run. +# +# Common environment preparation tasks shared by all tests can be defined here. +# +# This function should be overridden by the user in their unit test suite. +# Note: see _shunit_mktempFunc() for actual implementation +# +# Args: +# None +#setUp() { :; } # DO NOT UNCOMMENT THIS FUNCTION + +# Note: see _shunit_mktempFunc() for actual implementation +# Stub. This function will be called after each test is run. +# +# Common environment cleanup tasks shared by all tests can be defined here. +# +# This function should be overridden by the user in their unit test suite. +# Note: see _shunit_mktempFunc() for actual implementation +# +# Args: +# None +#tearDown() { :; } # DO NOT UNCOMMENT THIS FUNCTION + +#------------------------------------------------------------------------------ +# Internal shUnit2 functions. +# + +# Create a temporary directory to store various run-time files in. +# +# This function is a cross-platform temporary directory creation tool. Not all +# OSes have the `mktemp` function, so one is included here. +# +# Args: +# None +# Outputs: +# string: the temporary directory that was created +_shunit_mktempDir() { + # Try the standard `mktemp` function. + ( exec mktemp -dqt shunit.XXXXXX 2>/dev/null ) && return + + # The standard `mktemp` didn't work. Use our own. + # shellcheck disable=SC2039 + if command [ -r '/dev/urandom' -a -x '/usr/bin/od' ]; then + _shunit_random_=`/usr/bin/od -vAn -N4 -tx4 "${_shunit_file_}" +#! /bin/sh +exit ${SHUNIT_TRUE} +EOF + command chmod +x "${_shunit_file_}" + done + + unset _shunit_file_ +} + +# Final cleanup function to leave things as we found them. +# +# Besides removing the temporary directory, this function is in charge of the +# final exit code of the unit test. The exit code is based on how the script +# was ended (e.g. normal exit, or via Ctrl-C). +# +# Args: +# name: string: name of the trap called (specified when trap defined) +_shunit_cleanup() { + _shunit_name_=$1 + + case "${_shunit_name_}" in + EXIT) ;; + INT) _shunit_signal_=130 ;; # 2+128 + TERM) _shunit_signal_=143 ;; # 15+128 + *) + _shunit_error "unrecognized trap value (${_shunit_name_})" + _shunit_signal_=0 + ;; + esac + if command [ "${_shunit_name_}" != 'EXIT' ]; then + _shunit_warn "trapped and now handling the (${_shunit_name_}) signal" + fi + + # Do our work. + if command [ ${__shunit_clean} -eq ${SHUNIT_FALSE} ]; then + # Ensure tear downs are only called once. + __shunit_clean=${SHUNIT_TRUE} + + tearDown + command [ $? -eq ${SHUNIT_TRUE} ] \ + || _shunit_warn "tearDown() returned non-zero return code." + oneTimeTearDown + command [ $? -eq ${SHUNIT_TRUE} ] \ + || _shunit_warn "oneTimeTearDown() returned non-zero return code." + + command rm -fr "${__shunit_tmpDir}" + fi + + if command [ "${_shunit_name_}" != 'EXIT' ]; then + # Handle all non-EXIT signals. + trap - 0 # Disable EXIT trap. + exit ${_shunit_signal_} + elif command [ ${__shunit_reportGenerated} -eq ${SHUNIT_FALSE} ]; then + _shunit_assertFail 'unknown failure encountered running a test' + _shunit_generateReport + exit ${SHUNIT_ERROR} + fi + + unset _shunit_name_ _shunit_signal_ +} + +# configureColor based on user color preference. +# +# Args: +# color: string: color mode (one of `always`, `auto`, or `none`). +_shunit_configureColor() { + _shunit_color_=${SHUNIT_FALSE} # By default, no color. + case $1 in + 'always') _shunit_color_=${SHUNIT_TRUE} ;; + 'auto') + command [ "`_shunit_colors`" -ge 8 ] && _shunit_color_=${SHUNIT_TRUE} + ;; + 'none') ;; + *) _shunit_fatal "unrecognized color option '$1'" ;; + esac + + case ${_shunit_color_} in + ${SHUNIT_TRUE}) + __shunit_ansi_none=${__SHUNIT_ANSI_NONE} + __shunit_ansi_red=${__SHUNIT_ANSI_RED} + __shunit_ansi_green=${__SHUNIT_ANSI_GREEN} + __shunit_ansi_yellow=${__SHUNIT_ANSI_YELLOW} + __shunit_ansi_cyan=${__SHUNIT_ANSI_CYAN} + ;; + ${SHUNIT_FALSE}) + __shunit_ansi_none='' + __shunit_ansi_red='' + __shunit_ansi_green='' + __shunit_ansi_yellow='' + __shunit_ansi_cyan='' + ;; + esac + + unset _shunit_color_ _shunit_tput_ +} + +# colors returns the number of supported colors for the TERM. +_shunit_colors() { + _shunit_tput_=`${SHUNIT_CMD_TPUT} colors 2>/dev/null` + if command [ $? -eq 0 ]; then + echo "${_shunit_tput_}" + else + echo 16 + fi + unset _shunit_tput_ +} + +# The actual running of the tests happens here. +# +# Args: +# None +_shunit_execSuite() { + for _shunit_test_ in ${__shunit_suite}; do + __shunit_testSuccess=${SHUNIT_TRUE} + + # Disable skipping. + endSkipping + + # Execute the per-test setup function. + setUp + command [ $? -eq ${SHUNIT_TRUE} ] \ + || _shunit_fatal "setup() returned non-zero return code." + + # Execute the test. + echo "${__SHUNIT_TEST_PREFIX}${_shunit_test_}" + eval "${_shunit_test_}" + if command [ $? -ne ${SHUNIT_TRUE} ]; then + _shunit_error "${_shunit_test_}() returned non-zero return code." + __shunit_testSuccess=${SHUNIT_ERROR} + _shunit_incFailedCount + fi + + # Execute the per-test tear-down function. + tearDown + command [ $? -eq ${SHUNIT_TRUE} ] \ + || _shunit_fatal "tearDown() returned non-zero return code." + + # Update stats. + if command [ ${__shunit_testSuccess} -eq ${SHUNIT_TRUE} ]; then + __shunit_testsPassed=`expr ${__shunit_testsPassed} + 1` + else + __shunit_testsFailed=`expr ${__shunit_testsFailed} + 1` + fi + done + + unset _shunit_test_ +} + +# Generates the user friendly report with appropriate OK/FAILED message. +# +# Args: +# None +# Output: +# string: the report of successful and failed tests, as well as totals. +_shunit_generateReport() { + command [ "${__shunit_reportGenerated}" -eq ${SHUNIT_TRUE} ] && return + + _shunit_ok_=${SHUNIT_TRUE} + + # If no exit code was provided, determine an appropriate one. + command [ "${__shunit_testsFailed}" -gt 0 \ + -o ${__shunit_testSuccess} -eq ${SHUNIT_FALSE} ] \ + && _shunit_ok_=${SHUNIT_FALSE} + + echo + _shunit_msg_="Ran ${__shunit_ansi_cyan}${__shunit_testsTotal}${__shunit_ansi_none}" + if command [ "${__shunit_testsTotal}" -eq 1 ]; then + ${__SHUNIT_CMD_ECHO_ESC} "${_shunit_msg_} test." + else + ${__SHUNIT_CMD_ECHO_ESC} "${_shunit_msg_} tests." + fi + + if command [ ${_shunit_ok_} -eq ${SHUNIT_TRUE} ]; then + _shunit_msg_="${__shunit_ansi_green}OK${__shunit_ansi_none}" + command [ "${__shunit_assertsSkipped}" -gt 0 ] \ + && _shunit_msg_="${_shunit_msg_} (${__shunit_ansi_yellow}skipped=${__shunit_assertsSkipped}${__shunit_ansi_none})" + else + _shunit_msg_="${__shunit_ansi_red}FAILED${__shunit_ansi_none}" + _shunit_msg_="${_shunit_msg_} (${__shunit_ansi_red}failures=${__shunit_assertsFailed}${__shunit_ansi_none}" + command [ "${__shunit_assertsSkipped}" -gt 0 ] \ + && _shunit_msg_="${_shunit_msg_},${__shunit_ansi_yellow}skipped=${__shunit_assertsSkipped}${__shunit_ansi_none}" + _shunit_msg_="${_shunit_msg_})" + fi + + echo + ${__SHUNIT_CMD_ECHO_ESC} "${_shunit_msg_}" + __shunit_reportGenerated=${SHUNIT_TRUE} + + unset _shunit_msg_ _shunit_ok_ +} + +# Test for whether a function should be skipped. +# +# Args: +# None +# Returns: +# boolean: whether the test should be skipped (TRUE/FALSE constant) +_shunit_shouldSkip() { + command [ ${__shunit_skip} -eq ${SHUNIT_FALSE} ] && return ${SHUNIT_FALSE} + _shunit_assertSkip +} + +# Records a successful test. +# +# Args: +# None +_shunit_assertPass() { + __shunit_assertsPassed=`expr ${__shunit_assertsPassed} + 1` + __shunit_assertsTotal=`expr ${__shunit_assertsTotal} + 1` +} + +# Records a test failure. +# +# Args: +# message: string: failure message to provide user +_shunit_assertFail() { + __shunit_testSuccess=${SHUNIT_FALSE} + _shunit_incFailedCount + + \[ $# -gt 0 ] && ${__SHUNIT_CMD_ECHO_ESC} \ + "${__shunit_ansi_red}ASSERT:${__shunit_ansi_none}$*" +} + +# Increment the count of failed asserts. +# +# Args: +# none +_shunit_incFailedCount() { + __shunit_assertsFailed=`expr "${__shunit_assertsFailed}" + 1` + __shunit_assertsTotal=`expr "${__shunit_assertsTotal}" + 1` +} + + +# Records a skipped test. +# +# Args: +# None +_shunit_assertSkip() { + __shunit_assertsSkipped=`expr "${__shunit_assertsSkipped}" + 1` + __shunit_assertsTotal=`expr "${__shunit_assertsTotal}" + 1` +} + +# Prepare a script filename for sourcing. +# +# Args: +# script: string: path to a script to source +# Returns: +# string: filename prefixed with ./ (if necessary) +_shunit_prepForSourcing() { + _shunit_script_=$1 + case "${_shunit_script_}" in + /*|./*) echo "${_shunit_script_}" ;; + *) echo "./${_shunit_script_}" ;; + esac + unset _shunit_script_ +} + +# Escape a character in a string. +# +# Args: +# c: string: unescaped character +# s: string: to escape character in +# Returns: +# string: with escaped character(s) +_shunit_escapeCharInStr() { + command [ -n "$2" ] || return # No point in doing work on an empty string. + + # Note: using shorter variable names to prevent conflicts with + # _shunit_escapeCharactersInString(). + _shunit_c_=$1 + _shunit_s_=$2 + + # Escape the character. + # shellcheck disable=SC1003,SC2086 + echo ''${_shunit_s_}'' |command sed 's/\'${_shunit_c_}'/\\\'${_shunit_c_}'/g' + + unset _shunit_c_ _shunit_s_ +} + +# Escape a character in a string. +# +# Args: +# str: string: to escape characters in +# Returns: +# string: with escaped character(s) +_shunit_escapeCharactersInString() { + command [ -n "$1" ] || return # No point in doing work on an empty string. + + _shunit_str_=$1 + + # Note: using longer variable names to prevent conflicts with + # _shunit_escapeCharInStr(). + for _shunit_char_ in '"' '$' "'" '`'; do + _shunit_str_=`_shunit_escapeCharInStr "${_shunit_char_}" "${_shunit_str_}"` + done + + echo "${_shunit_str_}" + unset _shunit_char_ _shunit_str_ +} + +# Extract list of functions to run tests against. +# +# Args: +# script: string: name of script to extract functions from +# Returns: +# string: of function names +_shunit_extractTestFunctions() { + _shunit_script_=$1 + + # Extract the lines with test function names, strip of anything besides the + # function name, and output everything on a single line. + _shunit_regex_='^\s*((function test[A-Za-z0-9_-]*)|(test[A-Za-z0-9_-]* *\(\)))' + # shellcheck disable=SC2196 + egrep "${_shunit_regex_}" "${_shunit_script_}" \ + |command sed 's/^[^A-Za-z0-9_-]*//;s/^function //;s/\([A-Za-z0-9_-]*\).*/\1/g' \ + |xargs + + unset _shunit_regex_ _shunit_script_ +} + +#------------------------------------------------------------------------------ +# Main. +# + +# Determine the operating mode. +if command [ $# -eq 0 -o "${1:-}" = '--' ]; then + __shunit_script=${__SHUNIT_PARENT} + __shunit_mode=${__SHUNIT_MODE_SOURCED} +else + __shunit_script=$1 + command [ -r "${__shunit_script}" ] || \ + _shunit_fatal "unable to read from ${__shunit_script}" + __shunit_mode=${__SHUNIT_MODE_STANDALONE} +fi + +# Create a temporary storage location. +__shunit_tmpDir=`_shunit_mktempDir` + +# Provide a public temporary directory for unit test scripts. +# TODO(kward): document this. +SHUNIT_TMPDIR="${__shunit_tmpDir}/tmp" +command mkdir "${SHUNIT_TMPDIR}" + +# Setup traps to clean up after ourselves. +trap '_shunit_cleanup EXIT' 0 +trap '_shunit_cleanup INT' 2 +trap '_shunit_cleanup TERM' 15 + +# Create phantom functions to work around issues with Cygwin. +_shunit_mktempFunc +PATH="${__shunit_tmpDir}:${PATH}" + +# Make sure phantom functions are executable. This will bite if `/tmp` (or the +# current `$TMPDIR`) points to a path on a partition that was mounted with the +# 'noexec' option. The noexec command was created with `_shunit_mktempFunc()`. +noexec 2>/dev/null || _shunit_fatal \ + 'Please declare TMPDIR with path on partition with exec permission.' + +# We must manually source the tests in standalone mode. +if command [ "${__shunit_mode}" = "${__SHUNIT_MODE_STANDALONE}" ]; then + # shellcheck disable=SC1090 + command . "`_shunit_prepForSourcing \"${__shunit_script}\"`" +fi + +# Configure default output coloring behavior. +_shunit_configureColor "${SHUNIT_COLOR}" + +# Execute the oneTimeSetUp function (if it exists). +oneTimeSetUp +command [ $? -eq ${SHUNIT_TRUE} ] \ + || _shunit_fatal "oneTimeSetUp() returned non-zero return code." + +# Command line selected tests or suite selected tests +if command [ "$#" -ge 2 ]; then + # Argument $1 is either the filename of tests or '--'; either way, skip it. + shift + # Remaining arguments ($2 .. $#) are assumed to be test function names. + # Interate through all remaining args in "$@" in a POSIX (likely portable) way. + # Helpful tip: https://unix.stackexchange.com/questions/314032/how-to-use-arguments-like-1-2-in-a-for-loop + for _shunit_arg_ do + suite_addTest "${_shunit_arg_}" + done + unset _shunit_arg_ +else + # Execute the suite function defined in the parent test script. + # DEPRECATED as of 2.1.0. + suite +fi + +# If no tests or suite specified, dynamically build a list of functions. +if command [ -z "${__shunit_suite}" ]; then + shunit_funcs_=`_shunit_extractTestFunctions "${__shunit_script}"` + for shunit_func_ in ${shunit_funcs_}; do + suite_addTest "${shunit_func_}" + done +fi +unset shunit_func_ shunit_funcs_ + +# Execute the suite of unit tests. +_shunit_execSuite + +# Execute the oneTimeTearDown function (if it exists). +oneTimeTearDown +command [ $? -eq ${SHUNIT_TRUE} ] \ + || _shunit_fatal "oneTimeTearDown() returned non-zero return code." + +# Generate a report summary. +_shunit_generateReport + +# That's it folks. +command [ "${__shunit_testsFailed}" -eq 0 ] +exit $? From 3f5db809b2bfddf2272b593d88e51761c4bc1f4a Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Jul 2021 12:25:32 +0200 Subject: [PATCH 128/152] "the script will remove the tests folder when executed" --- SETUP_TEMPLATE.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index dbab27b..e78e92b 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -80,6 +80,7 @@ y | Y) rm LICENSE # remove the license rm -r bin/ # remove the bin folder + rm -r tests/ # remove the tests folder writeREADME # write the new README.md writeCHANGELOG # write the basic structure of the CHANGELOG.md echo -e "# add your own funding links" >.github/FUNDING.yml # remove author's custom funding links From 5304d604429c6c090bb0604db54ef8c523d08417 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Jul 2021 13:26:39 +0200 Subject: [PATCH 129/152] "added the main tests_runner script" --- tests/TESTS_RUNNER.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 tests/TESTS_RUNNER.sh diff --git a/tests/TESTS_RUNNER.sh b/tests/TESTS_RUNNER.sh new file mode 100755 index 0000000..a0cb94d --- /dev/null +++ b/tests/TESTS_RUNNER.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# ADD AS MANY LINES AS TESTS FILE YOU HAVE TO RUN THEM ALL + +mkdir -p tests/.tests_trash/ + +echo -e "\n\n--------------------------------\nrunning ./tests/project_scaffolding.sh" +./tests/project_scaffolding.sh + +rm -r tests/.tests_trash From 47a17cadf69c14bb03e2715375fdc0bb6d448066 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Jul 2021 13:26:53 +0200 Subject: [PATCH 130/152] "added some basic tests testing the scaffolding" --- tests/project_scaffolding.sh | 58 ++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100755 tests/project_scaffolding.sh diff --git a/tests/project_scaffolding.sh b/tests/project_scaffolding.sh new file mode 100755 index 0000000..f12f365 --- /dev/null +++ b/tests/project_scaffolding.sh @@ -0,0 +1,58 @@ +#! /bin/bash +# file: examples/arguments_test.sh + +TESTS_TRASH_DIR="tests/.tests_trash" + +cp -r * $TESTS_TRASH_DIR --copy-content 2>/dev/null || : +cp -r .github/ $TESTS_TRASH_DIR --copy-contents +cp -r bin/ $TESTS_TRASH_DIR --copy-contents +rm -r $TESTS_TRASH_DIR/tests/ +rm -r $TESTS_TRASH_DIR/.git/ 2>/dev/null || : + +#cd "tests/.tests_trash" || exit +# TESTS + +suite() { + suite_addTest testDotGithubFolder + suite_addTest testDotGithubISSUE_TEMPLATE + suite_addTest testDotGithubISSUE_TEMPLATEFiles + suite_addTest testDotGithubFiles + +} + +testDotGithubFolder() { + githubFolderFound=0 + if [ -e "$TESTS_TRASH_DIR/.github/" ]; then + githubFolderFound=1 + fi + assertEquals 1 $githubFolderFound + +} + +testDotGithubISSUE_TEMPLATE() { + folderFound=0 + if [ -e "$TESTS_TRASH_DIR/.github/ISSUE_TEMPLATE" ]; then + folderFound=1 + fi + assertEquals 1 $folderFound +} + +testDotGithubISSUE_TEMPLATEFiles() { + filesFound=0 + if [ -e "$TESTS_TRASH_DIR/.github/ISSUE_TEMPLATE/1-bug-report.md" ] && [ -e "$TESTS_TRASH_DIR/.github/ISSUE_TEMPLATE/2-failing-test.md" ] && [ -e "$TESTS_TRASH_DIR/.github/ISSUE_TEMPLATE/3-docs-bug.md" ] && [ -e "$TESTS_TRASH_DIR/.github/ISSUE_TEMPLATE/4-feature-request.md" ] && [ -e "$TESTS_TRASH_DIR/.github/ISSUE_TEMPLATE/5-enhancement-request.md" ] && [ -e "$TESTS_TRASH_DIR/.github/ISSUE_TEMPLATE/6-security-report.md" ] && [ -e "$TESTS_TRASH_DIR/.github/ISSUE_TEMPLATE/7-question-support.md" ] && [ -e "$TESTS_TRASH_DIR/.github/ISSUE_TEMPLATE/config.yml" ]; then + filesFound=1 + fi + assertEquals 1 $filesFound +} + +testDotGithubFiles() { + filesFound=0 + if [ -e "$TESTS_TRASH_DIR/.github/CODEOWNERS" ] && [ -e "$TESTS_TRASH_DIR/.github/CODE_OF_CONDUCT.md" ] && [ -e "$TESTS_TRASH_DIR/.github/CONTRIBUTING.md" ] && [ -e "$TESTS_TRASH_DIR/.github/ISSUE_TEMPLATE.md" ] && [ -e "$TESTS_TRASH_DIR/.github/pull_request_template.md" ] && [ -e "$TESTS_TRASH_DIR/.github/SECURITY.md" ] && [ -e "$TESTS_TRASH_DIR/.github/SUPPORT.md" ] && [ -e "$TESTS_TRASH_DIR/.github/issue_label_bot.yaml" ] && [ -e "$TESTS_TRASH_DIR/.github/config.yml" ] && [ -e "$TESTS_TRASH_DIR/.github/FUNDING.yml" ] && [ -e "$TESTS_TRASH_DIR/.github/settings.yml" ]; then + filesFound=1 + fi + assertEquals 1 $filesFound +} + +# Load and run shUnit2. +#cd "../.." || exit +. tests/shunit2 From 120e82ccd64a4a2a95e763eb05b4e4aefb188396 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Jul 2021 13:27:11 +0200 Subject: [PATCH 131/152] "documented how to run the tests" --- README.md | 10 ++++++++++ tests/arguments_test.sh | 5 ----- 2 files changed, 10 insertions(+), 5 deletions(-) delete mode 100755 tests/arguments_test.sh diff --git a/README.md b/README.md index dc975e7..6cd70c9 100644 --- a/README.md +++ b/README.md @@ -208,6 +208,16 @@ and the read and understanding of the [keep a changelog guide](https://keepachan Read and comment about it in this [dev.to post](https://dev.to/josee9988/the-ultimate-github-project-template-1264). We also recommend installing all the [used bots](https://github.com/Josee9988/project-template#-used-github-bots). +## πŸ’‰ **Project tests** + +If you want to improve the development of this project, you must, after changing or improving whatever run the project's tests to prove that they are working. + +To do so: + +```bash +bash tests/TESTS_RUNNER.sh +``` + --- ## 🍰 **Supporters and donators** diff --git a/tests/arguments_test.sh b/tests/arguments_test.sh deleted file mode 100755 index c0ba65f..0000000 --- a/tests/arguments_test.sh +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh -# file: examples/arguments_test.sh - -# Load and run shUnit2. -. tests/shunit2 From 46a83d9d5e7c78bcff1b37b08c56de66d96449ad Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Jul 2021 13:29:14 +0200 Subject: [PATCH 132/152] =?UTF-8?q?Set=20up=20'@Josee9988/project-template?= =?UTF-8?q?'=20template:=20Personalized=20files=20by=20executing=20the=20S?= =?UTF-8?q?ETUP=5FTEMPLATE.sh=20script.=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/CODEOWNERS | 6 +- .github/CODE_OF_CONDUCT.md | 2 +- .github/FUNDING.yml | 3 +- .github/ISSUE_TEMPLATE/1-bug-report.md | 2 +- .github/ISSUE_TEMPLATE/2-failing-test.md | 2 +- .github/ISSUE_TEMPLATE/3-docs-bug.md | 2 +- .github/ISSUE_TEMPLATE/4-feature-request.md | 2 +- .../ISSUE_TEMPLATE/5-enhancement-request.md | 2 +- .github/ISSUE_TEMPLATE/6-security-report.md | 4 +- .github/ISSUE_TEMPLATE/7-question-support.md | 2 +- .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/SECURITY.md | 2 +- .github/config.yml | 2 +- .gitignore | 4 +- CHANGELOG.md | 244 +----------------- LICENSE | 21 -- README.md | 237 +++-------------- bin/FUNCTION_HELPERS.sh | 191 -------------- 18 files changed, 64 insertions(+), 666 deletions(-) delete mode 100644 LICENSE delete mode 100644 bin/FUNCTION_HELPERS.sh diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4cb66d4..4534ddd 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,6 +1,6 @@ # These owners will be the default owners for everything in # the repo. Unless a later match takes precedence, -# @Josee9988 will be requested for +# @FAKE_TEST_USERNAME will be requested for # review when someone opens a pull request. -# if you want to add more owners just write it after @Josee9988 -* @Josee9988 +# if you want to add more owners just write it after @FAKE_TEST_USERNAME +* @FAKE_TEST_USERNAME diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index b60dfc1..f1d964a 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -55,7 +55,7 @@ further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing or otherwise unacceptable behaviour may be -reported by contacting the project team at jgracia9988@gmail.com. All +reported by contacting the project team at FAKE_TEST_EMAIL. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality concerning the reporter of an incident. diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index a2d624f..c942e4e 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1 @@ -github: Josee9988 -custom: ['https://www.paypal.me/josee9988'] +# add your own funding links diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md index 1376422..a6e11cc 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.md +++ b/.github/ISSUE_TEMPLATE/1-bug-report.md @@ -3,7 +3,7 @@ name: "🐞 Bug Report" about: "Report an issue to help the project improve." title: "[Bug] " labels: "Type: Bug" -assignees: Josee9988 +assignees: FAKE_TEST_USERNAME --- diff --git a/.github/ISSUE_TEMPLATE/2-failing-test.md b/.github/ISSUE_TEMPLATE/2-failing-test.md index a239f2a..9b1cee9 100644 --- a/.github/ISSUE_TEMPLATE/2-failing-test.md +++ b/.github/ISSUE_TEMPLATE/2-failing-test.md @@ -3,7 +3,7 @@ name: "πŸ’‰ Failing Test" about: "Report failing tests or CI jobs." title: "[Test] " labels: "Type: Test" -assignees: Josee9988 +assignees: FAKE_TEST_USERNAME --- diff --git a/.github/ISSUE_TEMPLATE/3-docs-bug.md b/.github/ISSUE_TEMPLATE/3-docs-bug.md index f987493..855d1d4 100644 --- a/.github/ISSUE_TEMPLATE/3-docs-bug.md +++ b/.github/ISSUE_TEMPLATE/3-docs-bug.md @@ -3,7 +3,7 @@ name: "πŸ“š Documentation or README.md issue report" about: "Report an issue in the project's documentation or README.md file." title: "" labels: "Documentation" -assignees: Josee9988 +assignees: FAKE_TEST_USERNAME --- # **πŸ“š Documentation Issue Report** diff --git a/.github/ISSUE_TEMPLATE/4-feature-request.md b/.github/ISSUE_TEMPLATE/4-feature-request.md index 33ecf94..9550f60 100644 --- a/.github/ISSUE_TEMPLATE/4-feature-request.md +++ b/.github/ISSUE_TEMPLATE/4-feature-request.md @@ -3,7 +3,7 @@ name: "πŸš€πŸ†• Feature Request" about: "Suggest an idea or possible new feature for this project." title: "" labels: "Type: Feature" -assignees: Josee9988 +assignees: FAKE_TEST_USERNAME --- diff --git a/.github/ISSUE_TEMPLATE/5-enhancement-request.md b/.github/ISSUE_TEMPLATE/5-enhancement-request.md index 2b29bd5..6e0c123 100644 --- a/.github/ISSUE_TEMPLATE/5-enhancement-request.md +++ b/.github/ISSUE_TEMPLATE/5-enhancement-request.md @@ -3,7 +3,7 @@ name: "πŸš€βž• Enhancement Request" about: "Suggest an enhancement for this project. Improve an existing feature" title: "" labels: "Type: Enhancement" -assignees: Josee9988 +assignees: FAKE_TEST_USERNAME --- diff --git a/.github/ISSUE_TEMPLATE/6-security-report.md b/.github/ISSUE_TEMPLATE/6-security-report.md index 81f6fef..3306b9d 100644 --- a/.github/ISSUE_TEMPLATE/6-security-report.md +++ b/.github/ISSUE_TEMPLATE/6-security-report.md @@ -3,7 +3,7 @@ name: "⚠️ Security Report" about: "Report an issue to help the project improve." title: "" labels: "Type: Security" -assignees: Josee9988 +assignees: FAKE_TEST_USERNAME --- @@ -25,7 +25,7 @@ certain personal information or involves personal identifiable data, or you beli that the data that you might leak by exposing the way on how to attack the project could be considered as a data leak or could violate the privacy of any kind of data or sensible data, please do not post it here and directly email the developer: -(jgracia9988@gmail.com). You should post the issue with the least amount of +(FAKE_TEST_EMAIL). You should post the issue with the least amount of sensible or private data as possible to help us manage the security issue, and with the extra data sent from your email to the developer (if any), we will deeply analyze and try to fix it as fast as possible. diff --git a/.github/ISSUE_TEMPLATE/7-question-support.md b/.github/ISSUE_TEMPLATE/7-question-support.md index ec98c81..2b10fb5 100644 --- a/.github/ISSUE_TEMPLATE/7-question-support.md +++ b/.github/ISSUE_TEMPLATE/7-question-support.md @@ -3,7 +3,7 @@ name: "❓ Question or Support Request" about: "Questions and requests for support." title: "" labels: "Type: Question" -assignees: Josee9988 +assignees: FAKE_TEST_USERNAME --- diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index a053b0d..af993b3 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: true contact_links: - name: Send an e-mail the developer - url: mailto:jgracia9988@gmail.com + url: mailto:FAKE_TEST_EMAIL about: Please do NOT use this email to post issues or feature requests (only important business/personal contact). diff --git a/.github/SECURITY.md b/.github/SECURITY.md index 30a193d..a8d01ff 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -8,6 +8,6 @@ To report a security issue, go to the project's issues and create a new issue us Read carefully the instructions of this issue template, and if your report could leak data or might expose how to gain access to a restricted area or break the system, -please email [jgracia9988@gmail.com](mailto:jgracia9988@gmail.com) and include the word "SECURITY" in the subject line. +please email [FAKE_TEST_EMAIL](mailto:FAKE_TEST_EMAIL) and include the word "SECURITY" in the subject line. We'll endeavour to respond quickly, and will keep you updated throughout the process. diff --git a/.github/config.yml b/.github/config.yml index 1e537f7..91e895a 100644 --- a/.github/config.yml +++ b/.github/config.yml @@ -2,7 +2,7 @@ # Comment to be posted to on first time issues newIssueWelcomeComment: > - Thanks for opening your first issue in Josee9988/project-template! Be sure to follow the issue template and provide every bit of information to help the developers! + Thanks for opening your first issue in FAKE_TEST_USERNAME/project-template! Be sure to follow the issue template and provide every bit of information to help the developers! # Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome diff --git a/.gitignore b/.gitignore index 49c69d3..f89f074 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -###> Josee9988/project-template ### +###> FAKE_TEST_USERNAME/FAKE_TEST_PROJECT_NAME ### # Folders .vscode/ @@ -13,4 +13,4 @@ ignore.* .env.test *.pem -###< Josee9988/project-template ### +###< FAKE_TEST_USERNAME/FAKE_TEST_PROJECT_NAME ### diff --git a/CHANGELOG.md b/CHANGELOG.md index 03f1f20..ae8df3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,252 +1,14 @@ # **Change Log** πŸ“œπŸ“ -All notable changes to the "**Project template**" repository will be documented in this file. +All notable changes to the "**FAKE_TEST_PROJECT_NAME**" DICK will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). --- -## [**1.7.2**] - 2021-07-08 +## [**0.0.1**] - 2021-07-08 ### Added -* Multiple new .gitignore lines and improved its comment structure. - -### Fixed - -* Minnor typo in the generated README.md - -## [**1.7.1**] - 2021-07-01 - -### Added - -* `.env` file will be ignored in the `.gitignore`. -* Disabled some markdownlint rules in the generated README.md -* Fixed some minnor errors in the README.md file - -## [**1.7.0**] - 2021-06-01 - -### Added - -* Type: Test issue label. -* Failing test issue template adds the new Type Test issue label. -* Updated README.md with the new label. - -## [**1.6.0**] - 2021-05-21 - -### Added - -* Divided the feature request into feature and enhancement request, each one with its respective labels. - -### Changed - -* Position of disclaimers and comments in the issue templates are moved to the bottom (but the security report) as some users directly erased everything to not read the text. -* Image of the issue templates in the readme.md file. - -## [**1.5.0**] - 2021-05-15 - -### Added - -* Auto-detection of user email. - -## [**1.4.5**] - 2021-04-24 - -### Added - -* Sponsor section in the project's main readme.md file. -* Improved and added documentation in the scripts. - -### Fixed - -* Readme "What does it include" fixed list of files. -* Sponsor link in the generated README.md file. -* Some typos - -## [**1.4.4**] - 2021-04-22 - -### Added - -* --help option in the script. -* More documentation and information for the user in the script prompts - -## [**1.4.3**] - 2021-04-21 - -### Added - -* Support for Github todo app. - -## [**1.4.2**] - 2021-04-20 - -### Added - -* An extra informational message in the script. -* Welcome bot and its config (.github/config.yml) - -### Fixed - -* Issue templates now auto assigns the new labels. - -## [**1.4.1**] - 2021-04-20 - -### Added - -* Security label - -### Changed - -* Project tree to its updated version. - -## [**1.4.0**] - 2021-04-19 - -### Added - -* Readme file with the section with the recommended/used bots that the users should install. -* Some informational comments in the script referencing the project's documentation. -* A total of 18 new labels will be created right when you clone your repo using Github Probot settings. - -## [**1.3.0**] - 2021-04-14 - -### Added - -* CODEOWNERS file inside the .github folder. - -### Fixed - -* Some README.md markdownlint bugs. - -## [**1.2.0**] - 2021-04-07 - -### Added - -* Bug report issue templates have the preceding "[BUG]" title. -* Multiple readme template headings (About the project, project tree, screenshots, donators). -* Improved README.md template by fixing some minor problems. - -## [**1.1.1**] - 2021-04-02 - -### Added - -* Username and project name are automatically selected (user can manually force change them using bash parameters [Username] [Project-Name]) - -### Changed - -* Asciinema video - -## [**1.1.0**] - 2021-03-31 - -### Added - -* Gitignore file ignores all \*.ignore.\* files. -* Basic README.md template. -* bin/FUNCTION_HELPERS script to improve the readability of the SETUP_TEMPLATE.sh file. - -### Changed - -* Header's emoji from the end of the README.md headers to the beginning to be shown better by the new GitHub's README table of contents. - -### Fixed - -* Git status is shown before the commit. - -### Fixed - -* Some typos in the CHANGELOG.md. - -## [**1.0.11**] - 2021-03-20 - -### Added - -* Social links of the repo in the README.md file. -* Added badges in the README.md file. -* Added sponsor link in the contributing.yml file. - -### Fixed - -* Some minor typos in the README.md file. - -## [**1.0.10**] - 2021-03-17 - -### Changed - -* `EXECUTEME.sh` script changed to `SETUP_TEMPLATE.sh`. -* Changed the execution video from the README.md file (Asciinema's video). - -## [**1.0.9**] - 2021-03-17 - -### Added - -* The script will git add and commit the new files/changes for you. - -## [**1.0.8**] - 2021-03-17 - -### Changed - -* Improved README.md structure and fixed some typos. - -### Added - -* 'Extra recommendations' section in the README.md file. - -## [**1.0.7**] - 2021-03-16 - -### Fixed - -* Some minor typos - -## [**1.0.6**] - 2021-03-16 - -### Changed - -* Simplified PR template to make it easier. - -## [**1.0.5**] - 2021-03-13 - -### Added - -* Checks to the shell script (check if the files exist) -* Colourized the output of the script. - -## [**1.0.4**] - 2021-02-26 - -### Added - -* Markdownlint disable the rule in the CHANGELOG.md file" - -## [**1.0.3**] - 2021-02-23 - -### Removed - -* Josee's funding links. - -### Added - -* Shell script now checks if the .github directory exists. - -## [**1.0.2**] - 2020-09-08 - -### Added - -* One more screenshot to the README.md file showing the community profile. -* Documentation for the SETUP_TEMPLATE.sh script. - -### Changed - -* The project tree view showing the new LICENSE file. - -## [**1.0.1**] - 2020-09-08 - -### Added - -* A LICENSE for the project will be removed with the SETUP_TEMPLATE.sh script. - -### Changed - -* The location of the pull request template to the .github/ folder. - -## [**1.0.0**] - 2020-09-08 - -### Added - -* Added a CHANGELOG.md. -* Support for the CHANGELOG in the SETUP_TEMPLATE.sh file (when run, it will remove all of the content and create a new file from scratch). +* The basic project structure from **[josee9988/project-template](https://github.com/Josee9988/project-template)**. diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 97d7d26..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Jose Gracia Berenguer - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md index 6cd70c9..642a694 100644 --- a/README.md +++ b/README.md @@ -1,248 +1,97 @@ -# πŸ”₯ **Josee9988's Github Project Template** + +# πŸ”₯ **FAKE_TEST_USERNAME/FAKE_TEST_PROJECT_NAME** -

- Logo -
-
- Issues +

--- -## πŸ€” **What is this template all about?** +## πŸ€” **About the project** -* This template can be used as a base layer for any of your future repositories/projects. -* Make your project easy to maintain with **8 issue templates**. -* Quickstart your documentation with personalized **readme badges** and a cool readme structure. -* Manage your issues with **20 issue labels** created just for you! -* Make your _community healthier_ with all the guides like code of conduct, contributing, support, security... -* Learn more with the [official Github guide on creating repositories from a template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). -* To start using it; "**[click use this template](https://github.com/Josee9988/project-template/generate)**", create your new repository, -* All the basic setup is made through an easy script that will auto-detect all your data to make it lightning fast! πŸ—²πŸ—² clone your new repository and execute the `SETUP_TEMPLATE.sh` shell script to personalize the files with your private details. Check how to execute it [here](https://asciinema.org/a/398761). -* All the markdown follows [MarkdownLint rules](https://github.com/DavidAnson/markdownlint). +* --- ## ⚑ **Installation** -1. To create a new repository from this template **[generate your new repository from this template](https://github.com/Josee9988/project-template/generate)** -for more information or guidance, follow the [Github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). -2. Clone your new repository **[generated from this template](https://github.com/Josee9988/project-template/generate)** and `cd` into it. -3. **Execute** the `SETUP_TEMPLATE.sh` shell script to **customize** the files with your data. - - ```bash - bash SETUP_TEMPLATE.sh # additional parameters [Username] [Project-Name] [Email] - ``` - - Or you can also do it like this: - - ```bash - chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE.sh # additional parameters [Username] [Project-Name] [Email] - ``` +* - Additionally, watch *[this video](https://asciinema.org/a/404568)* to see **how to execute the script** or use *`bash SETUP_TEMPLATE.sh --help`* to obtain some extra information. - - If the automatic detection of the username, project name or email is NOT right, please post an issue, and you can **manually correct** them like: `bash SETUP_TEMPLATE.sh RightUsername RightProjectName RightEmail` being `$1` the new username, `$2` the new project name and `$3` the new email. +--- -4. **Review** every single file and **customize** it as you like. -5. Build your project. πŸš€ +## πŸš€ **Usage** -⚠️ _Customize every file to fit your requirements_ ⚠️ +* --- -## πŸ“š **What does it include?** - -1. A **`SETUP_TEMPLATE.sh`** script that **MUST be executed right when you clone your repository**. -The script will replace Jose's username and email (the author) with yours from all the. - - 1. A README template file with a default template to start documenting your project. (it includes personalized badges and text with your project details) - 1. A CHANGELOG template file based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - 1. An [issue_label_bot.yaml](/.github/issue_label_bot.yaml) file to use the issue adder Github bot. [Activate it or check its documentation](https://github.com/marketplace/issue-label-bot). - 1. A [config.yml](/.github/config.yml) file to modify multiple bot's behaviours. - 1. A [settings.yml](/.github/settings.yml) file to use the popular settings Github bot. [Activate it or check its documentation](https://probot.github.io/apps/settings/). - 1. A [CONTRIBUTING](/.github/CONTRIBUTING.md) explaining how to contribute to the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/setting-guidelines-for-repository-contributors). - 1. A [SUPPORT](/.github/SUPPORT.md) explaining how to support the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-support-resources-to-your-project). - 1. A [SECURITY](/.github/SECURITY.md) with a guide on how to post a security issue. [Learn more with the Github guide](https://docs.github.com/es/github/managing-security-vulnerabilities/adding-a-security-policy-to-your-repository). - 1. A [CODEOWNERS](/.github/CODEOWNERS) with the new user as the main owner. [Learn more with the Github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners). - 1. A [CODE_OF_CONDUCT](/.github/CODE_OF_CONDUCT.md) with a basic code of conduct. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-a-code-of-conduct-to-your-project). - 1. A [PULL_REQUEST_TEMPLATE](/.github/pull_request_template.md) with a template for your pull request that closes issues with keywords. [Learn more with the Github guide](https://docs.github.com/es/github/building-a-strong-community/creating-a-pull-request-template-for-your-repository). - 1. Multiple [issues templates](/.github/ISSUE_TEMPLATE). [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository). - 1. A [config.yml](/.github/ISSUE_TEMPLATE/config.yml) with the config and information about the issue templates. - 1. A [Blank issue template](/.github/ISSUE_TEMPLATE) with the super basic stuff, all the issues should contain. - 1. A [Bug issue template](/.github/ISSUE_TEMPLATE/1-bug-report.md). - 1. A [Failing test issue template](/.github/ISSUE_TEMPLATE/2-failing-test.md). - 1. A [Documentation issue template](/.github/ISSUE_TEMPLATE/3-docs-bug.md). - 1. A [Feature request issue template](/.github/ISSUE_TEMPLATE/4-feature-request.md). - 1. A [Security report issue template](/.github/ISSUE_TEMPLATE/5-security-report.md). - 1. A [Question or support issue template](/.github/ISSUE_TEMPLATE/6-question-support.md). +## 🌲 **Project tree** ---- - -### 🌲 **Project tree** - -Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not shown! πŸ™ˆ - -```text -. -β”œβ”€β”€ CHANGELOG.md -β”œβ”€β”€ .github -β”‚Β Β  β”œβ”€β”€ CODE_OF_CONDUCT.md -β”‚Β Β  β”œβ”€β”€ CODEOWNERS -β”‚Β Β  β”œβ”€β”€ CONTRIBUTING.md -β”‚Β Β  β”œβ”€β”€ FUNDING.yml -β”‚Β Β  β”œβ”€β”€ issue_label_bot.yaml -β”‚Β Β  β”œβ”€β”€ config.yml -β”‚Β Β  β”œβ”€β”€ ISSUE_TEMPLATE -β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 1-bug-report.md -β”‚ β”‚ β”œβ”€β”€ 2-failing-test.md -β”‚ β”‚ β”œβ”€β”€ 3-docs-bug.md -β”‚ β”‚ β”œβ”€β”€ 4-feature-request.md -β”‚ β”‚ β”œβ”€β”€ 5-enhancement-request.md -β”‚ β”‚ β”œβ”€β”€ 6-security-report.md -β”‚ β”‚ β”œβ”€β”€ 7-question-support.md -β”‚ β”‚ └── config.yml -β”‚Β Β  β”œβ”€β”€ ISSUE_TEMPLATE.md -β”‚Β Β  β”œβ”€β”€ pull_request_template.md -β”‚Β Β  β”œβ”€β”€ SECURITY.md -β”‚Β Β  β”œβ”€β”€ settings.yml -β”‚Β Β  └── SUPPORT.md -β”œβ”€β”€ .gitignore -└── README.md - -2 directories, 21 files -``` + --- ## πŸ“ **Additional notes** -* After **[generating your new repo with this template](https://github.com/Josee9988/project-template/generate)**, make sure to, right after you clone it, run the script `SETUP_TEMPLATE.sh`. - -* Then you will be presented with all the files modified with your project details and information. It is very important to **manually review every file** to check if it fits your requirements and performs any necessary changes to customize the project as you want. - -* If you are using **Windows** and you don't know how to execute the `SETUP_TEMPLATE.sh` script: - 1. Install **[git for Windows](https://git-scm.com/download/win)**. - 2. Right-click on the git repository folder and click "*git bash here*". - 3. Then just perform *`bash SETUP_TEMPLATE.sh`* **or** *`chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE.sh`*. - -### πŸ€– **Used Github bots** - -These are recommended bots that are prepared and configured for this template. If you install them your coding experience will probably be much better. -We deeply recommend at least installing the [issue label bot](https://github.com/marketplace/issue-label-bot) as this bot is the one that adds all the labels used in the issue templates. - -1. The `issue_label_bot.yaml` file depends on the **[issue label bot](https://github.com/marketplace/issue-label-bot)**. -2. The `settings.yml` file depends on the **[settings label bot](https://probot.github.io/apps/settings/)**. -3. The `config.yml` file depends on the bot **[welcome bot](https://probot.github.io/apps/welcome/)** and **[todo bot](https://probot.github.io/apps/todo/)** +* --- ## πŸ“Έ **Screenshots** -A couple of screenshots to delight you before you use this template. - -### πŸ”Ί All the issue templates - -

- All the issue templates. -

- -### πŸ”» An issue template opened - -

- Bug issue template opened. -

- -### πŸ“˜ The README template - -Badges and texts will be replaced with your project details! - -

- README.md template. - - Or watch [this video](https://gifs.com/gif/josee9988-s-readme-md-MwO5E3) to see the whole README template. -

+ -### πŸ”– The labels for your issues - -If the bot [probot-settings](https://probot.github.io/apps/settings/) is not installed you will not have these beautiful labels! (there are actually 1 more issue label than in the screenshot!) - -

- LABELS -

- -### πŸ“ The CHANGELOG template - -(project name and project type will be replaced with yours) +--- -

- CHANGELOG.md template. -

+## 🍰 **Supporters and donators** -### πŸ›‘οΈ Security policy +We are currently looking for new donators to help and maintain this project! ❀️ -

- Security issue. -

+By donating, you will help the development of this project, and *you will be featured in this FAKE_TEST_PROJECT_NAME's README.md* so everyone can see your kindness and visit your content ⭐. -### πŸ’Ό Community profile at 100% + + + -

- Community profile. -

+ --- -## πŸ•΅οΈ **Extra recommendations** - -For the right maintenance of the CHANGELOG.md, we recommend this [VSCode extension](https://github.com/Josee9988/Changelog-and-Markdown-snippets) -and the read and understanding of the [keep a changelog guide](https://keepachangelog.com/en/1.0.0/). -Read and comment about it in this [dev.to post](https://dev.to/josee9988/the-ultimate-github-project-template-1264). -We also recommend installing all the [used bots](https://github.com/Josee9988/project-template#-used-github-bots). +FAKE_TEST_PROJECT_NAME was generated from *[Josee9988/project-template](https://github.com/Josee9988/project-template)* πŸ“š -## πŸ’‰ **Project tests** - -If you want to improve the development of this project, you must, after changing or improving whatever run the project's tests to prove that they are working. +--- -To do so: +## πŸ•΅οΈ Extra recommendations -```bash -bash tests/TESTS_RUNNER.sh -``` +* --- -## 🍰 **Supporters and donators** - -We are currently looking for new donators to help and maintain this project! ❀️ +## πŸŽ‰ Was the DICK helpful? Help us raise these numbers up -By donating, you will help the development of this project, and *you will be featured in this project's README.md* so everyone can see your kindness and visit your content ⭐. +[![Github followers](https://img.shields.io/github/followers/FAKE_TEST_USERNAME.svg?style=social)](https://github.com/FAKE_TEST_USERNAME) +[![Github stars](https://img.shields.io/github/stars/FAKE_TEST_USERNAME/FAKE_TEST_PROJECT_NAME.svg?style=social)](https://github.com/FAKE_TEST_USERNAME/FAKE_TEST_PROJECT_NAME/stargazers) +[![Github watchers](https://img.shields.io/github/watchers/FAKE_TEST_USERNAME/FAKE_TEST_PROJECT_NAME.svg?style=social)](https://github.com/FAKE_TEST_USERNAME/FAKE_TEST_PROJECT_NAME/watchers) +[![Github forks](https://img.shields.io/github/forks/FAKE_TEST_USERNAME/FAKE_TEST_PROJECT_NAME.svg?style=social)](https://github.com/FAKE_TEST_USERNAME/FAKE_TEST_PROJECT_NAME/network/members) + +[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=github-sponsors&color=red&style=social)](https://github.com/sponsors/FAKE_TEST_USERNAME) - - - +Enjoy! πŸ˜ƒ --- -## πŸŽ‰ Was the template helpful? Help us raise these numbers up +## βš–οΈπŸ“ **License and Changelog** -[![Github followers](https://img.shields.io/github/followers/Josee9988.svg?style=social)](https://github.com/Josee9988) -[![Github stars](https://img.shields.io/github/stars/Josee9988/project-template.svg?style=social)](https://github.com/Josee9988/project-template/stargazers) -[![Github watchers](https://img.shields.io/github/watchers/Josee9988/project-template.svg?style=social)](https://github.com/Josee9988/project-template/watchers) -[![Github forks](https://img.shields.io/github/forks/Josee9988/project-template.svg?style=social)](https://github.com/Josee9988/project-template/network/members) +See the license in the '**[LICENSE](LICENSE)**' file. -Enjoy! πŸ˜ƒ +Watch the changes in the '**[CHANGELOG.md](CHANGELOG.md)**' file. -> ⚠️Remember that this template should be reviewed and modified to fit your requirements. -> The script **SETUP_TEMPLATE.sh** should be executed right when you clone your new repository. -> There will be files that will need *manual revision*⚠️ +--- -_Made with a lot of ❀️❀️ by **[@Josee9988](https://github.com/Josee9988)**_ +_Made with a lot of ❀️❀️ by **[@FAKE_TEST_USERNAME](https://github.com/FAKE_TEST_USERNAME)**_ diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh deleted file mode 100644 index 368005c..0000000 --- a/bin/FUNCTION_HELPERS.sh +++ /dev/null @@ -1,191 +0,0 @@ -#!/bin/bash - -#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# -# PURPOSE: Secondary (helper) script that is called by the main SETUP_TEMPLATE.sh file by -# obtaining some functions to better modularize the code. -# TITLE: FUNCTION_HELPERS -# AUTHOR: Jose Gracia -# VERSION: See in CHANGELOG.md -# NOTES: This script will auto remove itself, and in case of wanting to run it again, the user must download -# it again or do a 'git stash' and revert the changes. -# BASH_VERSION: 5.0.17(1)-release -# LICENSE: see in ../LICENSE (project root) or https://github.com/Josee9988/project-template/blob/master/LICENSE -# GITHUB: https://github.com/Josee9988/ -# REPOSITORY: https://github.com/Josee9988/project-template -# ISSUES: https://github.com/Josee9988/project-template/issues -# MAIL: jgracia9988@gmail.com -#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# - -# SCRIPT WITH EXPORTED FUNCTIONS AND VARIABLES USED IN THE MAIN SETUP_TEMPLATE -RED='\033[1;31m' -NC='\033[0m' # No Color -UPurple='\033[4;35m' -BBLUE='\033[1;34m' - -# Function that centers a text in the terminal -center() { - term_width="$(tput cols)" - padding="$(printf '%0.1s' ={1..500})" - echo -e "\n\n${BBLUE}$(printf '%*.*s %s %*.*s\n' 0 "$(((term_width - 2 - ${#1}) / 2))" "$padding" "$1" 0 "$(((term_width - 1 - ${#1}) / 2))" "$padding")${NC}\n" -} - -checkFiles() { - ### Check if the .github directory does exist ### - if [ ! -d ".github/" ] || [ ! -d ".github/ISSUE_TEMPLATE" ]; then - echo -e "${RED}Directory .github/ DOES NOT EXIST WITH ALL THE FILES NEEDED.${NC}" - displayErrorInstructions - exit 1 # exit with error code 1 - fi - - ### Checks if the root files exist and some extra important files ### - if [ ! -f "CHANGELOG.md" ] || [ ! -f "README.md" ] || [ ! -f ".gitignore" ] || [ ! -f "LICENSE" ] || [ ! -f ".github/settings.yml" ] || [ ! -f ".github/pull_request_template.md" ] || [ ! -f ".github/ISSUE_TEMPLATE/1-bug-report.md" ] || [ ! -f ".github/ISSUE_TEMPLATE/config.yml" ]; then - echo -e "${RED}The script couldn't find one or many of the template main files${NC}." - displayErrorInstructions - exit 1 # exit with error code 1 - fi -} - -displayErrorInstructions() { - echo -e "${RED}There are files missing! Have you modified the repository before executing this command?${NC}" - echo -e "\nYou should try to 'git stash' your changes and execute this script from the project root again, or clone again the repository (the template) without any changes.\n" - echo -e "For more information visit: ${UPurple}https://github.com/Josee9988/project-template${NC}" - echo -e "If you think this may be an issue please post it at: ${UPurple}https://github.com/Josee9988/project-template/issues${NC}" -} - -helpCommand() { - if [[ "$1" == *"--help" ]] || [[ "$1" == *"-h" ]]; then # if the user specified help command - displayHelpTexts - exit 0 - fi -} - -displayHelpTexts() { - center "User help" - echo -e "Script usage: ${BBLUE}$0 [Username] [Project-Name] [Email]${NC} (The project name should not contain spaces)${NC}\n" - echo "Arguments of username, project-name and email are automatically gathered from your git repository and git config, so they are optional in case they are not detected correctly." - echo -e "Make sure you have ${BBLUE}read the documentation before executing${NC} this script: ${UPurple}https://github.com/Josee9988/project-template${NC}" - echo -e "If you have any questions or if any issue is found, please make sure to report it at: ${UPurple}https://github.com/Josee9988/project-template/issues${NC}" -} - -writeREADME() { - PROJECT_NAME_PARSED=${PROJECT_NAME/-/ } - bash -c "NEW_USERNAME='NEW_USERNAME' PROJECT_NAME='PROJECT_NAME' PROJECT_TYPE='PROJECT_TYPE'; cat << EOF > README.md - - -# πŸ”₯ **$NEW_USERNAME/$PROJECT_NAME** - - - ---- - -## πŸ€” **About the project** - -* - ---- - -## ⚑ **Installation** - -* - ---- - -## πŸš€ **Usage** - -* - ---- - -## 🌲 **Project tree** - - - ---- - -## πŸ“ **Additional notes** - -* - ---- - -## πŸ“Έ **Screenshots** - - - ---- - -## 🍰 **Supporters and donators** - -We are currently looking for new donators to help and maintain this project! ❀️ - -By donating, you will help the development of this project, and *you will be featured in this $PROJECT_NAME's README.md* so everyone can see your kindness and visit your content ⭐. - - - - - - - ---- - -$PROJECT_NAME was generated from *[Josee9988/project-template](https://github.com/Josee9988/project-template)* πŸ“š - ---- - -## πŸ•΅οΈ Extra recommendations - -* - ---- - -## πŸŽ‰ Was the $PROJECT_TYPE helpful? Help us raise these numbers up - -[![Github followers](https://img.shields.io/github/followers/$NEW_USERNAME.svg?style=social)](https://github.com/$NEW_USERNAME) -[![Github stars](https://img.shields.io/github/stars/$NEW_USERNAME/$PROJECT_NAME.svg?style=social)](https://github.com/$NEW_USERNAME/$PROJECT_NAME/stargazers) -[![Github watchers](https://img.shields.io/github/watchers/$NEW_USERNAME/$PROJECT_NAME.svg?style=social)](https://github.com/$NEW_USERNAME/$PROJECT_NAME/watchers) -[![Github forks](https://img.shields.io/github/forks/$NEW_USERNAME/$PROJECT_NAME.svg?style=social)](https://github.com/$NEW_USERNAME/$PROJECT_NAME/network/members) - -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=github-sponsors&color=red&style=social)](https://github.com/sponsors/$NEW_USERNAME) - -Enjoy! πŸ˜ƒ - ---- - -## βš–οΈπŸ“ **License and Changelog** - -See the license in the '**[LICENSE](LICENSE)**' file. - -Watch the changes in the '**[CHANGELOG.md](CHANGELOG.md)**' file. - ---- - -_Made with a lot of ❀️❀️ by **[@$NEW_USERNAME](https://github.com/$NEW_USERNAME)**_ -EOF" -} - -writeCHANGELOG() { - ACTUAL_DATE=$(date '+%Y-%m-%d') - bash -c "PROJECT_NAME='PROJECT_NAME' PROJECT_TYPE='PROJECT_TYPE' ACTUAL_DATE='ACTUAL_DATE'; cat << EOF > CHANGELOG.md - -# **Change Log** πŸ“œπŸ“ - -All notable changes to the \"**$PROJECT_NAME**\" $PROJECT_TYPE will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - ---- - -## [**0.0.1**] - $ACTUAL_DATE - -### Added - -* The basic project structure from **[josee9988/project-template](https://github.com/Josee9988/project-template)**. -EOF" -} From f358d39bdb07dec746524db7452a8288a23bfe3a Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Jul 2021 13:32:32 +0200 Subject: [PATCH 133/152] =?UTF-8?q?Revert=20"Set=20up=20'@Josee9988/projec?= =?UTF-8?q?t-template'=20template:=20Personalized=20files=20by=20executing?= =?UTF-8?q?=20the=20SETUP=5FTEMPLATE.sh=20script.=F0=9F=9A=80"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 46a83d9d5e7c78bcff1b37b08c56de66d96449ad. --- .github/CODEOWNERS | 6 +- .github/CODE_OF_CONDUCT.md | 2 +- .github/FUNDING.yml | 3 +- .github/ISSUE_TEMPLATE/1-bug-report.md | 2 +- .github/ISSUE_TEMPLATE/2-failing-test.md | 2 +- .github/ISSUE_TEMPLATE/3-docs-bug.md | 2 +- .github/ISSUE_TEMPLATE/4-feature-request.md | 2 +- .../ISSUE_TEMPLATE/5-enhancement-request.md | 2 +- .github/ISSUE_TEMPLATE/6-security-report.md | 4 +- .github/ISSUE_TEMPLATE/7-question-support.md | 2 +- .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/SECURITY.md | 2 +- .github/config.yml | 2 +- .gitignore | 4 +- CHANGELOG.md | 244 +++++++++++++++++- LICENSE | 21 ++ README.md | 237 ++++++++++++++--- bin/FUNCTION_HELPERS.sh | 191 ++++++++++++++ 18 files changed, 666 insertions(+), 64 deletions(-) create mode 100644 LICENSE create mode 100644 bin/FUNCTION_HELPERS.sh diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4534ddd..4cb66d4 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,6 +1,6 @@ # These owners will be the default owners for everything in # the repo. Unless a later match takes precedence, -# @FAKE_TEST_USERNAME will be requested for +# @Josee9988 will be requested for # review when someone opens a pull request. -# if you want to add more owners just write it after @FAKE_TEST_USERNAME -* @FAKE_TEST_USERNAME +# if you want to add more owners just write it after @Josee9988 +* @Josee9988 diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index f1d964a..b60dfc1 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -55,7 +55,7 @@ further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing or otherwise unacceptable behaviour may be -reported by contacting the project team at FAKE_TEST_EMAIL. All +reported by contacting the project team at jgracia9988@gmail.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality concerning the reporter of an incident. diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index c942e4e..a2d624f 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1,2 @@ -# add your own funding links +github: Josee9988 +custom: ['https://www.paypal.me/josee9988'] diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md index a6e11cc..1376422 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.md +++ b/.github/ISSUE_TEMPLATE/1-bug-report.md @@ -3,7 +3,7 @@ name: "🐞 Bug Report" about: "Report an issue to help the project improve." title: "[Bug] " labels: "Type: Bug" -assignees: FAKE_TEST_USERNAME +assignees: Josee9988 --- diff --git a/.github/ISSUE_TEMPLATE/2-failing-test.md b/.github/ISSUE_TEMPLATE/2-failing-test.md index 9b1cee9..a239f2a 100644 --- a/.github/ISSUE_TEMPLATE/2-failing-test.md +++ b/.github/ISSUE_TEMPLATE/2-failing-test.md @@ -3,7 +3,7 @@ name: "πŸ’‰ Failing Test" about: "Report failing tests or CI jobs." title: "[Test] " labels: "Type: Test" -assignees: FAKE_TEST_USERNAME +assignees: Josee9988 --- diff --git a/.github/ISSUE_TEMPLATE/3-docs-bug.md b/.github/ISSUE_TEMPLATE/3-docs-bug.md index 855d1d4..f987493 100644 --- a/.github/ISSUE_TEMPLATE/3-docs-bug.md +++ b/.github/ISSUE_TEMPLATE/3-docs-bug.md @@ -3,7 +3,7 @@ name: "πŸ“š Documentation or README.md issue report" about: "Report an issue in the project's documentation or README.md file." title: "" labels: "Documentation" -assignees: FAKE_TEST_USERNAME +assignees: Josee9988 --- # **πŸ“š Documentation Issue Report** diff --git a/.github/ISSUE_TEMPLATE/4-feature-request.md b/.github/ISSUE_TEMPLATE/4-feature-request.md index 9550f60..33ecf94 100644 --- a/.github/ISSUE_TEMPLATE/4-feature-request.md +++ b/.github/ISSUE_TEMPLATE/4-feature-request.md @@ -3,7 +3,7 @@ name: "πŸš€πŸ†• Feature Request" about: "Suggest an idea or possible new feature for this project." title: "" labels: "Type: Feature" -assignees: FAKE_TEST_USERNAME +assignees: Josee9988 --- diff --git a/.github/ISSUE_TEMPLATE/5-enhancement-request.md b/.github/ISSUE_TEMPLATE/5-enhancement-request.md index 6e0c123..2b29bd5 100644 --- a/.github/ISSUE_TEMPLATE/5-enhancement-request.md +++ b/.github/ISSUE_TEMPLATE/5-enhancement-request.md @@ -3,7 +3,7 @@ name: "πŸš€βž• Enhancement Request" about: "Suggest an enhancement for this project. Improve an existing feature" title: "" labels: "Type: Enhancement" -assignees: FAKE_TEST_USERNAME +assignees: Josee9988 --- diff --git a/.github/ISSUE_TEMPLATE/6-security-report.md b/.github/ISSUE_TEMPLATE/6-security-report.md index 3306b9d..81f6fef 100644 --- a/.github/ISSUE_TEMPLATE/6-security-report.md +++ b/.github/ISSUE_TEMPLATE/6-security-report.md @@ -3,7 +3,7 @@ name: "⚠️ Security Report" about: "Report an issue to help the project improve." title: "" labels: "Type: Security" -assignees: FAKE_TEST_USERNAME +assignees: Josee9988 --- @@ -25,7 +25,7 @@ certain personal information or involves personal identifiable data, or you beli that the data that you might leak by exposing the way on how to attack the project could be considered as a data leak or could violate the privacy of any kind of data or sensible data, please do not post it here and directly email the developer: -(FAKE_TEST_EMAIL). You should post the issue with the least amount of +(jgracia9988@gmail.com). You should post the issue with the least amount of sensible or private data as possible to help us manage the security issue, and with the extra data sent from your email to the developer (if any), we will deeply analyze and try to fix it as fast as possible. diff --git a/.github/ISSUE_TEMPLATE/7-question-support.md b/.github/ISSUE_TEMPLATE/7-question-support.md index 2b10fb5..ec98c81 100644 --- a/.github/ISSUE_TEMPLATE/7-question-support.md +++ b/.github/ISSUE_TEMPLATE/7-question-support.md @@ -3,7 +3,7 @@ name: "❓ Question or Support Request" about: "Questions and requests for support." title: "" labels: "Type: Question" -assignees: FAKE_TEST_USERNAME +assignees: Josee9988 --- diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index af993b3..a053b0d 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: true contact_links: - name: Send an e-mail the developer - url: mailto:FAKE_TEST_EMAIL + url: mailto:jgracia9988@gmail.com about: Please do NOT use this email to post issues or feature requests (only important business/personal contact). diff --git a/.github/SECURITY.md b/.github/SECURITY.md index a8d01ff..30a193d 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -8,6 +8,6 @@ To report a security issue, go to the project's issues and create a new issue us Read carefully the instructions of this issue template, and if your report could leak data or might expose how to gain access to a restricted area or break the system, -please email [FAKE_TEST_EMAIL](mailto:FAKE_TEST_EMAIL) and include the word "SECURITY" in the subject line. +please email [jgracia9988@gmail.com](mailto:jgracia9988@gmail.com) and include the word "SECURITY" in the subject line. We'll endeavour to respond quickly, and will keep you updated throughout the process. diff --git a/.github/config.yml b/.github/config.yml index 91e895a..1e537f7 100644 --- a/.github/config.yml +++ b/.github/config.yml @@ -2,7 +2,7 @@ # Comment to be posted to on first time issues newIssueWelcomeComment: > - Thanks for opening your first issue in FAKE_TEST_USERNAME/project-template! Be sure to follow the issue template and provide every bit of information to help the developers! + Thanks for opening your first issue in Josee9988/project-template! Be sure to follow the issue template and provide every bit of information to help the developers! # Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome diff --git a/.gitignore b/.gitignore index f89f074..49c69d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -###> FAKE_TEST_USERNAME/FAKE_TEST_PROJECT_NAME ### +###> Josee9988/project-template ### # Folders .vscode/ @@ -13,4 +13,4 @@ ignore.* .env.test *.pem -###< FAKE_TEST_USERNAME/FAKE_TEST_PROJECT_NAME ### +###< Josee9988/project-template ### diff --git a/CHANGELOG.md b/CHANGELOG.md index ae8df3e..03f1f20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,252 @@ # **Change Log** πŸ“œπŸ“ -All notable changes to the "**FAKE_TEST_PROJECT_NAME**" DICK will be documented in this file. +All notable changes to the "**Project template**" repository will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). --- -## [**0.0.1**] - 2021-07-08 +## [**1.7.2**] - 2021-07-08 ### Added -* The basic project structure from **[josee9988/project-template](https://github.com/Josee9988/project-template)**. +* Multiple new .gitignore lines and improved its comment structure. + +### Fixed + +* Minnor typo in the generated README.md + +## [**1.7.1**] - 2021-07-01 + +### Added + +* `.env` file will be ignored in the `.gitignore`. +* Disabled some markdownlint rules in the generated README.md +* Fixed some minnor errors in the README.md file + +## [**1.7.0**] - 2021-06-01 + +### Added + +* Type: Test issue label. +* Failing test issue template adds the new Type Test issue label. +* Updated README.md with the new label. + +## [**1.6.0**] - 2021-05-21 + +### Added + +* Divided the feature request into feature and enhancement request, each one with its respective labels. + +### Changed + +* Position of disclaimers and comments in the issue templates are moved to the bottom (but the security report) as some users directly erased everything to not read the text. +* Image of the issue templates in the readme.md file. + +## [**1.5.0**] - 2021-05-15 + +### Added + +* Auto-detection of user email. + +## [**1.4.5**] - 2021-04-24 + +### Added + +* Sponsor section in the project's main readme.md file. +* Improved and added documentation in the scripts. + +### Fixed + +* Readme "What does it include" fixed list of files. +* Sponsor link in the generated README.md file. +* Some typos + +## [**1.4.4**] - 2021-04-22 + +### Added + +* --help option in the script. +* More documentation and information for the user in the script prompts + +## [**1.4.3**] - 2021-04-21 + +### Added + +* Support for Github todo app. + +## [**1.4.2**] - 2021-04-20 + +### Added + +* An extra informational message in the script. +* Welcome bot and its config (.github/config.yml) + +### Fixed + +* Issue templates now auto assigns the new labels. + +## [**1.4.1**] - 2021-04-20 + +### Added + +* Security label + +### Changed + +* Project tree to its updated version. + +## [**1.4.0**] - 2021-04-19 + +### Added + +* Readme file with the section with the recommended/used bots that the users should install. +* Some informational comments in the script referencing the project's documentation. +* A total of 18 new labels will be created right when you clone your repo using Github Probot settings. + +## [**1.3.0**] - 2021-04-14 + +### Added + +* CODEOWNERS file inside the .github folder. + +### Fixed + +* Some README.md markdownlint bugs. + +## [**1.2.0**] - 2021-04-07 + +### Added + +* Bug report issue templates have the preceding "[BUG]" title. +* Multiple readme template headings (About the project, project tree, screenshots, donators). +* Improved README.md template by fixing some minor problems. + +## [**1.1.1**] - 2021-04-02 + +### Added + +* Username and project name are automatically selected (user can manually force change them using bash parameters [Username] [Project-Name]) + +### Changed + +* Asciinema video + +## [**1.1.0**] - 2021-03-31 + +### Added + +* Gitignore file ignores all \*.ignore.\* files. +* Basic README.md template. +* bin/FUNCTION_HELPERS script to improve the readability of the SETUP_TEMPLATE.sh file. + +### Changed + +* Header's emoji from the end of the README.md headers to the beginning to be shown better by the new GitHub's README table of contents. + +### Fixed + +* Git status is shown before the commit. + +### Fixed + +* Some typos in the CHANGELOG.md. + +## [**1.0.11**] - 2021-03-20 + +### Added + +* Social links of the repo in the README.md file. +* Added badges in the README.md file. +* Added sponsor link in the contributing.yml file. + +### Fixed + +* Some minor typos in the README.md file. + +## [**1.0.10**] - 2021-03-17 + +### Changed + +* `EXECUTEME.sh` script changed to `SETUP_TEMPLATE.sh`. +* Changed the execution video from the README.md file (Asciinema's video). + +## [**1.0.9**] - 2021-03-17 + +### Added + +* The script will git add and commit the new files/changes for you. + +## [**1.0.8**] - 2021-03-17 + +### Changed + +* Improved README.md structure and fixed some typos. + +### Added + +* 'Extra recommendations' section in the README.md file. + +## [**1.0.7**] - 2021-03-16 + +### Fixed + +* Some minor typos + +## [**1.0.6**] - 2021-03-16 + +### Changed + +* Simplified PR template to make it easier. + +## [**1.0.5**] - 2021-03-13 + +### Added + +* Checks to the shell script (check if the files exist) +* Colourized the output of the script. + +## [**1.0.4**] - 2021-02-26 + +### Added + +* Markdownlint disable the rule in the CHANGELOG.md file" + +## [**1.0.3**] - 2021-02-23 + +### Removed + +* Josee's funding links. + +### Added + +* Shell script now checks if the .github directory exists. + +## [**1.0.2**] - 2020-09-08 + +### Added + +* One more screenshot to the README.md file showing the community profile. +* Documentation for the SETUP_TEMPLATE.sh script. + +### Changed + +* The project tree view showing the new LICENSE file. + +## [**1.0.1**] - 2020-09-08 + +### Added + +* A LICENSE for the project will be removed with the SETUP_TEMPLATE.sh script. + +### Changed + +* The location of the pull request template to the .github/ folder. + +## [**1.0.0**] - 2020-09-08 + +### Added + +* Added a CHANGELOG.md. +* Support for the CHANGELOG in the SETUP_TEMPLATE.sh file (when run, it will remove all of the content and create a new file from scratch). diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..97d7d26 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Jose Gracia Berenguer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 642a694..6cd70c9 100644 --- a/README.md +++ b/README.md @@ -1,97 +1,248 @@ - -# πŸ”₯ **FAKE_TEST_USERNAME/FAKE_TEST_PROJECT_NAME** +# πŸ”₯ **Josee9988's Github Project Template** - + + + +

--- -## πŸ€” **About the project** +## πŸ€” **What is this template all about?** -* +* This template can be used as a base layer for any of your future repositories/projects. +* Make your project easy to maintain with **8 issue templates**. +* Quickstart your documentation with personalized **readme badges** and a cool readme structure. +* Manage your issues with **20 issue labels** created just for you! +* Make your _community healthier_ with all the guides like code of conduct, contributing, support, security... +* Learn more with the [official Github guide on creating repositories from a template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). +* To start using it; "**[click use this template](https://github.com/Josee9988/project-template/generate)**", create your new repository, +* All the basic setup is made through an easy script that will auto-detect all your data to make it lightning fast! πŸ—²πŸ—² clone your new repository and execute the `SETUP_TEMPLATE.sh` shell script to personalize the files with your private details. Check how to execute it [here](https://asciinema.org/a/398761). +* All the markdown follows [MarkdownLint rules](https://github.com/DavidAnson/markdownlint). --- ## ⚑ **Installation** -* +1. To create a new repository from this template **[generate your new repository from this template](https://github.com/Josee9988/project-template/generate)** +for more information or guidance, follow the [Github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). +2. Clone your new repository **[generated from this template](https://github.com/Josee9988/project-template/generate)** and `cd` into it. +3. **Execute** the `SETUP_TEMPLATE.sh` shell script to **customize** the files with your data. + + ```bash + bash SETUP_TEMPLATE.sh # additional parameters [Username] [Project-Name] [Email] + ``` ---- + Or you can also do it like this: + + ```bash + chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE.sh # additional parameters [Username] [Project-Name] [Email] + ``` -## πŸš€ **Usage** + Additionally, watch *[this video](https://asciinema.org/a/404568)* to see **how to execute the script** or use *`bash SETUP_TEMPLATE.sh --help`* to obtain some extra information. + + If the automatic detection of the username, project name or email is NOT right, please post an issue, and you can **manually correct** them like: `bash SETUP_TEMPLATE.sh RightUsername RightProjectName RightEmail` being `$1` the new username, `$2` the new project name and `$3` the new email. -* +4. **Review** every single file and **customize** it as you like. +5. Build your project. πŸš€ + +⚠️ _Customize every file to fit your requirements_ ⚠️ --- -## 🌲 **Project tree** +## πŸ“š **What does it include?** + +1. A **`SETUP_TEMPLATE.sh`** script that **MUST be executed right when you clone your repository**. +The script will replace Jose's username and email (the author) with yours from all the. + + 1. A README template file with a default template to start documenting your project. (it includes personalized badges and text with your project details) + 1. A CHANGELOG template file based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + 1. An [issue_label_bot.yaml](/.github/issue_label_bot.yaml) file to use the issue adder Github bot. [Activate it or check its documentation](https://github.com/marketplace/issue-label-bot). + 1. A [config.yml](/.github/config.yml) file to modify multiple bot's behaviours. + 1. A [settings.yml](/.github/settings.yml) file to use the popular settings Github bot. [Activate it or check its documentation](https://probot.github.io/apps/settings/). + 1. A [CONTRIBUTING](/.github/CONTRIBUTING.md) explaining how to contribute to the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/setting-guidelines-for-repository-contributors). + 1. A [SUPPORT](/.github/SUPPORT.md) explaining how to support the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-support-resources-to-your-project). + 1. A [SECURITY](/.github/SECURITY.md) with a guide on how to post a security issue. [Learn more with the Github guide](https://docs.github.com/es/github/managing-security-vulnerabilities/adding-a-security-policy-to-your-repository). + 1. A [CODEOWNERS](/.github/CODEOWNERS) with the new user as the main owner. [Learn more with the Github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners). + 1. A [CODE_OF_CONDUCT](/.github/CODE_OF_CONDUCT.md) with a basic code of conduct. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-a-code-of-conduct-to-your-project). + 1. A [PULL_REQUEST_TEMPLATE](/.github/pull_request_template.md) with a template for your pull request that closes issues with keywords. [Learn more with the Github guide](https://docs.github.com/es/github/building-a-strong-community/creating-a-pull-request-template-for-your-repository). + 1. Multiple [issues templates](/.github/ISSUE_TEMPLATE). [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository). + 1. A [config.yml](/.github/ISSUE_TEMPLATE/config.yml) with the config and information about the issue templates. + 1. A [Blank issue template](/.github/ISSUE_TEMPLATE) with the super basic stuff, all the issues should contain. + 1. A [Bug issue template](/.github/ISSUE_TEMPLATE/1-bug-report.md). + 1. A [Failing test issue template](/.github/ISSUE_TEMPLATE/2-failing-test.md). + 1. A [Documentation issue template](/.github/ISSUE_TEMPLATE/3-docs-bug.md). + 1. A [Feature request issue template](/.github/ISSUE_TEMPLATE/4-feature-request.md). + 1. A [Security report issue template](/.github/ISSUE_TEMPLATE/5-security-report.md). + 1. A [Question or support issue template](/.github/ISSUE_TEMPLATE/6-question-support.md). - +--- + +### 🌲 **Project tree** + +Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not shown! πŸ™ˆ + +```text +. +β”œβ”€β”€ CHANGELOG.md +β”œβ”€β”€ .github +β”‚Β Β  β”œβ”€β”€ CODE_OF_CONDUCT.md +β”‚Β Β  β”œβ”€β”€ CODEOWNERS +β”‚Β Β  β”œβ”€β”€ CONTRIBUTING.md +β”‚Β Β  β”œβ”€β”€ FUNDING.yml +β”‚Β Β  β”œβ”€β”€ issue_label_bot.yaml +β”‚Β Β  β”œβ”€β”€ config.yml +β”‚Β Β  β”œβ”€β”€ ISSUE_TEMPLATE +β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 1-bug-report.md +β”‚ β”‚ β”œβ”€β”€ 2-failing-test.md +β”‚ β”‚ β”œβ”€β”€ 3-docs-bug.md +β”‚ β”‚ β”œβ”€β”€ 4-feature-request.md +β”‚ β”‚ β”œβ”€β”€ 5-enhancement-request.md +β”‚ β”‚ β”œβ”€β”€ 6-security-report.md +β”‚ β”‚ β”œβ”€β”€ 7-question-support.md +β”‚ β”‚ └── config.yml +β”‚Β Β  β”œβ”€β”€ ISSUE_TEMPLATE.md +β”‚Β Β  β”œβ”€β”€ pull_request_template.md +β”‚Β Β  β”œβ”€β”€ SECURITY.md +β”‚Β Β  β”œβ”€β”€ settings.yml +β”‚Β Β  └── SUPPORT.md +β”œβ”€β”€ .gitignore +└── README.md + +2 directories, 21 files +``` --- ## πŸ“ **Additional notes** -* +* After **[generating your new repo with this template](https://github.com/Josee9988/project-template/generate)**, make sure to, right after you clone it, run the script `SETUP_TEMPLATE.sh`. + +* Then you will be presented with all the files modified with your project details and information. It is very important to **manually review every file** to check if it fits your requirements and performs any necessary changes to customize the project as you want. + +* If you are using **Windows** and you don't know how to execute the `SETUP_TEMPLATE.sh` script: + 1. Install **[git for Windows](https://git-scm.com/download/win)**. + 2. Right-click on the git repository folder and click "*git bash here*". + 3. Then just perform *`bash SETUP_TEMPLATE.sh`* **or** *`chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE.sh`*. + +### πŸ€– **Used Github bots** + +These are recommended bots that are prepared and configured for this template. If you install them your coding experience will probably be much better. +We deeply recommend at least installing the [issue label bot](https://github.com/marketplace/issue-label-bot) as this bot is the one that adds all the labels used in the issue templates. + +1. The `issue_label_bot.yaml` file depends on the **[issue label bot](https://github.com/marketplace/issue-label-bot)**. +2. The `settings.yml` file depends on the **[settings label bot](https://probot.github.io/apps/settings/)**. +3. The `config.yml` file depends on the bot **[welcome bot](https://probot.github.io/apps/welcome/)** and **[todo bot](https://probot.github.io/apps/todo/)** --- ## πŸ“Έ **Screenshots** - +A couple of screenshots to delight you before you use this template. ---- +### πŸ”Ί All the issue templates -## 🍰 **Supporters and donators** +

+ All the issue templates. +

-We are currently looking for new donators to help and maintain this project! ❀️ +### πŸ”» An issue template opened -By donating, you will help the development of this project, and *you will be featured in this FAKE_TEST_PROJECT_NAME's README.md* so everyone can see your kindness and visit your content ⭐. +

+ Bug issue template opened. +

- - - +### πŸ“˜ The README template - +Badges and texts will be replaced with your project details! ---- +

+ README.md template. + + Or watch [this video](https://gifs.com/gif/josee9988-s-readme-md-MwO5E3) to see the whole README template. +

-FAKE_TEST_PROJECT_NAME was generated from *[Josee9988/project-template](https://github.com/Josee9988/project-template)* πŸ“š +### πŸ”– The labels for your issues ---- +If the bot [probot-settings](https://probot.github.io/apps/settings/) is not installed you will not have these beautiful labels! (there are actually 1 more issue label than in the screenshot!) + +

+ LABELS +

-## πŸ•΅οΈ Extra recommendations +### πŸ“ The CHANGELOG template -* +(project name and project type will be replaced with yours) + +

+ CHANGELOG.md template. +

+ +### πŸ›‘οΈ Security policy + +

+ Security issue. +

+ +### πŸ’Ό Community profile at 100% + +

+ Community profile. +

--- -## πŸŽ‰ Was the DICK helpful? Help us raise these numbers up +## πŸ•΅οΈ **Extra recommendations** -[![Github followers](https://img.shields.io/github/followers/FAKE_TEST_USERNAME.svg?style=social)](https://github.com/FAKE_TEST_USERNAME) -[![Github stars](https://img.shields.io/github/stars/FAKE_TEST_USERNAME/FAKE_TEST_PROJECT_NAME.svg?style=social)](https://github.com/FAKE_TEST_USERNAME/FAKE_TEST_PROJECT_NAME/stargazers) -[![Github watchers](https://img.shields.io/github/watchers/FAKE_TEST_USERNAME/FAKE_TEST_PROJECT_NAME.svg?style=social)](https://github.com/FAKE_TEST_USERNAME/FAKE_TEST_PROJECT_NAME/watchers) -[![Github forks](https://img.shields.io/github/forks/FAKE_TEST_USERNAME/FAKE_TEST_PROJECT_NAME.svg?style=social)](https://github.com/FAKE_TEST_USERNAME/FAKE_TEST_PROJECT_NAME/network/members) - -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=github-sponsors&color=red&style=social)](https://github.com/sponsors/FAKE_TEST_USERNAME) +For the right maintenance of the CHANGELOG.md, we recommend this [VSCode extension](https://github.com/Josee9988/Changelog-and-Markdown-snippets) +and the read and understanding of the [keep a changelog guide](https://keepachangelog.com/en/1.0.0/). +Read and comment about it in this [dev.to post](https://dev.to/josee9988/the-ultimate-github-project-template-1264). +We also recommend installing all the [used bots](https://github.com/Josee9988/project-template#-used-github-bots). -Enjoy! πŸ˜ƒ +## πŸ’‰ **Project tests** + +If you want to improve the development of this project, you must, after changing or improving whatever run the project's tests to prove that they are working. + +To do so: + +```bash +bash tests/TESTS_RUNNER.sh +``` --- -## βš–οΈπŸ“ **License and Changelog** +## 🍰 **Supporters and donators** -See the license in the '**[LICENSE](LICENSE)**' file. +We are currently looking for new donators to help and maintain this project! ❀️ -Watch the changes in the '**[CHANGELOG.md](CHANGELOG.md)**' file. +By donating, you will help the development of this project, and *you will be featured in this project's README.md* so everyone can see your kindness and visit your content ⭐. + + + + --- -_Made with a lot of ❀️❀️ by **[@FAKE_TEST_USERNAME](https://github.com/FAKE_TEST_USERNAME)**_ +## πŸŽ‰ Was the template helpful? Help us raise these numbers up + +[![Github followers](https://img.shields.io/github/followers/Josee9988.svg?style=social)](https://github.com/Josee9988) +[![Github stars](https://img.shields.io/github/stars/Josee9988/project-template.svg?style=social)](https://github.com/Josee9988/project-template/stargazers) +[![Github watchers](https://img.shields.io/github/watchers/Josee9988/project-template.svg?style=social)](https://github.com/Josee9988/project-template/watchers) +[![Github forks](https://img.shields.io/github/forks/Josee9988/project-template.svg?style=social)](https://github.com/Josee9988/project-template/network/members) + +Enjoy! πŸ˜ƒ + +> ⚠️Remember that this template should be reviewed and modified to fit your requirements. +> The script **SETUP_TEMPLATE.sh** should be executed right when you clone your new repository. +> There will be files that will need *manual revision*⚠️ + +_Made with a lot of ❀️❀️ by **[@Josee9988](https://github.com/Josee9988)**_ diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh new file mode 100644 index 0000000..368005c --- /dev/null +++ b/bin/FUNCTION_HELPERS.sh @@ -0,0 +1,191 @@ +#!/bin/bash + +#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# +# PURPOSE: Secondary (helper) script that is called by the main SETUP_TEMPLATE.sh file by +# obtaining some functions to better modularize the code. +# TITLE: FUNCTION_HELPERS +# AUTHOR: Jose Gracia +# VERSION: See in CHANGELOG.md +# NOTES: This script will auto remove itself, and in case of wanting to run it again, the user must download +# it again or do a 'git stash' and revert the changes. +# BASH_VERSION: 5.0.17(1)-release +# LICENSE: see in ../LICENSE (project root) or https://github.com/Josee9988/project-template/blob/master/LICENSE +# GITHUB: https://github.com/Josee9988/ +# REPOSITORY: https://github.com/Josee9988/project-template +# ISSUES: https://github.com/Josee9988/project-template/issues +# MAIL: jgracia9988@gmail.com +#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# + +# SCRIPT WITH EXPORTED FUNCTIONS AND VARIABLES USED IN THE MAIN SETUP_TEMPLATE +RED='\033[1;31m' +NC='\033[0m' # No Color +UPurple='\033[4;35m' +BBLUE='\033[1;34m' + +# Function that centers a text in the terminal +center() { + term_width="$(tput cols)" + padding="$(printf '%0.1s' ={1..500})" + echo -e "\n\n${BBLUE}$(printf '%*.*s %s %*.*s\n' 0 "$(((term_width - 2 - ${#1}) / 2))" "$padding" "$1" 0 "$(((term_width - 1 - ${#1}) / 2))" "$padding")${NC}\n" +} + +checkFiles() { + ### Check if the .github directory does exist ### + if [ ! -d ".github/" ] || [ ! -d ".github/ISSUE_TEMPLATE" ]; then + echo -e "${RED}Directory .github/ DOES NOT EXIST WITH ALL THE FILES NEEDED.${NC}" + displayErrorInstructions + exit 1 # exit with error code 1 + fi + + ### Checks if the root files exist and some extra important files ### + if [ ! -f "CHANGELOG.md" ] || [ ! -f "README.md" ] || [ ! -f ".gitignore" ] || [ ! -f "LICENSE" ] || [ ! -f ".github/settings.yml" ] || [ ! -f ".github/pull_request_template.md" ] || [ ! -f ".github/ISSUE_TEMPLATE/1-bug-report.md" ] || [ ! -f ".github/ISSUE_TEMPLATE/config.yml" ]; then + echo -e "${RED}The script couldn't find one or many of the template main files${NC}." + displayErrorInstructions + exit 1 # exit with error code 1 + fi +} + +displayErrorInstructions() { + echo -e "${RED}There are files missing! Have you modified the repository before executing this command?${NC}" + echo -e "\nYou should try to 'git stash' your changes and execute this script from the project root again, or clone again the repository (the template) without any changes.\n" + echo -e "For more information visit: ${UPurple}https://github.com/Josee9988/project-template${NC}" + echo -e "If you think this may be an issue please post it at: ${UPurple}https://github.com/Josee9988/project-template/issues${NC}" +} + +helpCommand() { + if [[ "$1" == *"--help" ]] || [[ "$1" == *"-h" ]]; then # if the user specified help command + displayHelpTexts + exit 0 + fi +} + +displayHelpTexts() { + center "User help" + echo -e "Script usage: ${BBLUE}$0 [Username] [Project-Name] [Email]${NC} (The project name should not contain spaces)${NC}\n" + echo "Arguments of username, project-name and email are automatically gathered from your git repository and git config, so they are optional in case they are not detected correctly." + echo -e "Make sure you have ${BBLUE}read the documentation before executing${NC} this script: ${UPurple}https://github.com/Josee9988/project-template${NC}" + echo -e "If you have any questions or if any issue is found, please make sure to report it at: ${UPurple}https://github.com/Josee9988/project-template/issues${NC}" +} + +writeREADME() { + PROJECT_NAME_PARSED=${PROJECT_NAME/-/ } + bash -c "NEW_USERNAME='NEW_USERNAME' PROJECT_NAME='PROJECT_NAME' PROJECT_TYPE='PROJECT_TYPE'; cat << EOF > README.md + + +# πŸ”₯ **$NEW_USERNAME/$PROJECT_NAME** + + + +--- + +## πŸ€” **About the project** + +* + +--- + +## ⚑ **Installation** + +* + +--- + +## πŸš€ **Usage** + +* + +--- + +## 🌲 **Project tree** + + + +--- + +## πŸ“ **Additional notes** + +* + +--- + +## πŸ“Έ **Screenshots** + + + +--- + +## 🍰 **Supporters and donators** + +We are currently looking for new donators to help and maintain this project! ❀️ + +By donating, you will help the development of this project, and *you will be featured in this $PROJECT_NAME's README.md* so everyone can see your kindness and visit your content ⭐. + + + + + + + +--- + +$PROJECT_NAME was generated from *[Josee9988/project-template](https://github.com/Josee9988/project-template)* πŸ“š + +--- + +## πŸ•΅οΈ Extra recommendations + +* + +--- + +## πŸŽ‰ Was the $PROJECT_TYPE helpful? Help us raise these numbers up + +[![Github followers](https://img.shields.io/github/followers/$NEW_USERNAME.svg?style=social)](https://github.com/$NEW_USERNAME) +[![Github stars](https://img.shields.io/github/stars/$NEW_USERNAME/$PROJECT_NAME.svg?style=social)](https://github.com/$NEW_USERNAME/$PROJECT_NAME/stargazers) +[![Github watchers](https://img.shields.io/github/watchers/$NEW_USERNAME/$PROJECT_NAME.svg?style=social)](https://github.com/$NEW_USERNAME/$PROJECT_NAME/watchers) +[![Github forks](https://img.shields.io/github/forks/$NEW_USERNAME/$PROJECT_NAME.svg?style=social)](https://github.com/$NEW_USERNAME/$PROJECT_NAME/network/members) + +[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=github-sponsors&color=red&style=social)](https://github.com/sponsors/$NEW_USERNAME) + +Enjoy! πŸ˜ƒ + +--- + +## βš–οΈπŸ“ **License and Changelog** + +See the license in the '**[LICENSE](LICENSE)**' file. + +Watch the changes in the '**[CHANGELOG.md](CHANGELOG.md)**' file. + +--- + +_Made with a lot of ❀️❀️ by **[@$NEW_USERNAME](https://github.com/$NEW_USERNAME)**_ +EOF" +} + +writeCHANGELOG() { + ACTUAL_DATE=$(date '+%Y-%m-%d') + bash -c "PROJECT_NAME='PROJECT_NAME' PROJECT_TYPE='PROJECT_TYPE' ACTUAL_DATE='ACTUAL_DATE'; cat << EOF > CHANGELOG.md + +# **Change Log** πŸ“œπŸ“ + +All notable changes to the \"**$PROJECT_NAME**\" $PROJECT_TYPE will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +--- + +## [**0.0.1**] - $ACTUAL_DATE + +### Added + +* The basic project structure from **[josee9988/project-template](https://github.com/Josee9988/project-template)**. +EOF" +} From 119a7b153333fc83a58ee92430fbae4bc42abe40 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Jul 2021 13:33:27 +0200 Subject: [PATCH 134/152] =?UTF-8?q?Set=20up=20'@Josee9988/project-template?= =?UTF-8?q?'=20template:=20Personalized=20files=20by=20executing=20the=20S?= =?UTF-8?q?ETUP=5FTEMPLATE.sh=20script.=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/CODEOWNERS | 6 +- .github/CODE_OF_CONDUCT.md | 2 +- .github/FUNDING.yml | 3 +- .github/ISSUE_TEMPLATE/1-bug-report.md | 2 +- .github/ISSUE_TEMPLATE/2-failing-test.md | 2 +- .github/ISSUE_TEMPLATE/3-docs-bug.md | 2 +- .github/ISSUE_TEMPLATE/4-feature-request.md | 2 +- .../ISSUE_TEMPLATE/5-enhancement-request.md | 2 +- .github/ISSUE_TEMPLATE/6-security-report.md | 4 +- .github/ISSUE_TEMPLATE/7-question-support.md | 2 +- .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/SECURITY.md | 2 +- .github/config.yml | 2 +- .gitignore | 4 +- CHANGELOG.md | 244 +----------------- LICENSE | 21 -- README.md | 237 +++-------------- SETUP_TEMPLATE.sh | 18 +- bin/FUNCTION_HELPERS.sh | 191 -------------- 19 files changed, 78 insertions(+), 670 deletions(-) delete mode 100644 LICENSE delete mode 100644 bin/FUNCTION_HELPERS.sh diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4cb66d4..2e80c9f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,6 +1,6 @@ # These owners will be the default owners for everything in # the repo. Unless a later match takes precedence, -# @Josee9988 will be requested for +# @a will be requested for # review when someone opens a pull request. -# if you want to add more owners just write it after @Josee9988 -* @Josee9988 +# if you want to add more owners just write it after @a +* @a diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index b60dfc1..5977109 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -55,7 +55,7 @@ further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing or otherwise unacceptable behaviour may be -reported by contacting the project team at jgracia9988@gmail.com. All +reported by contacting the project team at c. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality concerning the reporter of an incident. diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index a2d624f..c942e4e 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1 @@ -github: Josee9988 -custom: ['https://www.paypal.me/josee9988'] +# add your own funding links diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md index 1376422..a98661f 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.md +++ b/.github/ISSUE_TEMPLATE/1-bug-report.md @@ -3,7 +3,7 @@ name: "🐞 Bug Report" about: "Report an issue to help the project improve." title: "[Bug] " labels: "Type: Bug" -assignees: Josee9988 +assignees: a --- diff --git a/.github/ISSUE_TEMPLATE/2-failing-test.md b/.github/ISSUE_TEMPLATE/2-failing-test.md index a239f2a..5ef4708 100644 --- a/.github/ISSUE_TEMPLATE/2-failing-test.md +++ b/.github/ISSUE_TEMPLATE/2-failing-test.md @@ -3,7 +3,7 @@ name: "πŸ’‰ Failing Test" about: "Report failing tests or CI jobs." title: "[Test] " labels: "Type: Test" -assignees: Josee9988 +assignees: a --- diff --git a/.github/ISSUE_TEMPLATE/3-docs-bug.md b/.github/ISSUE_TEMPLATE/3-docs-bug.md index f987493..501a522 100644 --- a/.github/ISSUE_TEMPLATE/3-docs-bug.md +++ b/.github/ISSUE_TEMPLATE/3-docs-bug.md @@ -3,7 +3,7 @@ name: "πŸ“š Documentation or README.md issue report" about: "Report an issue in the project's documentation or README.md file." title: "" labels: "Documentation" -assignees: Josee9988 +assignees: a --- # **πŸ“š Documentation Issue Report** diff --git a/.github/ISSUE_TEMPLATE/4-feature-request.md b/.github/ISSUE_TEMPLATE/4-feature-request.md index 33ecf94..ae991b7 100644 --- a/.github/ISSUE_TEMPLATE/4-feature-request.md +++ b/.github/ISSUE_TEMPLATE/4-feature-request.md @@ -3,7 +3,7 @@ name: "πŸš€πŸ†• Feature Request" about: "Suggest an idea or possible new feature for this project." title: "" labels: "Type: Feature" -assignees: Josee9988 +assignees: a --- diff --git a/.github/ISSUE_TEMPLATE/5-enhancement-request.md b/.github/ISSUE_TEMPLATE/5-enhancement-request.md index 2b29bd5..c7797ac 100644 --- a/.github/ISSUE_TEMPLATE/5-enhancement-request.md +++ b/.github/ISSUE_TEMPLATE/5-enhancement-request.md @@ -3,7 +3,7 @@ name: "πŸš€βž• Enhancement Request" about: "Suggest an enhancement for this project. Improve an existing feature" title: "" labels: "Type: Enhancement" -assignees: Josee9988 +assignees: a --- diff --git a/.github/ISSUE_TEMPLATE/6-security-report.md b/.github/ISSUE_TEMPLATE/6-security-report.md index 81f6fef..77dad56 100644 --- a/.github/ISSUE_TEMPLATE/6-security-report.md +++ b/.github/ISSUE_TEMPLATE/6-security-report.md @@ -3,7 +3,7 @@ name: "⚠️ Security Report" about: "Report an issue to help the project improve." title: "" labels: "Type: Security" -assignees: Josee9988 +assignees: a --- @@ -25,7 +25,7 @@ certain personal information or involves personal identifiable data, or you beli that the data that you might leak by exposing the way on how to attack the project could be considered as a data leak or could violate the privacy of any kind of data or sensible data, please do not post it here and directly email the developer: -(jgracia9988@gmail.com). You should post the issue with the least amount of +(c). You should post the issue with the least amount of sensible or private data as possible to help us manage the security issue, and with the extra data sent from your email to the developer (if any), we will deeply analyze and try to fix it as fast as possible. diff --git a/.github/ISSUE_TEMPLATE/7-question-support.md b/.github/ISSUE_TEMPLATE/7-question-support.md index ec98c81..6178458 100644 --- a/.github/ISSUE_TEMPLATE/7-question-support.md +++ b/.github/ISSUE_TEMPLATE/7-question-support.md @@ -3,7 +3,7 @@ name: "❓ Question or Support Request" about: "Questions and requests for support." title: "" labels: "Type: Question" -assignees: Josee9988 +assignees: a --- diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index a053b0d..a30ea40 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: true contact_links: - name: Send an e-mail the developer - url: mailto:jgracia9988@gmail.com + url: mailto:c about: Please do NOT use this email to post issues or feature requests (only important business/personal contact). diff --git a/.github/SECURITY.md b/.github/SECURITY.md index 30a193d..a944e03 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -8,6 +8,6 @@ To report a security issue, go to the project's issues and create a new issue us Read carefully the instructions of this issue template, and if your report could leak data or might expose how to gain access to a restricted area or break the system, -please email [jgracia9988@gmail.com](mailto:jgracia9988@gmail.com) and include the word "SECURITY" in the subject line. +please email [c](mailto:c) and include the word "SECURITY" in the subject line. We'll endeavour to respond quickly, and will keep you updated throughout the process. diff --git a/.github/config.yml b/.github/config.yml index 1e537f7..417f4d8 100644 --- a/.github/config.yml +++ b/.github/config.yml @@ -2,7 +2,7 @@ # Comment to be posted to on first time issues newIssueWelcomeComment: > - Thanks for opening your first issue in Josee9988/project-template! Be sure to follow the issue template and provide every bit of information to help the developers! + Thanks for opening your first issue in a/project-template! Be sure to follow the issue template and provide every bit of information to help the developers! # Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome diff --git a/.gitignore b/.gitignore index 49c69d3..e114e53 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -###> Josee9988/project-template ### +###> a/b ### # Folders .vscode/ @@ -13,4 +13,4 @@ ignore.* .env.test *.pem -###< Josee9988/project-template ### +###< a/b ### diff --git a/CHANGELOG.md b/CHANGELOG.md index 03f1f20..a9bc506 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,252 +1,14 @@ # **Change Log** πŸ“œπŸ“ -All notable changes to the "**Project template**" repository will be documented in this file. +All notable changes to the "**b**" c will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). --- -## [**1.7.2**] - 2021-07-08 +## [**0.0.1**] - 2021-07-08 ### Added -* Multiple new .gitignore lines and improved its comment structure. - -### Fixed - -* Minnor typo in the generated README.md - -## [**1.7.1**] - 2021-07-01 - -### Added - -* `.env` file will be ignored in the `.gitignore`. -* Disabled some markdownlint rules in the generated README.md -* Fixed some minnor errors in the README.md file - -## [**1.7.0**] - 2021-06-01 - -### Added - -* Type: Test issue label. -* Failing test issue template adds the new Type Test issue label. -* Updated README.md with the new label. - -## [**1.6.0**] - 2021-05-21 - -### Added - -* Divided the feature request into feature and enhancement request, each one with its respective labels. - -### Changed - -* Position of disclaimers and comments in the issue templates are moved to the bottom (but the security report) as some users directly erased everything to not read the text. -* Image of the issue templates in the readme.md file. - -## [**1.5.0**] - 2021-05-15 - -### Added - -* Auto-detection of user email. - -## [**1.4.5**] - 2021-04-24 - -### Added - -* Sponsor section in the project's main readme.md file. -* Improved and added documentation in the scripts. - -### Fixed - -* Readme "What does it include" fixed list of files. -* Sponsor link in the generated README.md file. -* Some typos - -## [**1.4.4**] - 2021-04-22 - -### Added - -* --help option in the script. -* More documentation and information for the user in the script prompts - -## [**1.4.3**] - 2021-04-21 - -### Added - -* Support for Github todo app. - -## [**1.4.2**] - 2021-04-20 - -### Added - -* An extra informational message in the script. -* Welcome bot and its config (.github/config.yml) - -### Fixed - -* Issue templates now auto assigns the new labels. - -## [**1.4.1**] - 2021-04-20 - -### Added - -* Security label - -### Changed - -* Project tree to its updated version. - -## [**1.4.0**] - 2021-04-19 - -### Added - -* Readme file with the section with the recommended/used bots that the users should install. -* Some informational comments in the script referencing the project's documentation. -* A total of 18 new labels will be created right when you clone your repo using Github Probot settings. - -## [**1.3.0**] - 2021-04-14 - -### Added - -* CODEOWNERS file inside the .github folder. - -### Fixed - -* Some README.md markdownlint bugs. - -## [**1.2.0**] - 2021-04-07 - -### Added - -* Bug report issue templates have the preceding "[BUG]" title. -* Multiple readme template headings (About the project, project tree, screenshots, donators). -* Improved README.md template by fixing some minor problems. - -## [**1.1.1**] - 2021-04-02 - -### Added - -* Username and project name are automatically selected (user can manually force change them using bash parameters [Username] [Project-Name]) - -### Changed - -* Asciinema video - -## [**1.1.0**] - 2021-03-31 - -### Added - -* Gitignore file ignores all \*.ignore.\* files. -* Basic README.md template. -* bin/FUNCTION_HELPERS script to improve the readability of the SETUP_TEMPLATE.sh file. - -### Changed - -* Header's emoji from the end of the README.md headers to the beginning to be shown better by the new GitHub's README table of contents. - -### Fixed - -* Git status is shown before the commit. - -### Fixed - -* Some typos in the CHANGELOG.md. - -## [**1.0.11**] - 2021-03-20 - -### Added - -* Social links of the repo in the README.md file. -* Added badges in the README.md file. -* Added sponsor link in the contributing.yml file. - -### Fixed - -* Some minor typos in the README.md file. - -## [**1.0.10**] - 2021-03-17 - -### Changed - -* `EXECUTEME.sh` script changed to `SETUP_TEMPLATE.sh`. -* Changed the execution video from the README.md file (Asciinema's video). - -## [**1.0.9**] - 2021-03-17 - -### Added - -* The script will git add and commit the new files/changes for you. - -## [**1.0.8**] - 2021-03-17 - -### Changed - -* Improved README.md structure and fixed some typos. - -### Added - -* 'Extra recommendations' section in the README.md file. - -## [**1.0.7**] - 2021-03-16 - -### Fixed - -* Some minor typos - -## [**1.0.6**] - 2021-03-16 - -### Changed - -* Simplified PR template to make it easier. - -## [**1.0.5**] - 2021-03-13 - -### Added - -* Checks to the shell script (check if the files exist) -* Colourized the output of the script. - -## [**1.0.4**] - 2021-02-26 - -### Added - -* Markdownlint disable the rule in the CHANGELOG.md file" - -## [**1.0.3**] - 2021-02-23 - -### Removed - -* Josee's funding links. - -### Added - -* Shell script now checks if the .github directory exists. - -## [**1.0.2**] - 2020-09-08 - -### Added - -* One more screenshot to the README.md file showing the community profile. -* Documentation for the SETUP_TEMPLATE.sh script. - -### Changed - -* The project tree view showing the new LICENSE file. - -## [**1.0.1**] - 2020-09-08 - -### Added - -* A LICENSE for the project will be removed with the SETUP_TEMPLATE.sh script. - -### Changed - -* The location of the pull request template to the .github/ folder. - -## [**1.0.0**] - 2020-09-08 - -### Added - -* Added a CHANGELOG.md. -* Support for the CHANGELOG in the SETUP_TEMPLATE.sh file (when run, it will remove all of the content and create a new file from scratch). +* The basic project structure from **[josee9988/project-template](https://github.com/Josee9988/project-template)**. diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 97d7d26..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Jose Gracia Berenguer - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md index 6cd70c9..8adb718 100644 --- a/README.md +++ b/README.md @@ -1,248 +1,97 @@ -# πŸ”₯ **Josee9988's Github Project Template** + +# πŸ”₯ **a/b** -

- Logo -
- - Issues +

--- -## πŸ€” **What is this template all about?** +## πŸ€” **About the project** -* This template can be used as a base layer for any of your future repositories/projects. -* Make your project easy to maintain with **8 issue templates**. -* Quickstart your documentation with personalized **readme badges** and a cool readme structure. -* Manage your issues with **20 issue labels** created just for you! -* Make your _community healthier_ with all the guides like code of conduct, contributing, support, security... -* Learn more with the [official Github guide on creating repositories from a template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). -* To start using it; "**[click use this template](https://github.com/Josee9988/project-template/generate)**", create your new repository, -* All the basic setup is made through an easy script that will auto-detect all your data to make it lightning fast! πŸ—²πŸ—² clone your new repository and execute the `SETUP_TEMPLATE.sh` shell script to personalize the files with your private details. Check how to execute it [here](https://asciinema.org/a/398761). -* All the markdown follows [MarkdownLint rules](https://github.com/DavidAnson/markdownlint). +* --- ## ⚑ **Installation** -1. To create a new repository from this template **[generate your new repository from this template](https://github.com/Josee9988/project-template/generate)** -for more information or guidance, follow the [Github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). -2. Clone your new repository **[generated from this template](https://github.com/Josee9988/project-template/generate)** and `cd` into it. -3. **Execute** the `SETUP_TEMPLATE.sh` shell script to **customize** the files with your data. - - ```bash - bash SETUP_TEMPLATE.sh # additional parameters [Username] [Project-Name] [Email] - ``` - - Or you can also do it like this: - - ```bash - chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE.sh # additional parameters [Username] [Project-Name] [Email] - ``` +* - Additionally, watch *[this video](https://asciinema.org/a/404568)* to see **how to execute the script** or use *`bash SETUP_TEMPLATE.sh --help`* to obtain some extra information. - - If the automatic detection of the username, project name or email is NOT right, please post an issue, and you can **manually correct** them like: `bash SETUP_TEMPLATE.sh RightUsername RightProjectName RightEmail` being `$1` the new username, `$2` the new project name and `$3` the new email. +--- -4. **Review** every single file and **customize** it as you like. -5. Build your project. πŸš€ +## πŸš€ **Usage** -⚠️ _Customize every file to fit your requirements_ ⚠️ +* --- -## πŸ“š **What does it include?** - -1. A **`SETUP_TEMPLATE.sh`** script that **MUST be executed right when you clone your repository**. -The script will replace Jose's username and email (the author) with yours from all the. - - 1. A README template file with a default template to start documenting your project. (it includes personalized badges and text with your project details) - 1. A CHANGELOG template file based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - 1. An [issue_label_bot.yaml](/.github/issue_label_bot.yaml) file to use the issue adder Github bot. [Activate it or check its documentation](https://github.com/marketplace/issue-label-bot). - 1. A [config.yml](/.github/config.yml) file to modify multiple bot's behaviours. - 1. A [settings.yml](/.github/settings.yml) file to use the popular settings Github bot. [Activate it or check its documentation](https://probot.github.io/apps/settings/). - 1. A [CONTRIBUTING](/.github/CONTRIBUTING.md) explaining how to contribute to the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/setting-guidelines-for-repository-contributors). - 1. A [SUPPORT](/.github/SUPPORT.md) explaining how to support the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-support-resources-to-your-project). - 1. A [SECURITY](/.github/SECURITY.md) with a guide on how to post a security issue. [Learn more with the Github guide](https://docs.github.com/es/github/managing-security-vulnerabilities/adding-a-security-policy-to-your-repository). - 1. A [CODEOWNERS](/.github/CODEOWNERS) with the new user as the main owner. [Learn more with the Github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners). - 1. A [CODE_OF_CONDUCT](/.github/CODE_OF_CONDUCT.md) with a basic code of conduct. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-a-code-of-conduct-to-your-project). - 1. A [PULL_REQUEST_TEMPLATE](/.github/pull_request_template.md) with a template for your pull request that closes issues with keywords. [Learn more with the Github guide](https://docs.github.com/es/github/building-a-strong-community/creating-a-pull-request-template-for-your-repository). - 1. Multiple [issues templates](/.github/ISSUE_TEMPLATE). [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository). - 1. A [config.yml](/.github/ISSUE_TEMPLATE/config.yml) with the config and information about the issue templates. - 1. A [Blank issue template](/.github/ISSUE_TEMPLATE) with the super basic stuff, all the issues should contain. - 1. A [Bug issue template](/.github/ISSUE_TEMPLATE/1-bug-report.md). - 1. A [Failing test issue template](/.github/ISSUE_TEMPLATE/2-failing-test.md). - 1. A [Documentation issue template](/.github/ISSUE_TEMPLATE/3-docs-bug.md). - 1. A [Feature request issue template](/.github/ISSUE_TEMPLATE/4-feature-request.md). - 1. A [Security report issue template](/.github/ISSUE_TEMPLATE/5-security-report.md). - 1. A [Question or support issue template](/.github/ISSUE_TEMPLATE/6-question-support.md). +## 🌲 **Project tree** ---- - -### 🌲 **Project tree** - -Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not shown! πŸ™ˆ - -```text -. -β”œβ”€β”€ CHANGELOG.md -β”œβ”€β”€ .github -β”‚Β Β  β”œβ”€β”€ CODE_OF_CONDUCT.md -β”‚Β Β  β”œβ”€β”€ CODEOWNERS -β”‚Β Β  β”œβ”€β”€ CONTRIBUTING.md -β”‚Β Β  β”œβ”€β”€ FUNDING.yml -β”‚Β Β  β”œβ”€β”€ issue_label_bot.yaml -β”‚Β Β  β”œβ”€β”€ config.yml -β”‚Β Β  β”œβ”€β”€ ISSUE_TEMPLATE -β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 1-bug-report.md -β”‚ β”‚ β”œβ”€β”€ 2-failing-test.md -β”‚ β”‚ β”œβ”€β”€ 3-docs-bug.md -β”‚ β”‚ β”œβ”€β”€ 4-feature-request.md -β”‚ β”‚ β”œβ”€β”€ 5-enhancement-request.md -β”‚ β”‚ β”œβ”€β”€ 6-security-report.md -β”‚ β”‚ β”œβ”€β”€ 7-question-support.md -β”‚ β”‚ └── config.yml -β”‚Β Β  β”œβ”€β”€ ISSUE_TEMPLATE.md -β”‚Β Β  β”œβ”€β”€ pull_request_template.md -β”‚Β Β  β”œβ”€β”€ SECURITY.md -β”‚Β Β  β”œβ”€β”€ settings.yml -β”‚Β Β  └── SUPPORT.md -β”œβ”€β”€ .gitignore -└── README.md - -2 directories, 21 files -``` + --- ## πŸ“ **Additional notes** -* After **[generating your new repo with this template](https://github.com/Josee9988/project-template/generate)**, make sure to, right after you clone it, run the script `SETUP_TEMPLATE.sh`. - -* Then you will be presented with all the files modified with your project details and information. It is very important to **manually review every file** to check if it fits your requirements and performs any necessary changes to customize the project as you want. - -* If you are using **Windows** and you don't know how to execute the `SETUP_TEMPLATE.sh` script: - 1. Install **[git for Windows](https://git-scm.com/download/win)**. - 2. Right-click on the git repository folder and click "*git bash here*". - 3. Then just perform *`bash SETUP_TEMPLATE.sh`* **or** *`chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE.sh`*. - -### πŸ€– **Used Github bots** - -These are recommended bots that are prepared and configured for this template. If you install them your coding experience will probably be much better. -We deeply recommend at least installing the [issue label bot](https://github.com/marketplace/issue-label-bot) as this bot is the one that adds all the labels used in the issue templates. - -1. The `issue_label_bot.yaml` file depends on the **[issue label bot](https://github.com/marketplace/issue-label-bot)**. -2. The `settings.yml` file depends on the **[settings label bot](https://probot.github.io/apps/settings/)**. -3. The `config.yml` file depends on the bot **[welcome bot](https://probot.github.io/apps/welcome/)** and **[todo bot](https://probot.github.io/apps/todo/)** +* --- ## πŸ“Έ **Screenshots** -A couple of screenshots to delight you before you use this template. - -### πŸ”Ί All the issue templates - -

- All the issue templates. -

- -### πŸ”» An issue template opened - -

- Bug issue template opened. -

- -### πŸ“˜ The README template - -Badges and texts will be replaced with your project details! - -

- README.md template. - - Or watch [this video](https://gifs.com/gif/josee9988-s-readme-md-MwO5E3) to see the whole README template. -

+ -### πŸ”– The labels for your issues - -If the bot [probot-settings](https://probot.github.io/apps/settings/) is not installed you will not have these beautiful labels! (there are actually 1 more issue label than in the screenshot!) - -

- LABELS -

- -### πŸ“ The CHANGELOG template - -(project name and project type will be replaced with yours) +--- -

- CHANGELOG.md template. -

+## 🍰 **Supporters and donators** -### πŸ›‘οΈ Security policy +We are currently looking for new donators to help and maintain this project! ❀️ -

- Security issue. -

+By donating, you will help the development of this project, and *you will be featured in this b's README.md* so everyone can see your kindness and visit your content ⭐. -### πŸ’Ό Community profile at 100% + + + -

- Community profile. -

+ --- -## πŸ•΅οΈ **Extra recommendations** - -For the right maintenance of the CHANGELOG.md, we recommend this [VSCode extension](https://github.com/Josee9988/Changelog-and-Markdown-snippets) -and the read and understanding of the [keep a changelog guide](https://keepachangelog.com/en/1.0.0/). -Read and comment about it in this [dev.to post](https://dev.to/josee9988/the-ultimate-github-project-template-1264). -We also recommend installing all the [used bots](https://github.com/Josee9988/project-template#-used-github-bots). +b was generated from *[Josee9988/project-template](https://github.com/Josee9988/project-template)* πŸ“š -## πŸ’‰ **Project tests** - -If you want to improve the development of this project, you must, after changing or improving whatever run the project's tests to prove that they are working. +--- -To do so: +## πŸ•΅οΈ Extra recommendations -```bash -bash tests/TESTS_RUNNER.sh -``` +* --- -## 🍰 **Supporters and donators** - -We are currently looking for new donators to help and maintain this project! ❀️ +## πŸŽ‰ Was the c helpful? Help us raise these numbers up -By donating, you will help the development of this project, and *you will be featured in this project's README.md* so everyone can see your kindness and visit your content ⭐. +[![Github followers](https://img.shields.io/github/followers/a.svg?style=social)](https://github.com/a) +[![Github stars](https://img.shields.io/github/stars/a/b.svg?style=social)](https://github.com/a/b/stargazers) +[![Github watchers](https://img.shields.io/github/watchers/a/b.svg?style=social)](https://github.com/a/b/watchers) +[![Github forks](https://img.shields.io/github/forks/a/b.svg?style=social)](https://github.com/a/b/network/members) + +[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=github-sponsors&color=red&style=social)](https://github.com/sponsors/a) - - - +Enjoy! πŸ˜ƒ --- -## πŸŽ‰ Was the template helpful? Help us raise these numbers up +## βš–οΈπŸ“ **License and Changelog** -[![Github followers](https://img.shields.io/github/followers/Josee9988.svg?style=social)](https://github.com/Josee9988) -[![Github stars](https://img.shields.io/github/stars/Josee9988/project-template.svg?style=social)](https://github.com/Josee9988/project-template/stargazers) -[![Github watchers](https://img.shields.io/github/watchers/Josee9988/project-template.svg?style=social)](https://github.com/Josee9988/project-template/watchers) -[![Github forks](https://img.shields.io/github/forks/Josee9988/project-template.svg?style=social)](https://github.com/Josee9988/project-template/network/members) +See the license in the '**[LICENSE](LICENSE)**' file. -Enjoy! πŸ˜ƒ +Watch the changes in the '**[CHANGELOG.md](CHANGELOG.md)**' file. -> ⚠️Remember that this template should be reviewed and modified to fit your requirements. -> The script **SETUP_TEMPLATE.sh** should be executed right when you clone your new repository. -> There will be files that will need *manual revision*⚠️ +--- -_Made with a lot of ❀️❀️ by **[@Josee9988](https://github.com/Josee9988)**_ +_Made with a lot of ❀️❀️ by **[@a](https://github.com/a)**_ diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index e78e92b..83bd655 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -61,14 +61,24 @@ else NEW_EMAIL=$3 fi -###### START OF THE SCRIPT ###### echo -e "Thanks for using ${GREEN}Josee9988/project-template${NC}" echo -e "Read carefully all the documentation before you continue executing this script: ${UPurple}https://github.com/Josee9988/project-template${NC}\n" -# prompt for the, mail and type of the project -read -p "Enter $(echo -e "$BBLUE""what your project is""$NC") (program/extension/API/web/CLI tool/backend/frontend/scrapper/automation tool/etc): " PROJECT_TYPE + +if [ -z "$4" ]; then # if the project's type has been manually specified + read -p "Enter $(echo -e "$BBLUE""what your project is""$NC") (program/extension/API/web/CLI tool/backend/frontend/scrapper/automation tool/etc): " PROJECT_TYPE +else + PROJECT_TYPE=$3 +fi + +if [ -z "$4" ]; then # if the ignore option for tests has been specified + read -p "Is this data correct: username \"$(echo -e "$GREEN""$NEW_USERNAME""$NC")\", email: \"$(echo -e "$GREEN""$NEW_EMAIL""$NC")\", project name: \"$(echo -e "$GREEN""$PROJECT_NAME""$NC")\", of type: \"$(echo -e "$GREEN""$PROJECT_TYPE""$NC")\" (y/n)? " choice +else + choice="y" +fi + +###### START OF THE SCRIPT ###### # confirm that the data is correct -read -p "Is this data correct: username \"$(echo -e "$GREEN""$NEW_USERNAME""$NC")\", email: \"$(echo -e "$GREEN""$NEW_EMAIL""$NC")\", project name: \"$(echo -e "$GREEN""$PROJECT_NAME""$NC")\", of type: \"$(echo -e "$GREEN""$PROJECT_TYPE""$NC")\" (y/n)? " choice case "$choice" in y | Y) center "Setting everything up for you ;)" diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh deleted file mode 100644 index 368005c..0000000 --- a/bin/FUNCTION_HELPERS.sh +++ /dev/null @@ -1,191 +0,0 @@ -#!/bin/bash - -#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# -# PURPOSE: Secondary (helper) script that is called by the main SETUP_TEMPLATE.sh file by -# obtaining some functions to better modularize the code. -# TITLE: FUNCTION_HELPERS -# AUTHOR: Jose Gracia -# VERSION: See in CHANGELOG.md -# NOTES: This script will auto remove itself, and in case of wanting to run it again, the user must download -# it again or do a 'git stash' and revert the changes. -# BASH_VERSION: 5.0.17(1)-release -# LICENSE: see in ../LICENSE (project root) or https://github.com/Josee9988/project-template/blob/master/LICENSE -# GITHUB: https://github.com/Josee9988/ -# REPOSITORY: https://github.com/Josee9988/project-template -# ISSUES: https://github.com/Josee9988/project-template/issues -# MAIL: jgracia9988@gmail.com -#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# - -# SCRIPT WITH EXPORTED FUNCTIONS AND VARIABLES USED IN THE MAIN SETUP_TEMPLATE -RED='\033[1;31m' -NC='\033[0m' # No Color -UPurple='\033[4;35m' -BBLUE='\033[1;34m' - -# Function that centers a text in the terminal -center() { - term_width="$(tput cols)" - padding="$(printf '%0.1s' ={1..500})" - echo -e "\n\n${BBLUE}$(printf '%*.*s %s %*.*s\n' 0 "$(((term_width - 2 - ${#1}) / 2))" "$padding" "$1" 0 "$(((term_width - 1 - ${#1}) / 2))" "$padding")${NC}\n" -} - -checkFiles() { - ### Check if the .github directory does exist ### - if [ ! -d ".github/" ] || [ ! -d ".github/ISSUE_TEMPLATE" ]; then - echo -e "${RED}Directory .github/ DOES NOT EXIST WITH ALL THE FILES NEEDED.${NC}" - displayErrorInstructions - exit 1 # exit with error code 1 - fi - - ### Checks if the root files exist and some extra important files ### - if [ ! -f "CHANGELOG.md" ] || [ ! -f "README.md" ] || [ ! -f ".gitignore" ] || [ ! -f "LICENSE" ] || [ ! -f ".github/settings.yml" ] || [ ! -f ".github/pull_request_template.md" ] || [ ! -f ".github/ISSUE_TEMPLATE/1-bug-report.md" ] || [ ! -f ".github/ISSUE_TEMPLATE/config.yml" ]; then - echo -e "${RED}The script couldn't find one or many of the template main files${NC}." - displayErrorInstructions - exit 1 # exit with error code 1 - fi -} - -displayErrorInstructions() { - echo -e "${RED}There are files missing! Have you modified the repository before executing this command?${NC}" - echo -e "\nYou should try to 'git stash' your changes and execute this script from the project root again, or clone again the repository (the template) without any changes.\n" - echo -e "For more information visit: ${UPurple}https://github.com/Josee9988/project-template${NC}" - echo -e "If you think this may be an issue please post it at: ${UPurple}https://github.com/Josee9988/project-template/issues${NC}" -} - -helpCommand() { - if [[ "$1" == *"--help" ]] || [[ "$1" == *"-h" ]]; then # if the user specified help command - displayHelpTexts - exit 0 - fi -} - -displayHelpTexts() { - center "User help" - echo -e "Script usage: ${BBLUE}$0 [Username] [Project-Name] [Email]${NC} (The project name should not contain spaces)${NC}\n" - echo "Arguments of username, project-name and email are automatically gathered from your git repository and git config, so they are optional in case they are not detected correctly." - echo -e "Make sure you have ${BBLUE}read the documentation before executing${NC} this script: ${UPurple}https://github.com/Josee9988/project-template${NC}" - echo -e "If you have any questions or if any issue is found, please make sure to report it at: ${UPurple}https://github.com/Josee9988/project-template/issues${NC}" -} - -writeREADME() { - PROJECT_NAME_PARSED=${PROJECT_NAME/-/ } - bash -c "NEW_USERNAME='NEW_USERNAME' PROJECT_NAME='PROJECT_NAME' PROJECT_TYPE='PROJECT_TYPE'; cat << EOF > README.md - - -# πŸ”₯ **$NEW_USERNAME/$PROJECT_NAME** - - - ---- - -## πŸ€” **About the project** - -* - ---- - -## ⚑ **Installation** - -* - ---- - -## πŸš€ **Usage** - -* - ---- - -## 🌲 **Project tree** - - - ---- - -## πŸ“ **Additional notes** - -* - ---- - -## πŸ“Έ **Screenshots** - - - ---- - -## 🍰 **Supporters and donators** - -We are currently looking for new donators to help and maintain this project! ❀️ - -By donating, you will help the development of this project, and *you will be featured in this $PROJECT_NAME's README.md* so everyone can see your kindness and visit your content ⭐. - - - - - - - ---- - -$PROJECT_NAME was generated from *[Josee9988/project-template](https://github.com/Josee9988/project-template)* πŸ“š - ---- - -## πŸ•΅οΈ Extra recommendations - -* - ---- - -## πŸŽ‰ Was the $PROJECT_TYPE helpful? Help us raise these numbers up - -[![Github followers](https://img.shields.io/github/followers/$NEW_USERNAME.svg?style=social)](https://github.com/$NEW_USERNAME) -[![Github stars](https://img.shields.io/github/stars/$NEW_USERNAME/$PROJECT_NAME.svg?style=social)](https://github.com/$NEW_USERNAME/$PROJECT_NAME/stargazers) -[![Github watchers](https://img.shields.io/github/watchers/$NEW_USERNAME/$PROJECT_NAME.svg?style=social)](https://github.com/$NEW_USERNAME/$PROJECT_NAME/watchers) -[![Github forks](https://img.shields.io/github/forks/$NEW_USERNAME/$PROJECT_NAME.svg?style=social)](https://github.com/$NEW_USERNAME/$PROJECT_NAME/network/members) - -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=github-sponsors&color=red&style=social)](https://github.com/sponsors/$NEW_USERNAME) - -Enjoy! πŸ˜ƒ - ---- - -## βš–οΈπŸ“ **License and Changelog** - -See the license in the '**[LICENSE](LICENSE)**' file. - -Watch the changes in the '**[CHANGELOG.md](CHANGELOG.md)**' file. - ---- - -_Made with a lot of ❀️❀️ by **[@$NEW_USERNAME](https://github.com/$NEW_USERNAME)**_ -EOF" -} - -writeCHANGELOG() { - ACTUAL_DATE=$(date '+%Y-%m-%d') - bash -c "PROJECT_NAME='PROJECT_NAME' PROJECT_TYPE='PROJECT_TYPE' ACTUAL_DATE='ACTUAL_DATE'; cat << EOF > CHANGELOG.md - -# **Change Log** πŸ“œπŸ“ - -All notable changes to the \"**$PROJECT_NAME**\" $PROJECT_TYPE will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - ---- - -## [**0.0.1**] - $ACTUAL_DATE - -### Added - -* The basic project structure from **[josee9988/project-template](https://github.com/Josee9988/project-template)**. -EOF" -} From 0244da2125679a9efeac83de46ea022fc3d50bb2 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Jul 2021 13:33:30 +0200 Subject: [PATCH 135/152] =?UTF-8?q?Revert=20"Set=20up=20'@Josee9988/projec?= =?UTF-8?q?t-template'=20template:=20Personalized=20files=20by=20executing?= =?UTF-8?q?=20the=20SETUP=5FTEMPLATE.sh=20script.=F0=9F=9A=80"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 119a7b153333fc83a58ee92430fbae4bc42abe40. --- .github/CODEOWNERS | 6 +- .github/CODE_OF_CONDUCT.md | 2 +- .github/FUNDING.yml | 3 +- .github/ISSUE_TEMPLATE/1-bug-report.md | 2 +- .github/ISSUE_TEMPLATE/2-failing-test.md | 2 +- .github/ISSUE_TEMPLATE/3-docs-bug.md | 2 +- .github/ISSUE_TEMPLATE/4-feature-request.md | 2 +- .../ISSUE_TEMPLATE/5-enhancement-request.md | 2 +- .github/ISSUE_TEMPLATE/6-security-report.md | 4 +- .github/ISSUE_TEMPLATE/7-question-support.md | 2 +- .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/SECURITY.md | 2 +- .github/config.yml | 2 +- .gitignore | 4 +- CHANGELOG.md | 244 +++++++++++++++++- LICENSE | 21 ++ README.md | 237 ++++++++++++++--- SETUP_TEMPLATE.sh | 18 +- bin/FUNCTION_HELPERS.sh | 191 ++++++++++++++ 19 files changed, 670 insertions(+), 78 deletions(-) create mode 100644 LICENSE create mode 100644 bin/FUNCTION_HELPERS.sh diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2e80c9f..4cb66d4 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,6 +1,6 @@ # These owners will be the default owners for everything in # the repo. Unless a later match takes precedence, -# @a will be requested for +# @Josee9988 will be requested for # review when someone opens a pull request. -# if you want to add more owners just write it after @a -* @a +# if you want to add more owners just write it after @Josee9988 +* @Josee9988 diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 5977109..b60dfc1 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -55,7 +55,7 @@ further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing or otherwise unacceptable behaviour may be -reported by contacting the project team at c. All +reported by contacting the project team at jgracia9988@gmail.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality concerning the reporter of an incident. diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index c942e4e..a2d624f 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1,2 @@ -# add your own funding links +github: Josee9988 +custom: ['https://www.paypal.me/josee9988'] diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.md b/.github/ISSUE_TEMPLATE/1-bug-report.md index a98661f..1376422 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.md +++ b/.github/ISSUE_TEMPLATE/1-bug-report.md @@ -3,7 +3,7 @@ name: "🐞 Bug Report" about: "Report an issue to help the project improve." title: "[Bug] " labels: "Type: Bug" -assignees: a +assignees: Josee9988 --- diff --git a/.github/ISSUE_TEMPLATE/2-failing-test.md b/.github/ISSUE_TEMPLATE/2-failing-test.md index 5ef4708..a239f2a 100644 --- a/.github/ISSUE_TEMPLATE/2-failing-test.md +++ b/.github/ISSUE_TEMPLATE/2-failing-test.md @@ -3,7 +3,7 @@ name: "πŸ’‰ Failing Test" about: "Report failing tests or CI jobs." title: "[Test] " labels: "Type: Test" -assignees: a +assignees: Josee9988 --- diff --git a/.github/ISSUE_TEMPLATE/3-docs-bug.md b/.github/ISSUE_TEMPLATE/3-docs-bug.md index 501a522..f987493 100644 --- a/.github/ISSUE_TEMPLATE/3-docs-bug.md +++ b/.github/ISSUE_TEMPLATE/3-docs-bug.md @@ -3,7 +3,7 @@ name: "πŸ“š Documentation or README.md issue report" about: "Report an issue in the project's documentation or README.md file." title: "" labels: "Documentation" -assignees: a +assignees: Josee9988 --- # **πŸ“š Documentation Issue Report** diff --git a/.github/ISSUE_TEMPLATE/4-feature-request.md b/.github/ISSUE_TEMPLATE/4-feature-request.md index ae991b7..33ecf94 100644 --- a/.github/ISSUE_TEMPLATE/4-feature-request.md +++ b/.github/ISSUE_TEMPLATE/4-feature-request.md @@ -3,7 +3,7 @@ name: "πŸš€πŸ†• Feature Request" about: "Suggest an idea or possible new feature for this project." title: "" labels: "Type: Feature" -assignees: a +assignees: Josee9988 --- diff --git a/.github/ISSUE_TEMPLATE/5-enhancement-request.md b/.github/ISSUE_TEMPLATE/5-enhancement-request.md index c7797ac..2b29bd5 100644 --- a/.github/ISSUE_TEMPLATE/5-enhancement-request.md +++ b/.github/ISSUE_TEMPLATE/5-enhancement-request.md @@ -3,7 +3,7 @@ name: "πŸš€βž• Enhancement Request" about: "Suggest an enhancement for this project. Improve an existing feature" title: "" labels: "Type: Enhancement" -assignees: a +assignees: Josee9988 --- diff --git a/.github/ISSUE_TEMPLATE/6-security-report.md b/.github/ISSUE_TEMPLATE/6-security-report.md index 77dad56..81f6fef 100644 --- a/.github/ISSUE_TEMPLATE/6-security-report.md +++ b/.github/ISSUE_TEMPLATE/6-security-report.md @@ -3,7 +3,7 @@ name: "⚠️ Security Report" about: "Report an issue to help the project improve." title: "" labels: "Type: Security" -assignees: a +assignees: Josee9988 --- @@ -25,7 +25,7 @@ certain personal information or involves personal identifiable data, or you beli that the data that you might leak by exposing the way on how to attack the project could be considered as a data leak or could violate the privacy of any kind of data or sensible data, please do not post it here and directly email the developer: -(c). You should post the issue with the least amount of +(jgracia9988@gmail.com). You should post the issue with the least amount of sensible or private data as possible to help us manage the security issue, and with the extra data sent from your email to the developer (if any), we will deeply analyze and try to fix it as fast as possible. diff --git a/.github/ISSUE_TEMPLATE/7-question-support.md b/.github/ISSUE_TEMPLATE/7-question-support.md index 6178458..ec98c81 100644 --- a/.github/ISSUE_TEMPLATE/7-question-support.md +++ b/.github/ISSUE_TEMPLATE/7-question-support.md @@ -3,7 +3,7 @@ name: "❓ Question or Support Request" about: "Questions and requests for support." title: "" labels: "Type: Question" -assignees: a +assignees: Josee9988 --- diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index a30ea40..a053b0d 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: true contact_links: - name: Send an e-mail the developer - url: mailto:c + url: mailto:jgracia9988@gmail.com about: Please do NOT use this email to post issues or feature requests (only important business/personal contact). diff --git a/.github/SECURITY.md b/.github/SECURITY.md index a944e03..30a193d 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -8,6 +8,6 @@ To report a security issue, go to the project's issues and create a new issue us Read carefully the instructions of this issue template, and if your report could leak data or might expose how to gain access to a restricted area or break the system, -please email [c](mailto:c) and include the word "SECURITY" in the subject line. +please email [jgracia9988@gmail.com](mailto:jgracia9988@gmail.com) and include the word "SECURITY" in the subject line. We'll endeavour to respond quickly, and will keep you updated throughout the process. diff --git a/.github/config.yml b/.github/config.yml index 417f4d8..1e537f7 100644 --- a/.github/config.yml +++ b/.github/config.yml @@ -2,7 +2,7 @@ # Comment to be posted to on first time issues newIssueWelcomeComment: > - Thanks for opening your first issue in a/project-template! Be sure to follow the issue template and provide every bit of information to help the developers! + Thanks for opening your first issue in Josee9988/project-template! Be sure to follow the issue template and provide every bit of information to help the developers! # Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome diff --git a/.gitignore b/.gitignore index e114e53..49c69d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -###> a/b ### +###> Josee9988/project-template ### # Folders .vscode/ @@ -13,4 +13,4 @@ ignore.* .env.test *.pem -###< a/b ### +###< Josee9988/project-template ### diff --git a/CHANGELOG.md b/CHANGELOG.md index a9bc506..03f1f20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,252 @@ # **Change Log** πŸ“œπŸ“ -All notable changes to the "**b**" c will be documented in this file. +All notable changes to the "**Project template**" repository will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). --- -## [**0.0.1**] - 2021-07-08 +## [**1.7.2**] - 2021-07-08 ### Added -* The basic project structure from **[josee9988/project-template](https://github.com/Josee9988/project-template)**. +* Multiple new .gitignore lines and improved its comment structure. + +### Fixed + +* Minnor typo in the generated README.md + +## [**1.7.1**] - 2021-07-01 + +### Added + +* `.env` file will be ignored in the `.gitignore`. +* Disabled some markdownlint rules in the generated README.md +* Fixed some minnor errors in the README.md file + +## [**1.7.0**] - 2021-06-01 + +### Added + +* Type: Test issue label. +* Failing test issue template adds the new Type Test issue label. +* Updated README.md with the new label. + +## [**1.6.0**] - 2021-05-21 + +### Added + +* Divided the feature request into feature and enhancement request, each one with its respective labels. + +### Changed + +* Position of disclaimers and comments in the issue templates are moved to the bottom (but the security report) as some users directly erased everything to not read the text. +* Image of the issue templates in the readme.md file. + +## [**1.5.0**] - 2021-05-15 + +### Added + +* Auto-detection of user email. + +## [**1.4.5**] - 2021-04-24 + +### Added + +* Sponsor section in the project's main readme.md file. +* Improved and added documentation in the scripts. + +### Fixed + +* Readme "What does it include" fixed list of files. +* Sponsor link in the generated README.md file. +* Some typos + +## [**1.4.4**] - 2021-04-22 + +### Added + +* --help option in the script. +* More documentation and information for the user in the script prompts + +## [**1.4.3**] - 2021-04-21 + +### Added + +* Support for Github todo app. + +## [**1.4.2**] - 2021-04-20 + +### Added + +* An extra informational message in the script. +* Welcome bot and its config (.github/config.yml) + +### Fixed + +* Issue templates now auto assigns the new labels. + +## [**1.4.1**] - 2021-04-20 + +### Added + +* Security label + +### Changed + +* Project tree to its updated version. + +## [**1.4.0**] - 2021-04-19 + +### Added + +* Readme file with the section with the recommended/used bots that the users should install. +* Some informational comments in the script referencing the project's documentation. +* A total of 18 new labels will be created right when you clone your repo using Github Probot settings. + +## [**1.3.0**] - 2021-04-14 + +### Added + +* CODEOWNERS file inside the .github folder. + +### Fixed + +* Some README.md markdownlint bugs. + +## [**1.2.0**] - 2021-04-07 + +### Added + +* Bug report issue templates have the preceding "[BUG]" title. +* Multiple readme template headings (About the project, project tree, screenshots, donators). +* Improved README.md template by fixing some minor problems. + +## [**1.1.1**] - 2021-04-02 + +### Added + +* Username and project name are automatically selected (user can manually force change them using bash parameters [Username] [Project-Name]) + +### Changed + +* Asciinema video + +## [**1.1.0**] - 2021-03-31 + +### Added + +* Gitignore file ignores all \*.ignore.\* files. +* Basic README.md template. +* bin/FUNCTION_HELPERS script to improve the readability of the SETUP_TEMPLATE.sh file. + +### Changed + +* Header's emoji from the end of the README.md headers to the beginning to be shown better by the new GitHub's README table of contents. + +### Fixed + +* Git status is shown before the commit. + +### Fixed + +* Some typos in the CHANGELOG.md. + +## [**1.0.11**] - 2021-03-20 + +### Added + +* Social links of the repo in the README.md file. +* Added badges in the README.md file. +* Added sponsor link in the contributing.yml file. + +### Fixed + +* Some minor typos in the README.md file. + +## [**1.0.10**] - 2021-03-17 + +### Changed + +* `EXECUTEME.sh` script changed to `SETUP_TEMPLATE.sh`. +* Changed the execution video from the README.md file (Asciinema's video). + +## [**1.0.9**] - 2021-03-17 + +### Added + +* The script will git add and commit the new files/changes for you. + +## [**1.0.8**] - 2021-03-17 + +### Changed + +* Improved README.md structure and fixed some typos. + +### Added + +* 'Extra recommendations' section in the README.md file. + +## [**1.0.7**] - 2021-03-16 + +### Fixed + +* Some minor typos + +## [**1.0.6**] - 2021-03-16 + +### Changed + +* Simplified PR template to make it easier. + +## [**1.0.5**] - 2021-03-13 + +### Added + +* Checks to the shell script (check if the files exist) +* Colourized the output of the script. + +## [**1.0.4**] - 2021-02-26 + +### Added + +* Markdownlint disable the rule in the CHANGELOG.md file" + +## [**1.0.3**] - 2021-02-23 + +### Removed + +* Josee's funding links. + +### Added + +* Shell script now checks if the .github directory exists. + +## [**1.0.2**] - 2020-09-08 + +### Added + +* One more screenshot to the README.md file showing the community profile. +* Documentation for the SETUP_TEMPLATE.sh script. + +### Changed + +* The project tree view showing the new LICENSE file. + +## [**1.0.1**] - 2020-09-08 + +### Added + +* A LICENSE for the project will be removed with the SETUP_TEMPLATE.sh script. + +### Changed + +* The location of the pull request template to the .github/ folder. + +## [**1.0.0**] - 2020-09-08 + +### Added + +* Added a CHANGELOG.md. +* Support for the CHANGELOG in the SETUP_TEMPLATE.sh file (when run, it will remove all of the content and create a new file from scratch). diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..97d7d26 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Jose Gracia Berenguer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 8adb718..6cd70c9 100644 --- a/README.md +++ b/README.md @@ -1,97 +1,248 @@ - -# πŸ”₯ **a/b** +# πŸ”₯ **Josee9988's Github Project Template** - + + + +

--- -## πŸ€” **About the project** +## πŸ€” **What is this template all about?** -* +* This template can be used as a base layer for any of your future repositories/projects. +* Make your project easy to maintain with **8 issue templates**. +* Quickstart your documentation with personalized **readme badges** and a cool readme structure. +* Manage your issues with **20 issue labels** created just for you! +* Make your _community healthier_ with all the guides like code of conduct, contributing, support, security... +* Learn more with the [official Github guide on creating repositories from a template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). +* To start using it; "**[click use this template](https://github.com/Josee9988/project-template/generate)**", create your new repository, +* All the basic setup is made through an easy script that will auto-detect all your data to make it lightning fast! πŸ—²πŸ—² clone your new repository and execute the `SETUP_TEMPLATE.sh` shell script to personalize the files with your private details. Check how to execute it [here](https://asciinema.org/a/398761). +* All the markdown follows [MarkdownLint rules](https://github.com/DavidAnson/markdownlint). --- ## ⚑ **Installation** -* +1. To create a new repository from this template **[generate your new repository from this template](https://github.com/Josee9988/project-template/generate)** +for more information or guidance, follow the [Github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). +2. Clone your new repository **[generated from this template](https://github.com/Josee9988/project-template/generate)** and `cd` into it. +3. **Execute** the `SETUP_TEMPLATE.sh` shell script to **customize** the files with your data. + + ```bash + bash SETUP_TEMPLATE.sh # additional parameters [Username] [Project-Name] [Email] + ``` ---- + Or you can also do it like this: + + ```bash + chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE.sh # additional parameters [Username] [Project-Name] [Email] + ``` -## πŸš€ **Usage** + Additionally, watch *[this video](https://asciinema.org/a/404568)* to see **how to execute the script** or use *`bash SETUP_TEMPLATE.sh --help`* to obtain some extra information. + + If the automatic detection of the username, project name or email is NOT right, please post an issue, and you can **manually correct** them like: `bash SETUP_TEMPLATE.sh RightUsername RightProjectName RightEmail` being `$1` the new username, `$2` the new project name and `$3` the new email. -* +4. **Review** every single file and **customize** it as you like. +5. Build your project. πŸš€ + +⚠️ _Customize every file to fit your requirements_ ⚠️ --- -## 🌲 **Project tree** +## πŸ“š **What does it include?** + +1. A **`SETUP_TEMPLATE.sh`** script that **MUST be executed right when you clone your repository**. +The script will replace Jose's username and email (the author) with yours from all the. + + 1. A README template file with a default template to start documenting your project. (it includes personalized badges and text with your project details) + 1. A CHANGELOG template file based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). + 1. An [issue_label_bot.yaml](/.github/issue_label_bot.yaml) file to use the issue adder Github bot. [Activate it or check its documentation](https://github.com/marketplace/issue-label-bot). + 1. A [config.yml](/.github/config.yml) file to modify multiple bot's behaviours. + 1. A [settings.yml](/.github/settings.yml) file to use the popular settings Github bot. [Activate it or check its documentation](https://probot.github.io/apps/settings/). + 1. A [CONTRIBUTING](/.github/CONTRIBUTING.md) explaining how to contribute to the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/setting-guidelines-for-repository-contributors). + 1. A [SUPPORT](/.github/SUPPORT.md) explaining how to support the project. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-support-resources-to-your-project). + 1. A [SECURITY](/.github/SECURITY.md) with a guide on how to post a security issue. [Learn more with the Github guide](https://docs.github.com/es/github/managing-security-vulnerabilities/adding-a-security-policy-to-your-repository). + 1. A [CODEOWNERS](/.github/CODEOWNERS) with the new user as the main owner. [Learn more with the Github guide](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners). + 1. A [CODE_OF_CONDUCT](/.github/CODE_OF_CONDUCT.md) with a basic code of conduct. [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/adding-a-code-of-conduct-to-your-project). + 1. A [PULL_REQUEST_TEMPLATE](/.github/pull_request_template.md) with a template for your pull request that closes issues with keywords. [Learn more with the Github guide](https://docs.github.com/es/github/building-a-strong-community/creating-a-pull-request-template-for-your-repository). + 1. Multiple [issues templates](/.github/ISSUE_TEMPLATE). [Learn more with the Github guide](https://docs.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository). + 1. A [config.yml](/.github/ISSUE_TEMPLATE/config.yml) with the config and information about the issue templates. + 1. A [Blank issue template](/.github/ISSUE_TEMPLATE) with the super basic stuff, all the issues should contain. + 1. A [Bug issue template](/.github/ISSUE_TEMPLATE/1-bug-report.md). + 1. A [Failing test issue template](/.github/ISSUE_TEMPLATE/2-failing-test.md). + 1. A [Documentation issue template](/.github/ISSUE_TEMPLATE/3-docs-bug.md). + 1. A [Feature request issue template](/.github/ISSUE_TEMPLATE/4-feature-request.md). + 1. A [Security report issue template](/.github/ISSUE_TEMPLATE/5-security-report.md). + 1. A [Question or support issue template](/.github/ISSUE_TEMPLATE/6-question-support.md). - +--- + +### 🌲 **Project tree** + +Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not shown! πŸ™ˆ + +```text +. +β”œβ”€β”€ CHANGELOG.md +β”œβ”€β”€ .github +β”‚Β Β  β”œβ”€β”€ CODE_OF_CONDUCT.md +β”‚Β Β  β”œβ”€β”€ CODEOWNERS +β”‚Β Β  β”œβ”€β”€ CONTRIBUTING.md +β”‚Β Β  β”œβ”€β”€ FUNDING.yml +β”‚Β Β  β”œβ”€β”€ issue_label_bot.yaml +β”‚Β Β  β”œβ”€β”€ config.yml +β”‚Β Β  β”œβ”€β”€ ISSUE_TEMPLATE +β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 1-bug-report.md +β”‚ β”‚ β”œβ”€β”€ 2-failing-test.md +β”‚ β”‚ β”œβ”€β”€ 3-docs-bug.md +β”‚ β”‚ β”œβ”€β”€ 4-feature-request.md +β”‚ β”‚ β”œβ”€β”€ 5-enhancement-request.md +β”‚ β”‚ β”œβ”€β”€ 6-security-report.md +β”‚ β”‚ β”œβ”€β”€ 7-question-support.md +β”‚ β”‚ └── config.yml +β”‚Β Β  β”œβ”€β”€ ISSUE_TEMPLATE.md +β”‚Β Β  β”œβ”€β”€ pull_request_template.md +β”‚Β Β  β”œβ”€β”€ SECURITY.md +β”‚Β Β  β”œβ”€β”€ settings.yml +β”‚Β Β  └── SUPPORT.md +β”œβ”€β”€ .gitignore +└── README.md + +2 directories, 21 files +``` --- ## πŸ“ **Additional notes** -* +* After **[generating your new repo with this template](https://github.com/Josee9988/project-template/generate)**, make sure to, right after you clone it, run the script `SETUP_TEMPLATE.sh`. + +* Then you will be presented with all the files modified with your project details and information. It is very important to **manually review every file** to check if it fits your requirements and performs any necessary changes to customize the project as you want. + +* If you are using **Windows** and you don't know how to execute the `SETUP_TEMPLATE.sh` script: + 1. Install **[git for Windows](https://git-scm.com/download/win)**. + 2. Right-click on the git repository folder and click "*git bash here*". + 3. Then just perform *`bash SETUP_TEMPLATE.sh`* **or** *`chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE.sh`*. + +### πŸ€– **Used Github bots** + +These are recommended bots that are prepared and configured for this template. If you install them your coding experience will probably be much better. +We deeply recommend at least installing the [issue label bot](https://github.com/marketplace/issue-label-bot) as this bot is the one that adds all the labels used in the issue templates. + +1. The `issue_label_bot.yaml` file depends on the **[issue label bot](https://github.com/marketplace/issue-label-bot)**. +2. The `settings.yml` file depends on the **[settings label bot](https://probot.github.io/apps/settings/)**. +3. The `config.yml` file depends on the bot **[welcome bot](https://probot.github.io/apps/welcome/)** and **[todo bot](https://probot.github.io/apps/todo/)** --- ## πŸ“Έ **Screenshots** - +A couple of screenshots to delight you before you use this template. ---- +### πŸ”Ί All the issue templates -## 🍰 **Supporters and donators** +

+ All the issue templates. +

-We are currently looking for new donators to help and maintain this project! ❀️ +### πŸ”» An issue template opened -By donating, you will help the development of this project, and *you will be featured in this b's README.md* so everyone can see your kindness and visit your content ⭐. +

+ Bug issue template opened. +

- - - +### πŸ“˜ The README template - +Badges and texts will be replaced with your project details! ---- +

+ README.md template. + + Or watch [this video](https://gifs.com/gif/josee9988-s-readme-md-MwO5E3) to see the whole README template. +

-b was generated from *[Josee9988/project-template](https://github.com/Josee9988/project-template)* πŸ“š +### πŸ”– The labels for your issues ---- +If the bot [probot-settings](https://probot.github.io/apps/settings/) is not installed you will not have these beautiful labels! (there are actually 1 more issue label than in the screenshot!) + +

+ LABELS +

-## πŸ•΅οΈ Extra recommendations +### πŸ“ The CHANGELOG template -* +(project name and project type will be replaced with yours) + +

+ CHANGELOG.md template. +

+ +### πŸ›‘οΈ Security policy + +

+ Security issue. +

+ +### πŸ’Ό Community profile at 100% + +

+ Community profile. +

--- -## πŸŽ‰ Was the c helpful? Help us raise these numbers up +## πŸ•΅οΈ **Extra recommendations** -[![Github followers](https://img.shields.io/github/followers/a.svg?style=social)](https://github.com/a) -[![Github stars](https://img.shields.io/github/stars/a/b.svg?style=social)](https://github.com/a/b/stargazers) -[![Github watchers](https://img.shields.io/github/watchers/a/b.svg?style=social)](https://github.com/a/b/watchers) -[![Github forks](https://img.shields.io/github/forks/a/b.svg?style=social)](https://github.com/a/b/network/members) - -[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=github-sponsors&color=red&style=social)](https://github.com/sponsors/a) +For the right maintenance of the CHANGELOG.md, we recommend this [VSCode extension](https://github.com/Josee9988/Changelog-and-Markdown-snippets) +and the read and understanding of the [keep a changelog guide](https://keepachangelog.com/en/1.0.0/). +Read and comment about it in this [dev.to post](https://dev.to/josee9988/the-ultimate-github-project-template-1264). +We also recommend installing all the [used bots](https://github.com/Josee9988/project-template#-used-github-bots). -Enjoy! πŸ˜ƒ +## πŸ’‰ **Project tests** + +If you want to improve the development of this project, you must, after changing or improving whatever run the project's tests to prove that they are working. + +To do so: + +```bash +bash tests/TESTS_RUNNER.sh +``` --- -## βš–οΈπŸ“ **License and Changelog** +## 🍰 **Supporters and donators** -See the license in the '**[LICENSE](LICENSE)**' file. +We are currently looking for new donators to help and maintain this project! ❀️ -Watch the changes in the '**[CHANGELOG.md](CHANGELOG.md)**' file. +By donating, you will help the development of this project, and *you will be featured in this project's README.md* so everyone can see your kindness and visit your content ⭐. + + + + --- -_Made with a lot of ❀️❀️ by **[@a](https://github.com/a)**_ +## πŸŽ‰ Was the template helpful? Help us raise these numbers up + +[![Github followers](https://img.shields.io/github/followers/Josee9988.svg?style=social)](https://github.com/Josee9988) +[![Github stars](https://img.shields.io/github/stars/Josee9988/project-template.svg?style=social)](https://github.com/Josee9988/project-template/stargazers) +[![Github watchers](https://img.shields.io/github/watchers/Josee9988/project-template.svg?style=social)](https://github.com/Josee9988/project-template/watchers) +[![Github forks](https://img.shields.io/github/forks/Josee9988/project-template.svg?style=social)](https://github.com/Josee9988/project-template/network/members) + +Enjoy! πŸ˜ƒ + +> ⚠️Remember that this template should be reviewed and modified to fit your requirements. +> The script **SETUP_TEMPLATE.sh** should be executed right when you clone your new repository. +> There will be files that will need *manual revision*⚠️ + +_Made with a lot of ❀️❀️ by **[@Josee9988](https://github.com/Josee9988)**_ diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index 83bd655..e78e92b 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -61,24 +61,14 @@ else NEW_EMAIL=$3 fi +###### START OF THE SCRIPT ###### echo -e "Thanks for using ${GREEN}Josee9988/project-template${NC}" echo -e "Read carefully all the documentation before you continue executing this script: ${UPurple}https://github.com/Josee9988/project-template${NC}\n" - -if [ -z "$4" ]; then # if the project's type has been manually specified - read -p "Enter $(echo -e "$BBLUE""what your project is""$NC") (program/extension/API/web/CLI tool/backend/frontend/scrapper/automation tool/etc): " PROJECT_TYPE -else - PROJECT_TYPE=$3 -fi - -if [ -z "$4" ]; then # if the ignore option for tests has been specified - read -p "Is this data correct: username \"$(echo -e "$GREEN""$NEW_USERNAME""$NC")\", email: \"$(echo -e "$GREEN""$NEW_EMAIL""$NC")\", project name: \"$(echo -e "$GREEN""$PROJECT_NAME""$NC")\", of type: \"$(echo -e "$GREEN""$PROJECT_TYPE""$NC")\" (y/n)? " choice -else - choice="y" -fi - -###### START OF THE SCRIPT ###### +# prompt for the, mail and type of the project +read -p "Enter $(echo -e "$BBLUE""what your project is""$NC") (program/extension/API/web/CLI tool/backend/frontend/scrapper/automation tool/etc): " PROJECT_TYPE # confirm that the data is correct +read -p "Is this data correct: username \"$(echo -e "$GREEN""$NEW_USERNAME""$NC")\", email: \"$(echo -e "$GREEN""$NEW_EMAIL""$NC")\", project name: \"$(echo -e "$GREEN""$PROJECT_NAME""$NC")\", of type: \"$(echo -e "$GREEN""$PROJECT_TYPE""$NC")\" (y/n)? " choice case "$choice" in y | Y) center "Setting everything up for you ;)" diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh new file mode 100644 index 0000000..368005c --- /dev/null +++ b/bin/FUNCTION_HELPERS.sh @@ -0,0 +1,191 @@ +#!/bin/bash + +#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# +# PURPOSE: Secondary (helper) script that is called by the main SETUP_TEMPLATE.sh file by +# obtaining some functions to better modularize the code. +# TITLE: FUNCTION_HELPERS +# AUTHOR: Jose Gracia +# VERSION: See in CHANGELOG.md +# NOTES: This script will auto remove itself, and in case of wanting to run it again, the user must download +# it again or do a 'git stash' and revert the changes. +# BASH_VERSION: 5.0.17(1)-release +# LICENSE: see in ../LICENSE (project root) or https://github.com/Josee9988/project-template/blob/master/LICENSE +# GITHUB: https://github.com/Josee9988/ +# REPOSITORY: https://github.com/Josee9988/project-template +# ISSUES: https://github.com/Josee9988/project-template/issues +# MAIL: jgracia9988@gmail.com +#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# + +# SCRIPT WITH EXPORTED FUNCTIONS AND VARIABLES USED IN THE MAIN SETUP_TEMPLATE +RED='\033[1;31m' +NC='\033[0m' # No Color +UPurple='\033[4;35m' +BBLUE='\033[1;34m' + +# Function that centers a text in the terminal +center() { + term_width="$(tput cols)" + padding="$(printf '%0.1s' ={1..500})" + echo -e "\n\n${BBLUE}$(printf '%*.*s %s %*.*s\n' 0 "$(((term_width - 2 - ${#1}) / 2))" "$padding" "$1" 0 "$(((term_width - 1 - ${#1}) / 2))" "$padding")${NC}\n" +} + +checkFiles() { + ### Check if the .github directory does exist ### + if [ ! -d ".github/" ] || [ ! -d ".github/ISSUE_TEMPLATE" ]; then + echo -e "${RED}Directory .github/ DOES NOT EXIST WITH ALL THE FILES NEEDED.${NC}" + displayErrorInstructions + exit 1 # exit with error code 1 + fi + + ### Checks if the root files exist and some extra important files ### + if [ ! -f "CHANGELOG.md" ] || [ ! -f "README.md" ] || [ ! -f ".gitignore" ] || [ ! -f "LICENSE" ] || [ ! -f ".github/settings.yml" ] || [ ! -f ".github/pull_request_template.md" ] || [ ! -f ".github/ISSUE_TEMPLATE/1-bug-report.md" ] || [ ! -f ".github/ISSUE_TEMPLATE/config.yml" ]; then + echo -e "${RED}The script couldn't find one or many of the template main files${NC}." + displayErrorInstructions + exit 1 # exit with error code 1 + fi +} + +displayErrorInstructions() { + echo -e "${RED}There are files missing! Have you modified the repository before executing this command?${NC}" + echo -e "\nYou should try to 'git stash' your changes and execute this script from the project root again, or clone again the repository (the template) without any changes.\n" + echo -e "For more information visit: ${UPurple}https://github.com/Josee9988/project-template${NC}" + echo -e "If you think this may be an issue please post it at: ${UPurple}https://github.com/Josee9988/project-template/issues${NC}" +} + +helpCommand() { + if [[ "$1" == *"--help" ]] || [[ "$1" == *"-h" ]]; then # if the user specified help command + displayHelpTexts + exit 0 + fi +} + +displayHelpTexts() { + center "User help" + echo -e "Script usage: ${BBLUE}$0 [Username] [Project-Name] [Email]${NC} (The project name should not contain spaces)${NC}\n" + echo "Arguments of username, project-name and email are automatically gathered from your git repository and git config, so they are optional in case they are not detected correctly." + echo -e "Make sure you have ${BBLUE}read the documentation before executing${NC} this script: ${UPurple}https://github.com/Josee9988/project-template${NC}" + echo -e "If you have any questions or if any issue is found, please make sure to report it at: ${UPurple}https://github.com/Josee9988/project-template/issues${NC}" +} + +writeREADME() { + PROJECT_NAME_PARSED=${PROJECT_NAME/-/ } + bash -c "NEW_USERNAME='NEW_USERNAME' PROJECT_NAME='PROJECT_NAME' PROJECT_TYPE='PROJECT_TYPE'; cat << EOF > README.md + + +# πŸ”₯ **$NEW_USERNAME/$PROJECT_NAME** + + + +--- + +## πŸ€” **About the project** + +* + +--- + +## ⚑ **Installation** + +* + +--- + +## πŸš€ **Usage** + +* + +--- + +## 🌲 **Project tree** + + + +--- + +## πŸ“ **Additional notes** + +* + +--- + +## πŸ“Έ **Screenshots** + + + +--- + +## 🍰 **Supporters and donators** + +We are currently looking for new donators to help and maintain this project! ❀️ + +By donating, you will help the development of this project, and *you will be featured in this $PROJECT_NAME's README.md* so everyone can see your kindness and visit your content ⭐. + + + + + + + +--- + +$PROJECT_NAME was generated from *[Josee9988/project-template](https://github.com/Josee9988/project-template)* πŸ“š + +--- + +## πŸ•΅οΈ Extra recommendations + +* + +--- + +## πŸŽ‰ Was the $PROJECT_TYPE helpful? Help us raise these numbers up + +[![Github followers](https://img.shields.io/github/followers/$NEW_USERNAME.svg?style=social)](https://github.com/$NEW_USERNAME) +[![Github stars](https://img.shields.io/github/stars/$NEW_USERNAME/$PROJECT_NAME.svg?style=social)](https://github.com/$NEW_USERNAME/$PROJECT_NAME/stargazers) +[![Github watchers](https://img.shields.io/github/watchers/$NEW_USERNAME/$PROJECT_NAME.svg?style=social)](https://github.com/$NEW_USERNAME/$PROJECT_NAME/watchers) +[![Github forks](https://img.shields.io/github/forks/$NEW_USERNAME/$PROJECT_NAME.svg?style=social)](https://github.com/$NEW_USERNAME/$PROJECT_NAME/network/members) + +[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=github-sponsors&color=red&style=social)](https://github.com/sponsors/$NEW_USERNAME) + +Enjoy! πŸ˜ƒ + +--- + +## βš–οΈπŸ“ **License and Changelog** + +See the license in the '**[LICENSE](LICENSE)**' file. + +Watch the changes in the '**[CHANGELOG.md](CHANGELOG.md)**' file. + +--- + +_Made with a lot of ❀️❀️ by **[@$NEW_USERNAME](https://github.com/$NEW_USERNAME)**_ +EOF" +} + +writeCHANGELOG() { + ACTUAL_DATE=$(date '+%Y-%m-%d') + bash -c "PROJECT_NAME='PROJECT_NAME' PROJECT_TYPE='PROJECT_TYPE' ACTUAL_DATE='ACTUAL_DATE'; cat << EOF > CHANGELOG.md + +# **Change Log** πŸ“œπŸ“ + +All notable changes to the \"**$PROJECT_NAME**\" $PROJECT_TYPE will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +--- + +## [**0.0.1**] - $ACTUAL_DATE + +### Added + +* The basic project structure from **[josee9988/project-template](https://github.com/Josee9988/project-template)**. +EOF" +} From 40f64d6936b2c5fd3b7d28a294b7bc5486f83fe3 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Jul 2021 13:43:45 +0200 Subject: [PATCH 136/152] "added a 4th argument for the tests" --- SETUP_TEMPLATE.sh | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index e78e92b..8180472 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -28,6 +28,7 @@ UPurple='\033[4;35m' BBLUE='\033[1;34m' GREEN='\033[1;32m' FILE_FUNCTION_HELPERS=bin/FUNCTION_HELPERS.sh +OMIT_STR="--omit-commit-and-confirmation" if [ ! -f "$FILE_FUNCTION_HELPERS" ]; then # check if the function helpers file is not found echo -e "${RED}Can not find ${FILE_FUNCTION_HELPERS}" @@ -61,14 +62,19 @@ else NEW_EMAIL=$3 fi -###### START OF THE SCRIPT ###### echo -e "Thanks for using ${GREEN}Josee9988/project-template${NC}" echo -e "Read carefully all the documentation before you continue executing this script: ${UPurple}https://github.com/Josee9988/project-template${NC}\n" -# prompt for the, mail and type of the project -read -p "Enter $(echo -e "$BBLUE""what your project is""$NC") (program/extension/API/web/CLI tool/backend/frontend/scrapper/automation tool/etc): " PROJECT_TYPE + +if [ ! $4 = "$OMIT_STR" ]; then # if the project's type has been manually specified + read -p "Enter $(echo -e "$BBLUE""what your project is""$NC") (program/extension/API/web/CLI tool/backend/frontend/scrapper/automation tool/etc): " PROJECT_TYPE + read -p "Is this data correct: username \"$(echo -e "$GREEN""$NEW_USERNAME""$NC")\", email: \"$(echo -e "$GREEN""$NEW_EMAIL""$NC")\", project name: \"$(echo -e "$GREEN""$PROJECT_NAME""$NC")\", of type: \"$(echo -e "$GREEN""$PROJECT_TYPE""$NC")\" (y/n)? " choice +else + choice="y" +fi + +###### START OF THE SCRIPT ###### # confirm that the data is correct -read -p "Is this data correct: username \"$(echo -e "$GREEN""$NEW_USERNAME""$NC")\", email: \"$(echo -e "$GREEN""$NEW_EMAIL""$NC")\", project name: \"$(echo -e "$GREEN""$PROJECT_NAME""$NC")\", of type: \"$(echo -e "$GREEN""$PROJECT_TYPE""$NC")\" (y/n)? " choice case "$choice" in y | Y) center "Setting everything up for you ;)" @@ -85,11 +91,14 @@ y | Y) writeCHANGELOG # write the basic structure of the CHANGELOG.md echo -e "# add your own funding links" >.github/FUNDING.yml # remove author's custom funding links - git add CHANGELOG.md README.md .gitignore .github SETUP_TEMPLATE.sh LICENSE bin # commit the new files - git -c color.status=always status | less -REX # show git status with colours - echo -e "Committing the changes for you :)\n" - git commit -m "Set up '@Josee9988/project-template' template: Personalized files by executing the SETUP_TEMPLATE.sh script.πŸš€" - echo -e "\nRemember to review every file and customize it as you like.\nYou are ready to start your brand new awesome projectπŸš€πŸš€." + if [ ! "$4" = "$OMIT_STR" ]; then # if the ignore option for tests has been specified + git add CHANGELOG.md README.md .gitignore .github SETUP_TEMPLATE.sh LICENSE bin # commit the new files + git -c color.status=always status | less -REX # show git status with colours + echo -e "Committing the changes for you :)\n" + git commit -m "Set up '@Josee9988/project-template' template: Personalized files by executing the SETUP_TEMPLATE.sh script.πŸš€" + echo -e "\nRemember to review every file and customize it as you like.\nYou are ready to start your brand new awesome projectπŸš€πŸš€." else + fi + # self remove this script rm -- "$0" ;; From fe02d20d3f44d1dba2e5490d2349c2afc4534da5 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Jul 2021 13:44:15 +0200 Subject: [PATCH 137/152] "some fixes" --- SETUP_TEMPLATE.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index 8180472..6e03f74 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -27,8 +27,8 @@ NC='\033[0m' # No Color UPurple='\033[4;35m' BBLUE='\033[1;34m' GREEN='\033[1;32m' -FILE_FUNCTION_HELPERS=bin/FUNCTION_HELPERS.sh OMIT_STR="--omit-commit-and-confirmation" +FILE_FUNCTION_HELPERS=bin/FUNCTION_HELPERS.sh if [ ! -f "$FILE_FUNCTION_HELPERS" ]; then # check if the function helpers file is not found echo -e "${RED}Can not find ${FILE_FUNCTION_HELPERS}" @@ -65,7 +65,7 @@ fi echo -e "Thanks for using ${GREEN}Josee9988/project-template${NC}" echo -e "Read carefully all the documentation before you continue executing this script: ${UPurple}https://github.com/Josee9988/project-template${NC}\n" -if [ ! $4 = "$OMIT_STR" ]; then # if the project's type has been manually specified +if [ ! "$4" = "$OMIT_STR" ]; then # if the project's type has been manually specified read -p "Enter $(echo -e "$BBLUE""what your project is""$NC") (program/extension/API/web/CLI tool/backend/frontend/scrapper/automation tool/etc): " PROJECT_TYPE read -p "Is this data correct: username \"$(echo -e "$GREEN""$NEW_USERNAME""$NC")\", email: \"$(echo -e "$GREEN""$NEW_EMAIL""$NC")\", project name: \"$(echo -e "$GREEN""$PROJECT_NAME""$NC")\", of type: \"$(echo -e "$GREEN""$PROJECT_TYPE""$NC")\" (y/n)? " choice else From 8cb87831b4abc294a9165162f00e0156176b129c Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Jul 2021 14:02:46 +0200 Subject: [PATCH 138/152] "improved and prepared all the folders for the tests" --- SETUP_TEMPLATE.sh | 2 +- bin/FUNCTION_HELPERS.sh | 4 ++-- tests/TESTS_RUNNER.sh | 4 ++-- tests/project_scaffolding.sh | 24 ++++++++++++++++-------- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index 6e03f74..65f0719 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -86,7 +86,7 @@ y | Y) rm LICENSE # remove the license rm -r bin/ # remove the bin folder - rm -r tests/ # remove the tests folder + rm -r tests/ 2>/dev/null || : # remove the tests folder writeREADME # write the new README.md writeCHANGELOG # write the basic structure of the CHANGELOG.md echo -e "# add your own funding links" >.github/FUNDING.yml # remove author's custom funding links diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh index 368005c..5cbc1f8 100644 --- a/bin/FUNCTION_HELPERS.sh +++ b/bin/FUNCTION_HELPERS.sh @@ -31,14 +31,14 @@ center() { checkFiles() { ### Check if the .github directory does exist ### - if [ ! -d ".github/" ] || [ ! -d ".github/ISSUE_TEMPLATE" ]; then + if [ ! -d ".github/" ] && [ ! -d ".github/ISSUE_TEMPLATE" ]; then echo -e "${RED}Directory .github/ DOES NOT EXIST WITH ALL THE FILES NEEDED.${NC}" displayErrorInstructions exit 1 # exit with error code 1 fi ### Checks if the root files exist and some extra important files ### - if [ ! -f "CHANGELOG.md" ] || [ ! -f "README.md" ] || [ ! -f ".gitignore" ] || [ ! -f "LICENSE" ] || [ ! -f ".github/settings.yml" ] || [ ! -f ".github/pull_request_template.md" ] || [ ! -f ".github/ISSUE_TEMPLATE/1-bug-report.md" ] || [ ! -f ".github/ISSUE_TEMPLATE/config.yml" ]; then + if [ ! -f "CHANGELOG.md" ] && [ ! -f "README.md" ] && [ ! -f ".gitignore" ] && [ ! -f "LICENSE" ] && [ ! -f ".github/settings.yml" ] && [ ! -f ".github/pull_request_template.md" ] && [ ! -f ".github/ISSUE_TEMPLATE/1-bug-report.md" ] && [ ! -f ".github/ISSUE_TEMPLATE/config.yml" ]; then echo -e "${RED}The script couldn't find one or many of the template main files${NC}." displayErrorInstructions exit 1 # exit with error code 1 diff --git a/tests/TESTS_RUNNER.sh b/tests/TESTS_RUNNER.sh index a0cb94d..41c5f4a 100755 --- a/tests/TESTS_RUNNER.sh +++ b/tests/TESTS_RUNNER.sh @@ -2,9 +2,9 @@ # ADD AS MANY LINES AS TESTS FILE YOU HAVE TO RUN THEM ALL -mkdir -p tests/.tests_trash/ +mkdir -p tests/.ignore.tests_trash echo -e "\n\n--------------------------------\nrunning ./tests/project_scaffolding.sh" ./tests/project_scaffolding.sh -rm -r tests/.tests_trash +#rm -r tests/.ignore.tests_trash diff --git a/tests/project_scaffolding.sh b/tests/project_scaffolding.sh index f12f365..bb5611f 100755 --- a/tests/project_scaffolding.sh +++ b/tests/project_scaffolding.sh @@ -1,18 +1,26 @@ #! /bin/bash # file: examples/arguments_test.sh -TESTS_TRASH_DIR="tests/.tests_trash" +TESTS_TRASH_DIR="tests/.ignore.tests_trash" +USERNAME="FAKE_USERNAME_TESTS" +NAME="FAKE_NAME_TESTS" +MAIL="FAKE_EMAIL_TESTS" +OMIT_STR="--omit-commit-and-confirmation" cp -r * $TESTS_TRASH_DIR --copy-content 2>/dev/null || : cp -r .github/ $TESTS_TRASH_DIR --copy-contents cp -r bin/ $TESTS_TRASH_DIR --copy-contents -rm -r $TESTS_TRASH_DIR/tests/ +cp .gitignore $TESTS_TRASH_DIR --copy-contents +rm -r $TESTS_TRASH_DIR/tests/ 2>/dev/null || : rm -r $TESTS_TRASH_DIR/.git/ 2>/dev/null || : -#cd "tests/.tests_trash" || exit # TESTS suite() { + cd $TESTS_TRASH_DIR || exit + + bash SETUP_TEMPLATE.sh $USERNAME $NAME $MAIL $OMIT_STR + suite_addTest testDotGithubFolder suite_addTest testDotGithubISSUE_TEMPLATE suite_addTest testDotGithubISSUE_TEMPLATEFiles @@ -22,7 +30,7 @@ suite() { testDotGithubFolder() { githubFolderFound=0 - if [ -e "$TESTS_TRASH_DIR/.github/" ]; then + if [ -e ".github/" ]; then githubFolderFound=1 fi assertEquals 1 $githubFolderFound @@ -31,7 +39,7 @@ testDotGithubFolder() { testDotGithubISSUE_TEMPLATE() { folderFound=0 - if [ -e "$TESTS_TRASH_DIR/.github/ISSUE_TEMPLATE" ]; then + if [ -e ".github/ISSUE_TEMPLATE" ]; then folderFound=1 fi assertEquals 1 $folderFound @@ -39,7 +47,7 @@ testDotGithubISSUE_TEMPLATE() { testDotGithubISSUE_TEMPLATEFiles() { filesFound=0 - if [ -e "$TESTS_TRASH_DIR/.github/ISSUE_TEMPLATE/1-bug-report.md" ] && [ -e "$TESTS_TRASH_DIR/.github/ISSUE_TEMPLATE/2-failing-test.md" ] && [ -e "$TESTS_TRASH_DIR/.github/ISSUE_TEMPLATE/3-docs-bug.md" ] && [ -e "$TESTS_TRASH_DIR/.github/ISSUE_TEMPLATE/4-feature-request.md" ] && [ -e "$TESTS_TRASH_DIR/.github/ISSUE_TEMPLATE/5-enhancement-request.md" ] && [ -e "$TESTS_TRASH_DIR/.github/ISSUE_TEMPLATE/6-security-report.md" ] && [ -e "$TESTS_TRASH_DIR/.github/ISSUE_TEMPLATE/7-question-support.md" ] && [ -e "$TESTS_TRASH_DIR/.github/ISSUE_TEMPLATE/config.yml" ]; then + if [ -e ".github/ISSUE_TEMPLATE/1-bug-report.md" ] && [ -e ".github/ISSUE_TEMPLATE/2-failing-test.md" ] && [ -e ".github/ISSUE_TEMPLATE/3-docs-bug.md" ] && [ -e ".github/ISSUE_TEMPLATE/4-feature-request.md" ] && [ -e ".github/ISSUE_TEMPLATE/5-enhancement-request.md" ] && [ -e ".github/ISSUE_TEMPLATE/6-security-report.md" ] && [ -e ".github/ISSUE_TEMPLATE/7-question-support.md" ] && [ -e ".github/ISSUE_TEMPLATE/config.yml" ]; then filesFound=1 fi assertEquals 1 $filesFound @@ -47,12 +55,12 @@ testDotGithubISSUE_TEMPLATEFiles() { testDotGithubFiles() { filesFound=0 - if [ -e "$TESTS_TRASH_DIR/.github/CODEOWNERS" ] && [ -e "$TESTS_TRASH_DIR/.github/CODE_OF_CONDUCT.md" ] && [ -e "$TESTS_TRASH_DIR/.github/CONTRIBUTING.md" ] && [ -e "$TESTS_TRASH_DIR/.github/ISSUE_TEMPLATE.md" ] && [ -e "$TESTS_TRASH_DIR/.github/pull_request_template.md" ] && [ -e "$TESTS_TRASH_DIR/.github/SECURITY.md" ] && [ -e "$TESTS_TRASH_DIR/.github/SUPPORT.md" ] && [ -e "$TESTS_TRASH_DIR/.github/issue_label_bot.yaml" ] && [ -e "$TESTS_TRASH_DIR/.github/config.yml" ] && [ -e "$TESTS_TRASH_DIR/.github/FUNDING.yml" ] && [ -e "$TESTS_TRASH_DIR/.github/settings.yml" ]; then + if [ -e ".github/CODEOWNERS" ] && [ -e ".github/CODE_OF_CONDUCT.md" ] && [ -e ".github/CONTRIBUTING.md" ] && [ -e ".github/ISSUE_TEMPLATE.md" ] && [ -e ".github/pull_request_template.md" ] && [ -e ".github/SECURITY.md" ] && [ -e ".github/SUPPORT.md" ] && [ -e ".github/issue_label_bot.yaml" ] && [ -e ".github/config.yml" ] && [ -e ".github/FUNDING.yml" ] && [ -e ".github/settings.yml" ]; then filesFound=1 fi assertEquals 1 $filesFound } # Load and run shUnit2. -#cd "../.." || exit . tests/shunit2 +cd "../.." || exit From e9113049413019f98095f1725664d0051ef41552 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Jul 2021 15:34:17 +0200 Subject: [PATCH 139/152] "improved test structure" --- tests/TESTS_RUNNER.sh | 21 ++++-- ...ect_scaffolding.sh => custom_data_test.sh} | 28 ++++---- tests/project_scaffolding_test.sh | 68 +++++++++++++++++++ 3 files changed, 98 insertions(+), 19 deletions(-) rename tests/{project_scaffolding.sh => custom_data_test.sh} (78%) create mode 100755 tests/project_scaffolding_test.sh diff --git a/tests/TESTS_RUNNER.sh b/tests/TESTS_RUNNER.sh index 41c5f4a..7e680b4 100755 --- a/tests/TESTS_RUNNER.sh +++ b/tests/TESTS_RUNNER.sh @@ -1,10 +1,19 @@ #!/bin/bash -# ADD AS MANY LINES AS TESTS FILE YOU HAVE TO RUN THEM ALL +LGREEN='\033[0;32m' +NC='\033[0m' # No Color +TESTS_TRASH_DIR="tests/.ignore.tests_trash/" +declare -a files=("tests/project_scaffolding_test.sh" "tests/custom_data_test.sh") # all the tests -mkdir -p tests/.ignore.tests_trash +center() { + term_width="$(tput cols)" + padding="$(printf '%0.1s' +{1..500})" + echo -e "\n\n${LGREEN}$(printf '%*.*s %s %*.*s\n' 0 "$(((term_width - 2 - ${#1}) / 2))" "$padding" "$1" 0 "$(((term_width - 1 - ${#1}) / 2))" "$padding")${NC}\n" +} -echo -e "\n\n--------------------------------\nrunning ./tests/project_scaffolding.sh" -./tests/project_scaffolding.sh - -#rm -r tests/.ignore.tests_trash +for file in "${files[@]}"; do + mkdir -p tests/.ignore.tests_trash + center "TEST: running test ./$file" + ./"$file" + rm -r $TESTS_TRASH_DIR +done diff --git a/tests/project_scaffolding.sh b/tests/custom_data_test.sh similarity index 78% rename from tests/project_scaffolding.sh rename to tests/custom_data_test.sh index bb5611f..393b993 100755 --- a/tests/project_scaffolding.sh +++ b/tests/custom_data_test.sh @@ -1,5 +1,5 @@ #! /bin/bash -# file: examples/arguments_test.sh +# file: examples/custom_data_test.sh TESTS_TRASH_DIR="tests/.ignore.tests_trash" USERNAME="FAKE_USERNAME_TESTS" @@ -7,25 +7,28 @@ NAME="FAKE_NAME_TESTS" MAIL="FAKE_EMAIL_TESTS" OMIT_STR="--omit-commit-and-confirmation" -cp -r * $TESTS_TRASH_DIR --copy-content 2>/dev/null || : -cp -r .github/ $TESTS_TRASH_DIR --copy-contents -cp -r bin/ $TESTS_TRASH_DIR --copy-contents -cp .gitignore $TESTS_TRASH_DIR --copy-contents -rm -r $TESTS_TRASH_DIR/tests/ 2>/dev/null || : -rm -r $TESTS_TRASH_DIR/.git/ 2>/dev/null || : +oneTimeSetUp() { + cp -r * $TESTS_TRASH_DIR --copy-content 2>/dev/null || : + cp -r .github/ $TESTS_TRASH_DIR --copy-contents + cp -r bin/ $TESTS_TRASH_DIR --copy-contents + cp .gitignore $TESTS_TRASH_DIR --copy-contents + rm -r $TESTS_TRASH_DIR/tests/ 2>/dev/null || : + rm -r $TESTS_TRASH_DIR/.git/ 2>/dev/null || : + cd $TESTS_TRASH_DIR || exit + bash SETUP_TEMPLATE.sh $USERNAME $NAME $MAIL $OMIT_STR >/dev/null +} -# TESTS +oneTimeTearDown() { + cd "../.." || exit +} +# TESTS suite() { - cd $TESTS_TRASH_DIR || exit - - bash SETUP_TEMPLATE.sh $USERNAME $NAME $MAIL $OMIT_STR suite_addTest testDotGithubFolder suite_addTest testDotGithubISSUE_TEMPLATE suite_addTest testDotGithubISSUE_TEMPLATEFiles suite_addTest testDotGithubFiles - } testDotGithubFolder() { @@ -63,4 +66,3 @@ testDotGithubFiles() { # Load and run shUnit2. . tests/shunit2 -cd "../.." || exit diff --git a/tests/project_scaffolding_test.sh b/tests/project_scaffolding_test.sh new file mode 100755 index 0000000..b4dad54 --- /dev/null +++ b/tests/project_scaffolding_test.sh @@ -0,0 +1,68 @@ +#! /bin/bash +# file: examples/project_scaffolding_test.sh + +TESTS_TRASH_DIR="tests/.ignore.tests_trash" +USERNAME="FAKE_USERNAME_TESTS" +NAME="FAKE_NAME_TESTS" +MAIL="FAKE_EMAIL_TESTS" +OMIT_STR="--omit-commit-and-confirmation" + +oneTimeSetUp() { + cp -r * $TESTS_TRASH_DIR --copy-content 2>/dev/null || : + cp -r .github/ $TESTS_TRASH_DIR --copy-contents + cp -r bin/ $TESTS_TRASH_DIR --copy-contents + cp .gitignore $TESTS_TRASH_DIR --copy-contents + rm -r $TESTS_TRASH_DIR/tests/ 2>/dev/null || : + rm -r $TESTS_TRASH_DIR/.git/ 2>/dev/null || : + cd $TESTS_TRASH_DIR || exit + bash SETUP_TEMPLATE.sh $USERNAME $NAME $MAIL $OMIT_STR >/dev/null +} + +oneTimeTearDown() { + cd "../.." || exit +} + +# TESTS +suite() { + + suite_addTest testDotGithubFolder + suite_addTest testDotGithubISSUE_TEMPLATE + suite_addTest testDotGithubISSUE_TEMPLATEFiles + suite_addTest testDotGithubFiles +} + +testDotGithubFolder() { + githubFolderFound=0 + if [ -e ".github/" ]; then + githubFolderFound=1 + fi + assertEquals 1 $githubFolderFound + +} + +testDotGithubISSUE_TEMPLATE() { + folderFound=0 + if [ -e ".github/ISSUE_TEMPLATE" ]; then + folderFound=1 + fi + assertEquals 1 $folderFound +} + +testDotGithubISSUE_TEMPLATEFiles() { + filesFound=0 + if [ -e ".github/ISSUE_TEMPLATE/1-bug-report.md" ] && [ -e ".github/ISSUE_TEMPLATE/2-failing-test.md" ] && [ -e ".github/ISSUE_TEMPLATE/3-docs-bug.md" ] && [ -e ".github/ISSUE_TEMPLATE/4-feature-request.md" ] && [ -e ".github/ISSUE_TEMPLATE/5-enhancement-request.md" ] && [ -e ".github/ISSUE_TEMPLATE/6-security-report.md" ] && [ -e ".github/ISSUE_TEMPLATE/7-question-support.md" ] && [ -e ".github/ISSUE_TEMPLATE/config.yml" ]; then + filesFound=1 + fi + assertEquals 1 $filesFound +} + +testDotGithubFiles() { + filesFound=0 + if [ -e ".github/CODEOWNERS" ] && [ -e ".github/CODE_OF_CONDUCT.md" ] && [ -e ".github/CONTRIBUTING.md" ] && [ -e ".github/ISSUE_TEMPLATE.md" ] && [ -e ".github/pull_request_template.md" ] && [ -e ".github/SECURITY.md" ] && [ -e ".github/SUPPORT.md" ] && [ -e ".github/issue_label_bot.yaml" ] && [ -e ".github/config.yml" ] && [ -e ".github/FUNDING.yml" ] && [ -e ".github/settings.yml" ]; then + filesFound=1 + fi + assertEquals 1 $filesFound +} + +# Load and run shUnit2. +. tests/shunit2 From b385d94afda97a915f769896289d9183a5f2528c Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Jul 2021 15:48:49 +0200 Subject: [PATCH 140/152] "finished project scaffolding" --- tests/TESTS_RUNNER.sh | 2 +- tests/project_scaffolding_test.sh | 28 +++++++++++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/tests/TESTS_RUNNER.sh b/tests/TESTS_RUNNER.sh index 7e680b4..31e3771 100755 --- a/tests/TESTS_RUNNER.sh +++ b/tests/TESTS_RUNNER.sh @@ -8,7 +8,7 @@ declare -a files=("tests/project_scaffolding_test.sh" "tests/custom_data_test.sh center() { term_width="$(tput cols)" padding="$(printf '%0.1s' +{1..500})" - echo -e "\n\n${LGREEN}$(printf '%*.*s %s %*.*s\n' 0 "$(((term_width - 2 - ${#1}) / 2))" "$padding" "$1" 0 "$(((term_width - 1 - ${#1}) / 2))" "$padding")${NC}\n" + echo -e "\n${LGREEN}$(printf '%*.*s %s %*.*s\n' 0 "$(((term_width - 2 - ${#1}) / 2))" "$padding" "$1" 0 "$(((term_width - 1 - ${#1}) / 2))" "$padding")${NC}" } for file in "${files[@]}"; do diff --git a/tests/project_scaffolding_test.sh b/tests/project_scaffolding_test.sh index b4dad54..2e1526b 100755 --- a/tests/project_scaffolding_test.sh +++ b/tests/project_scaffolding_test.sh @@ -24,11 +24,13 @@ oneTimeTearDown() { # TESTS suite() { - suite_addTest testDotGithubFolder suite_addTest testDotGithubISSUE_TEMPLATE suite_addTest testDotGithubISSUE_TEMPLATEFiles suite_addTest testDotGithubFiles + suite_addTest testTestRemovedFiles + suite_addTest testGlobalFiles + suite_addTest testRemovedFiles } testDotGithubFolder() { @@ -64,5 +66,29 @@ testDotGithubFiles() { assertEquals 1 $filesFound } +testTestRemovedFiles() { + filesFound=0 + if [ -e "tests/" ] && [ -e "tests/shunit2" ] && [ -e "tests/TESTS_RUNNER.sh" ]; then + filesFound=1 + fi + assertNotEquals 1 $filesFound +} + +testGlobalFiles() { + filesFound=0 + if [ -e ".gitignore" ] && [ -e "CHANGELOG.md" ] && [ -e "README.md" ]; then + filesFound=1 + fi + assertEquals 1 $filesFound +} + +testRemovedFiles() { + filesFound=0 + if [ -e "LICENSE" ] && [ -e "bin" ] && [ -e "bin/FUNCTION_HELPERS.sh" ]; then + filesFound=1 + fi + assertNotEquals 1 $filesFound +} + # Load and run shUnit2. . tests/shunit2 From 34da14d4918bde703e4b80eca4ebbd149459b9d5 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Jul 2021 16:16:34 +0200 Subject: [PATCH 141/152] "fixed config.yml proejct name was not parsed" --- SETUP_TEMPLATE.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index 65f0719..49f1a28 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -82,6 +82,7 @@ y | Y) # replace the username and email find .github/ -type f -name "*" -print0 | xargs -0 sed -i "s/Josee9988/${NEW_USERNAME}/g" find .github/ -type f -name "*" -print0 | xargs -0 sed -i "s/jgracia9988@gmail.com/${NEW_EMAIL}/g" + find .github/ -type f -name "*" -print0 | xargs -0 sed -i "s/project-template/${PROJECT_NAME}/g" find .gitignore -type f -name "*" -print0 | xargs -0 sed -i "s/Josee9988\/project-template/${NEW_USERNAME}\/${PROJECT_NAME}/g" rm LICENSE # remove the license From 446e720840e677877a8e1d9f93abe32de685e692 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Thu, 8 Jul 2021 20:48:00 +0200 Subject: [PATCH 142/152] "refactored the code" --- tests/custom_data_test.sh | 102 ++++++++++++++++++++++-------- tests/project_scaffolding_test.sh | 30 +++++---- 2 files changed, 95 insertions(+), 37 deletions(-) diff --git a/tests/custom_data_test.sh b/tests/custom_data_test.sh index 393b993..b7e2edb 100755 --- a/tests/custom_data_test.sh +++ b/tests/custom_data_test.sh @@ -5,6 +5,7 @@ TESTS_TRASH_DIR="tests/.ignore.tests_trash" USERNAME="FAKE_USERNAME_TESTS" NAME="FAKE_NAME_TESTS" MAIL="FAKE_EMAIL_TESTS" +TYPE="FAKE_TYPE_TESTS" OMIT_STR="--omit-commit-and-confirmation" oneTimeSetUp() { @@ -15,7 +16,7 @@ oneTimeSetUp() { rm -r $TESTS_TRASH_DIR/tests/ 2>/dev/null || : rm -r $TESTS_TRASH_DIR/.git/ 2>/dev/null || : cd $TESTS_TRASH_DIR || exit - bash SETUP_TEMPLATE.sh $USERNAME $NAME $MAIL $OMIT_STR >/dev/null + bash SETUP_TEMPLATE.sh $USERNAME $NAME $MAIL $TYPE $OMIT_STR >/dev/null } oneTimeTearDown() { @@ -24,44 +25,95 @@ oneTimeTearDown() { # TESTS suite() { + suite_addTest testDotGithubISSUE_TEMPLATEAsignees + suite_addTest testDotGithubISSUE_TEMPLATEConfig + suite_addTest testDotGithubConfig + suite_addTest testDotGithubSecurity + suite_addTest testDotGithubCODEOWNERS + suite_addTest testDotGitignore + suite_addTest testDotChangelog +} + +testDotGithubISSUE_TEMPLATEAsignees() { + isTheAssigneeNotFound=0 + assigneesWithName="assignees: $USERNAME" + declare -a files=( + ".github/ISSUE_TEMPLATE/1-bug-report.md" ".github/ISSUE_TEMPLATE/2-failing-test.md" + ".github/ISSUE_TEMPLATE/3-docs-bug.md" ".github/ISSUE_TEMPLATE/4-feature-request.md" + ".github/ISSUE_TEMPLATE/5-enhancement-request.md" ".github/ISSUE_TEMPLATE/6-security-report.md" + ".github/ISSUE_TEMPLATE/7-question-support.md") - suite_addTest testDotGithubFolder - suite_addTest testDotGithubISSUE_TEMPLATE - suite_addTest testDotGithubISSUE_TEMPLATEFiles - suite_addTest testDotGithubFiles + for file in "${files[@]}"; do + if ! grep -q "$assigneesWithName" "$file"; then + isTheAssigneeNotFound=1 + fi + done + assertNotEquals 1 $isTheAssigneeNotFound } -testDotGithubFolder() { - githubFolderFound=0 - if [ -e ".github/" ]; then - githubFolderFound=1 +testDotGithubISSUE_TEMPLATEConfig() { + isTheAssigneeNotFound=0 + mailInConfig="url: mailto:$MAIL" + + if grep -q "$mailInConfig" ".github/ISSUE_TEMPLATE/config.yml"; then + isTheAssigneeNotFound=1 fi - assertEquals 1 $githubFolderFound + assertEquals 1 $isTheAssigneeNotFound +} +testDotGithubConfig() { + isNewIssueWelcomeCommentFound=0 + newIssueWelcomeComment="Thanks for opening your first issue in $USERNAME/$NAME! Be sure to" + + if grep -q "$newIssueWelcomeComment" ".github/config.yml"; then + isNewIssueWelcomeCommentFound=1 + fi + assertEquals 1 $isNewIssueWelcomeCommentFound } -testDotGithubISSUE_TEMPLATE() { - folderFound=0 - if [ -e ".github/ISSUE_TEMPLATE" ]; then - folderFound=1 +testDotGithubSecurity() { + isSecurityDataFound=0 + securityData1="(mailto:$MAIL)" + securityData2="[$MAIL]" + securityData3="he project's team and community take security issues" + + if grep -q "$securityData1" ".github/SECURITY.md" && grep -q "$securityData2" ".github/SECURITY.md" && grep -q "$securityData3" ".github/SECURITY.md"; then + isSecurityDataFound=1 fi - assertEquals 1 $folderFound + assertEquals 1 $isSecurityDataFound } -testDotGithubISSUE_TEMPLATEFiles() { - filesFound=0 - if [ -e ".github/ISSUE_TEMPLATE/1-bug-report.md" ] && [ -e ".github/ISSUE_TEMPLATE/2-failing-test.md" ] && [ -e ".github/ISSUE_TEMPLATE/3-docs-bug.md" ] && [ -e ".github/ISSUE_TEMPLATE/4-feature-request.md" ] && [ -e ".github/ISSUE_TEMPLATE/5-enhancement-request.md" ] && [ -e ".github/ISSUE_TEMPLATE/6-security-report.md" ] && [ -e ".github/ISSUE_TEMPLATE/7-question-support.md" ] && [ -e ".github/ISSUE_TEMPLATE/config.yml" ]; then - filesFound=1 +testDotGithubCODEOWNERS() { + isCodeownersDataFound=0 + usernameData="$USERNAME" + + if grep -q "$usernameData" ".github/CODEOWNERS"; then + isCodeownersDataFound=1 + fi + assertEquals 1 $isCodeownersDataFound +} + +testDotGitignore() { + isGitignoreDataFound=0 + gitignoreData1="###> $USERNAME/$NAME ###" + gitignoreData2="###< $USERNAME/$NAME ###" + + if grep -q "$gitignoreData1" ".gitignore" && grep -q "$gitignoreData2" ".gitignore"; then + isGitignoreDataFound=1 fi - assertEquals 1 $filesFound + assertEquals 1 $isGitignoreDataFound } -testDotGithubFiles() { - filesFound=0 - if [ -e ".github/CODEOWNERS" ] && [ -e ".github/CODE_OF_CONDUCT.md" ] && [ -e ".github/CONTRIBUTING.md" ] && [ -e ".github/ISSUE_TEMPLATE.md" ] && [ -e ".github/pull_request_template.md" ] && [ -e ".github/SECURITY.md" ] && [ -e ".github/SUPPORT.md" ] && [ -e ".github/issue_label_bot.yaml" ] && [ -e ".github/config.yml" ] && [ -e ".github/FUNDING.yml" ] && [ -e ".github/settings.yml" ]; then - filesFound=1 +testDotChangelog() { + isChangelogDataFound=0 + changelogData1="All notable changes to the" + changelogData2="**$NAME**" + changelogData3="$TYPE will be documented in this file." + + if grep -q "$changelogData1" "CHANGELOG.md" && grep -q "$changelogData2" "CHANGELOG.md" && grep -q "$changelogData3" "CHANGELOG.md"; then + isChangelogDataFound=1 fi - assertEquals 1 $filesFound + assertEquals 1 $isChangelogDataFound } # Load and run shUnit2. diff --git a/tests/project_scaffolding_test.sh b/tests/project_scaffolding_test.sh index 2e1526b..a338b9c 100755 --- a/tests/project_scaffolding_test.sh +++ b/tests/project_scaffolding_test.sh @@ -5,6 +5,7 @@ TESTS_TRASH_DIR="tests/.ignore.tests_trash" USERNAME="FAKE_USERNAME_TESTS" NAME="FAKE_NAME_TESTS" MAIL="FAKE_EMAIL_TESTS" +TYPE="FAKE_TYPE_TESTS" OMIT_STR="--omit-commit-and-confirmation" oneTimeSetUp() { @@ -15,7 +16,7 @@ oneTimeSetUp() { rm -r $TESTS_TRASH_DIR/tests/ 2>/dev/null || : rm -r $TESTS_TRASH_DIR/.git/ 2>/dev/null || : cd $TESTS_TRASH_DIR || exit - bash SETUP_TEMPLATE.sh $USERNAME $NAME $MAIL $OMIT_STR >/dev/null + bash SETUP_TEMPLATE.sh $USERNAME $NAME $MAIL $TYPE $OMIT_STR >/dev/null } oneTimeTearDown() { @@ -39,7 +40,6 @@ testDotGithubFolder() { githubFolderFound=1 fi assertEquals 1 $githubFolderFound - } testDotGithubISSUE_TEMPLATE() { @@ -51,19 +51,25 @@ testDotGithubISSUE_TEMPLATE() { } testDotGithubISSUE_TEMPLATEFiles() { - filesFound=0 - if [ -e ".github/ISSUE_TEMPLATE/1-bug-report.md" ] && [ -e ".github/ISSUE_TEMPLATE/2-failing-test.md" ] && [ -e ".github/ISSUE_TEMPLATE/3-docs-bug.md" ] && [ -e ".github/ISSUE_TEMPLATE/4-feature-request.md" ] && [ -e ".github/ISSUE_TEMPLATE/5-enhancement-request.md" ] && [ -e ".github/ISSUE_TEMPLATE/6-security-report.md" ] && [ -e ".github/ISSUE_TEMPLATE/7-question-support.md" ] && [ -e ".github/ISSUE_TEMPLATE/config.yml" ]; then - filesFound=1 - fi - assertEquals 1 $filesFound + declare -a files=( + ".github/ISSUE_TEMPLATE/1-bug-report.md" ".github/ISSUE_TEMPLATE/2-failing-test.md" + ".github/ISSUE_TEMPLATE/3-docs-bug.md" ".github/ISSUE_TEMPLATE/4-feature-request.md" + ".github/ISSUE_TEMPLATE/5-enhancement-request.md" ".github/ISSUE_TEMPLATE/6-security-report.md" + ".github/ISSUE_TEMPLATE/7-question-support.md") + + for file in "${files[@]}"; do + assertTrue " $file does not exist" "[ -e \"$file\" ]" + done } testDotGithubFiles() { - filesFound=0 - if [ -e ".github/CODEOWNERS" ] && [ -e ".github/CODE_OF_CONDUCT.md" ] && [ -e ".github/CONTRIBUTING.md" ] && [ -e ".github/ISSUE_TEMPLATE.md" ] && [ -e ".github/pull_request_template.md" ] && [ -e ".github/SECURITY.md" ] && [ -e ".github/SUPPORT.md" ] && [ -e ".github/issue_label_bot.yaml" ] && [ -e ".github/config.yml" ] && [ -e ".github/FUNDING.yml" ] && [ -e ".github/settings.yml" ]; then - filesFound=1 - fi - assertEquals 1 $filesFound + declare -a files=( + ".github/CODEOWNERS" ".github/CODE_OF_CONDUCT.md" ".github/CONTRIBUTING.md" ".github/ISSUE_TEMPLATE.md" + ".github/pull_request_template.md" ".github/SECURITY.md" ".github/SUPPORT.md" ".github/issue_label_bot.yaml" + ".github/config.yml" ".github/FUNDING.yml" ".github/settings.yml") + for file in "${files[@]}"; do + assertTrue " $file does not exist" "[ -e \"$file\" ]" + done } testTestRemovedFiles() { From b6c40070a1008f7a354e35936267dae240dac4c3 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 9 Jul 2021 13:32:45 +0200 Subject: [PATCH 143/152] "improved security md file" --- .github/SECURITY.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/SECURITY.md b/.github/SECURITY.md index 30a193d..1d67596 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -4,10 +4,8 @@ The project's team and community take security issues. We appreciate your efforts to responsibly disclose your findings and will make every effort to acknowledge your contributions. -To report a security issue, go to the project's issues and create a new issue using the ⚠️ Security Report``issue template. +To report a security issue, go to the project's issues and create a new issue using the ⚠️ Security Report 'issue template'. -Read carefully the instructions of this issue template, and if your report could leak data or might expose -how to gain access to a restricted area or break the system, -please email [jgracia9988@gmail.com](mailto:jgracia9988@gmail.com) and include the word "SECURITY" in the subject line. +Read carefully the instructions of this issue template, and if your report could leak data or might expose how to gain access to a restricted area or break the system, please email [jgracia9988@gmail.com](mailto:jgracia9988@gmail.com) and include the word "SECURITY" in the subject line. We'll endeavour to respond quickly, and will keep you updated throughout the process. From aa4e41439d85b1195de8550d1878e980fb48db11 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 9 Jul 2021 13:33:04 +0200 Subject: [PATCH 144/152] "improved the setup template for the tests; fixed some test issues" --- SETUP_TEMPLATE.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index 49f1a28..088dc07 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -65,11 +65,16 @@ fi echo -e "Thanks for using ${GREEN}Josee9988/project-template${NC}" echo -e "Read carefully all the documentation before you continue executing this script: ${UPurple}https://github.com/Josee9988/project-template${NC}\n" -if [ ! "$4" = "$OMIT_STR" ]; then # if the project's type has been manually specified - read -p "Enter $(echo -e "$BBLUE""what your project is""$NC") (program/extension/API/web/CLI tool/backend/frontend/scrapper/automation tool/etc): " PROJECT_TYPE - read -p "Is this data correct: username \"$(echo -e "$GREEN""$NEW_USERNAME""$NC")\", email: \"$(echo -e "$GREEN""$NEW_EMAIL""$NC")\", project name: \"$(echo -e "$GREEN""$PROJECT_NAME""$NC")\", of type: \"$(echo -e "$GREEN""$PROJECT_TYPE""$NC")\" (y/n)? " choice +if [ -n "$4" ]; then # if the project's type has been manually specified + PROJECT_TYPE=$4 else + read -p "Enter $(echo -e "$BBLUE""what your project is""$NC") (program/extension/API/web/CLI tool/backend/frontend/scrapper/automation tool/etc): " PROJECT_TYPE +fi + +if [ "$5" = "$OMIT_STR" ]; then # if the ignore flag has been manually specified choice="y" +else + read -p "Is this data correct: username \"$(echo -e "$GREEN""$NEW_USERNAME""$NC")\", email: \"$(echo -e "$GREEN""$NEW_EMAIL""$NC")\", project name: \"$(echo -e "$GREEN""$PROJECT_NAME""$NC")\", of type: \"$(echo -e "$GREEN""$PROJECT_TYPE""$NC")\" (y/n)? " choice fi ###### START OF THE SCRIPT ###### @@ -92,7 +97,7 @@ y | Y) writeCHANGELOG # write the basic structure of the CHANGELOG.md echo -e "# add your own funding links" >.github/FUNDING.yml # remove author's custom funding links - if [ ! "$4" = "$OMIT_STR" ]; then # if the ignore option for tests has been specified + if [ ! "$5" = "$OMIT_STR" ]; then # if the ignore option for tests has been specified git add CHANGELOG.md README.md .gitignore .github SETUP_TEMPLATE.sh LICENSE bin # commit the new files git -c color.status=always status | less -REX # show git status with colours echo -e "Committing the changes for you :)\n" From b6c1351e697aeb5104aa59780f8c52a7915b1a1a Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 9 Jul 2021 13:33:18 +0200 Subject: [PATCH 145/152] "refactored and simplified some code" --- tests/project_scaffolding_test.sh | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tests/project_scaffolding_test.sh b/tests/project_scaffolding_test.sh index a338b9c..9b36d7e 100755 --- a/tests/project_scaffolding_test.sh +++ b/tests/project_scaffolding_test.sh @@ -35,19 +35,15 @@ suite() { } testDotGithubFolder() { - githubFolderFound=0 - if [ -e ".github/" ]; then - githubFolderFound=1 + if [ ! -e ".github/" ]; then + assertEquals ".github file does not exist" 1 0 # error fi - assertEquals 1 $githubFolderFound } testDotGithubISSUE_TEMPLATE() { - folderFound=0 - if [ -e ".github/ISSUE_TEMPLATE" ]; then - folderFound=1 + if [ ! -e ".github/ISSUE_TEMPLATE" ]; then + assertEquals ".github/ISSUE_TEMPLATE was not found" 1 0 # error fi - assertEquals 1 $folderFound } testDotGithubISSUE_TEMPLATEFiles() { @@ -67,6 +63,7 @@ testDotGithubFiles() { ".github/CODEOWNERS" ".github/CODE_OF_CONDUCT.md" ".github/CONTRIBUTING.md" ".github/ISSUE_TEMPLATE.md" ".github/pull_request_template.md" ".github/SECURITY.md" ".github/SUPPORT.md" ".github/issue_label_bot.yaml" ".github/config.yml" ".github/FUNDING.yml" ".github/settings.yml") + for file in "${files[@]}"; do assertTrue " $file does not exist" "[ -e \"$file\" ]" done @@ -77,7 +74,7 @@ testTestRemovedFiles() { if [ -e "tests/" ] && [ -e "tests/shunit2" ] && [ -e "tests/TESTS_RUNNER.sh" ]; then filesFound=1 fi - assertNotEquals 1 $filesFound + assertNotEquals " tests folder of some files were found" 1 $filesFound } testGlobalFiles() { @@ -85,7 +82,7 @@ testGlobalFiles() { if [ -e ".gitignore" ] && [ -e "CHANGELOG.md" ] && [ -e "README.md" ]; then filesFound=1 fi - assertEquals 1 $filesFound + assertEquals " gitignore, changelog or readme were not found" 1 $filesFound } testRemovedFiles() { @@ -93,7 +90,7 @@ testRemovedFiles() { if [ -e "LICENSE" ] && [ -e "bin" ] && [ -e "bin/FUNCTION_HELPERS.sh" ]; then filesFound=1 fi - assertNotEquals 1 $filesFound + assertNotEquals " LICENSE or the bin directory were found" 1 $filesFound } # Load and run shUnit2. From 83c04600d6161da5c9134b152ec81cbc4336fa34 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 9 Jul 2021 13:43:47 +0200 Subject: [PATCH 146/152] "refactored and improved the code" --- tests/custom_data_test.sh | 51 +++++++-------------------------------- 1 file changed, 9 insertions(+), 42 deletions(-) diff --git a/tests/custom_data_test.sh b/tests/custom_data_test.sh index b7e2edb..7c69650 100755 --- a/tests/custom_data_test.sh +++ b/tests/custom_data_test.sh @@ -31,11 +31,10 @@ suite() { suite_addTest testDotGithubSecurity suite_addTest testDotGithubCODEOWNERS suite_addTest testDotGitignore - suite_addTest testDotChangelog + suite_addTest testChangelog } testDotGithubISSUE_TEMPLATEAsignees() { - isTheAssigneeNotFound=0 assigneesWithName="assignees: $USERNAME" declare -a files=( ".github/ISSUE_TEMPLATE/1-bug-report.md" ".github/ISSUE_TEMPLATE/2-failing-test.md" @@ -44,76 +43,44 @@ testDotGithubISSUE_TEMPLATEAsignees() { ".github/ISSUE_TEMPLATE/7-question-support.md") for file in "${files[@]}"; do - if ! grep -q "$assigneesWithName" "$file"; then - isTheAssigneeNotFound=1 - fi + assertTrue " assignee was not found for file $file" "grep -q \"$assigneesWithName\" \"$file\"" done - assertNotEquals 1 $isTheAssigneeNotFound } - testDotGithubISSUE_TEMPLATEConfig() { - isTheAssigneeNotFound=0 mailInConfig="url: mailto:$MAIL" - - if grep -q "$mailInConfig" ".github/ISSUE_TEMPLATE/config.yml"; then - isTheAssigneeNotFound=1 - fi - assertEquals 1 $isTheAssigneeNotFound + assertTrue "The mail $MAIL was not found in .github/ISSUE_TEMPLATE/config.yml" "grep -q \"$mailInConfig\" \".github/ISSUE_TEMPLATE/config.yml\"" } testDotGithubConfig() { - isNewIssueWelcomeCommentFound=0 newIssueWelcomeComment="Thanks for opening your first issue in $USERNAME/$NAME! Be sure to" - - if grep -q "$newIssueWelcomeComment" ".github/config.yml"; then - isNewIssueWelcomeCommentFound=1 - fi - assertEquals 1 $isNewIssueWelcomeCommentFound + assertTrue "The $USERNAME/$NAME was not found in " "grep -q \"$newIssueWelcomeComment\" \".github/config.yml\"" } testDotGithubSecurity() { - isSecurityDataFound=0 securityData1="(mailto:$MAIL)" securityData2="[$MAIL]" securityData3="he project's team and community take security issues" - - if grep -q "$securityData1" ".github/SECURITY.md" && grep -q "$securityData2" ".github/SECURITY.md" && grep -q "$securityData3" ".github/SECURITY.md"; then - isSecurityDataFound=1 - fi - assertEquals 1 $isSecurityDataFound + assertTrue "The mail $MAIL was not found in .github/SECURITY.md" "grep -q \"$securityData1\" \".github/SECURITY.md\" && grep -q \"$securityData2\" \".github/SECURITY.md\" && grep -q \"$securityData3\" \".github/SECURITY.md\"" } testDotGithubCODEOWNERS() { - isCodeownersDataFound=0 usernameData="$USERNAME" - - if grep -q "$usernameData" ".github/CODEOWNERS"; then - isCodeownersDataFound=1 - fi - assertEquals 1 $isCodeownersDataFound + assertTrue "Could not find the username $USERNAME in the file .github/CODEOWNERS" "grep -q \"$usernameData\" \".github/CODEOWNERS\"" } testDotGitignore() { - isGitignoreDataFound=0 gitignoreData1="###> $USERNAME/$NAME ###" gitignoreData2="###< $USERNAME/$NAME ###" - if grep -q "$gitignoreData1" ".gitignore" && grep -q "$gitignoreData2" ".gitignore"; then - isGitignoreDataFound=1 - fi - assertEquals 1 $isGitignoreDataFound + assertTrue "Could not find the username $USERNAME and the name $NAME in the .gitignore file" "grep -q \"$gitignoreData1\" \".gitignore\" && grep -q \"$gitignoreData2\" \".gitignore\"" } -testDotChangelog() { - isChangelogDataFound=0 +testChangelog() { changelogData1="All notable changes to the" changelogData2="**$NAME**" changelogData3="$TYPE will be documented in this file." - if grep -q "$changelogData1" "CHANGELOG.md" && grep -q "$changelogData2" "CHANGELOG.md" && grep -q "$changelogData3" "CHANGELOG.md"; then - isChangelogDataFound=1 - fi - assertEquals 1 $isChangelogDataFound + assertTrue "Could not find the name $NAME or the type $TYPE in the CHANGELOG.md file" "grep -q \"$changelogData1\" \"CHANGELOG.md\" && grep -q \"$changelogData2\" \"CHANGELOG.md\" && grep -q \"$changelogData3\" \"CHANGELOG.md\"" } # Load and run shUnit2. From af287f1cc6862b9c4d03a47e2b5448b11d889caf Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 9 Jul 2021 14:54:31 +0200 Subject: [PATCH 147/152] 1.8.0 --- CHANGELOG.md | 17 +++++++++++++++++ README.md | 8 +++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03f1f20..cf9f4de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.8.0**] - 2021-07-09 + +### Added + +* Multiple bash unit tests. +* The SETUP_TEMPLATE.sh now takes a 4th argument which is the type of the project. +* Updated the README to add the new tests documentation + +### Fixed + +* Modified a couple of files where the project name was not changed. + +### Changed + +* Modified the SETUP_TEMPLATE.sh to make it available for the tests. +* Improved the .github/SECURITY.md file + ## [**1.7.2**] - 2021-07-08 ### Added diff --git a/README.md b/README.md index 6cd70c9..c88a78d 100644 --- a/README.md +++ b/README.md @@ -39,18 +39,18 @@ for more information or guidance, follow the [Github guide](https://docs.github. 3. **Execute** the `SETUP_TEMPLATE.sh` shell script to **customize** the files with your data. ```bash - bash SETUP_TEMPLATE.sh # additional parameters [Username] [Project-Name] [Email] + bash SETUP_TEMPLATE.sh # additional parameters [Username] [Project-Name] [Email] [Project type] ``` Or you can also do it like this: ```bash - chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE.sh # additional parameters [Username] [Project-Name] [Email] + chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE.sh # additional parameters [Username] [Project-Name] [Email] [Project type] ``` Additionally, watch *[this video](https://asciinema.org/a/404568)* to see **how to execute the script** or use *`bash SETUP_TEMPLATE.sh --help`* to obtain some extra information. - If the automatic detection of the username, project name or email is NOT right, please post an issue, and you can **manually correct** them like: `bash SETUP_TEMPLATE.sh RightUsername RightProjectName RightEmail` being `$1` the new username, `$2` the new project name and `$3` the new email. + If the automatic detection of the username, project name or email is NOT right, please post an issue, and you can **manually correct** them like: `bash SETUP_TEMPLATE.sh RightUsername RightProjectName RightEmail` being `$1` the new username, `$2` the new project name, `$3` the new email and `$4` the project type. 4. **Review** every single file and **customize** it as you like. 5. Build your project. πŸš€ @@ -218,6 +218,8 @@ To do so: bash tests/TESTS_RUNNER.sh ``` +*You may need to give execution permission to all the `tests/` files* + --- ## 🍰 **Supporters and donators** From 0c1d0ee1c57333567aa02ec7013495e0a64673bb Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Fri, 9 Jul 2021 14:59:32 +0200 Subject: [PATCH 148/152] updated the new script profile --- bin/FUNCTION_HELPERS.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh index 5cbc1f8..e1516bc 100644 --- a/bin/FUNCTION_HELPERS.sh +++ b/bin/FUNCTION_HELPERS.sh @@ -61,8 +61,8 @@ helpCommand() { displayHelpTexts() { center "User help" - echo -e "Script usage: ${BBLUE}$0 [Username] [Project-Name] [Email]${NC} (The project name should not contain spaces)${NC}\n" - echo "Arguments of username, project-name and email are automatically gathered from your git repository and git config, so they are optional in case they are not detected correctly." + echo -e "Script usage: ${BBLUE}$0 [Username] [Project-Name] [Email] [Project-type]${NC} (The project name and type should not contain spaces)${NC}\n" + echo "Arguments of username, project-name and email are automatically gathered from your git repository and git config, so they are *optional* in case they are not detected correctly." echo -e "Make sure you have ${BBLUE}read the documentation before executing${NC} this script: ${UPurple}https://github.com/Josee9988/project-template${NC}" echo -e "If you have any questions or if any issue is found, please make sure to report it at: ${UPurple}https://github.com/Josee9988/project-template/issues${NC}" } From 5450c0f1e05ff68b306ca32285faac1363845037 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 10 Jul 2021 14:30:52 +0200 Subject: [PATCH 149/152] "improved documentation of the scripts" --- bin/FUNCTION_HELPERS.sh | 2 +- tests/TESTS_RUNNER.sh | 27 ++++++++++++++++++++++----- tests/custom_data_test.sh | 16 +++++++++++++++- tests/project_scaffolding_test.sh | 16 +++++++++++++++- 4 files changed, 53 insertions(+), 8 deletions(-) diff --git a/bin/FUNCTION_HELPERS.sh b/bin/FUNCTION_HELPERS.sh index e1516bc..7c18636 100644 --- a/bin/FUNCTION_HELPERS.sh +++ b/bin/FUNCTION_HELPERS.sh @@ -8,7 +8,7 @@ # VERSION: See in CHANGELOG.md # NOTES: This script will auto remove itself, and in case of wanting to run it again, the user must download # it again or do a 'git stash' and revert the changes. -# BASH_VERSION: 5.0.17(1)-release +# BASH_VERSION: 5.1.4(1)-release (x86_64-pc-linux-gnu) # LICENSE: see in ../LICENSE (project root) or https://github.com/Josee9988/project-template/blob/master/LICENSE # GITHUB: https://github.com/Josee9988/ # REPOSITORY: https://github.com/Josee9988/project-template diff --git a/tests/TESTS_RUNNER.sh b/tests/TESTS_RUNNER.sh index 31e3771..5820df9 100755 --- a/tests/TESTS_RUNNER.sh +++ b/tests/TESTS_RUNNER.sh @@ -1,9 +1,23 @@ #!/bin/bash +#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# +# PURPOSE: Main test script that will call all the individual unitary tests. +# TITLE: TESTS_RUNNER +# AUTHOR: Jose Gracia +# VERSION: See in CHANGELOG.md +# NOTES: This script does not contain any test, it only calls all the tests one by one. +# BASH_VERSION: 5.1.4(1)-release (x86_64-pc-linux-gnu) +# LICENSE: see in ../LICENSE (project root) or https://github.com/Josee9988/project-template/blob/master/LICENSE +# GITHUB: https://github.com/Josee9988/ +# REPOSITORY: https://github.com/Josee9988/project-template +# ISSUES: https://github.com/Josee9988/project-template/issues +# MAIL: jgracia9988@gmail.com +#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# + LGREEN='\033[0;32m' NC='\033[0m' # No Color TESTS_TRASH_DIR="tests/.ignore.tests_trash/" -declare -a files=("tests/project_scaffolding_test.sh" "tests/custom_data_test.sh") # all the tests +declare -a test_files=("tests/project_scaffolding_test.sh" "tests/custom_data_test.sh") # all the tests center() { term_width="$(tput cols)" @@ -11,9 +25,12 @@ center() { echo -e "\n${LGREEN}$(printf '%*.*s %s %*.*s\n' 0 "$(((term_width - 2 - ${#1}) / 2))" "$padding" "$1" 0 "$(((term_width - 1 - ${#1}) / 2))" "$padding")${NC}" } -for file in "${files[@]}"; do - mkdir -p tests/.ignore.tests_trash +rm -r $TESTS_TRASH_DIR 2>/dev/null || : # remove any possible old test run trash files + +# run all the tests +for file in "${test_files[@]}"; do + mkdir -p tests/.ignore.tests_trash # create the files where the tests will attack upon center "TEST: running test ./$file" - ./"$file" - rm -r $TESTS_TRASH_DIR + ./"$file" # run the test + rm -r $TESTS_TRASH_DIR # remove the previously created files done diff --git a/tests/custom_data_test.sh b/tests/custom_data_test.sh index 7c69650..a2cf902 100755 --- a/tests/custom_data_test.sh +++ b/tests/custom_data_test.sh @@ -1,5 +1,19 @@ #! /bin/bash -# file: examples/custom_data_test.sh + +#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# +# PURPOSE: Test suite for testing the modified custom data, after executing the SETUP_TEMPLATE script.ΒΊ +# TITLE: Custom Data tests +# AUTHOR: Jose Gracia +# VERSION: See in CHANGELOG.md +# NOTES: This script is called by the TESTS_RUNNER.sh script. And it unit tests all the custom data modified +# by the SETUP_TEMPLATE script. +# BASH_VERSION: 5.1.4(1)-release (x86_64-pc-linux-gnu) +# LICENSE: see in ../LICENSE (project root) or https://github.com/Josee9988/project-template/blob/master/LICENSE +# GITHUB: https://github.com/Josee9988/ +# REPOSITORY: https://github.com/Josee9988/project-template +# ISSUES: https://github.com/Josee9988/project-template/issues +# MAIL: jgracia9988@gmail.com +#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# TESTS_TRASH_DIR="tests/.ignore.tests_trash" USERNAME="FAKE_USERNAME_TESTS" diff --git a/tests/project_scaffolding_test.sh b/tests/project_scaffolding_test.sh index 9b36d7e..e6ffb48 100755 --- a/tests/project_scaffolding_test.sh +++ b/tests/project_scaffolding_test.sh @@ -1,5 +1,19 @@ #! /bin/bash -# file: examples/project_scaffolding_test.sh + +#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# +# PURPOSE: Test suite for testing the proejct scaffolding after executing the SETUP_TEMPLATE script. +# TITLE: Project Scaffolding tests +# AUTHOR: Jose Gracia +# VERSION: See in CHANGELOG.md +# NOTES: This script is called by the TESTS_RUNNER.sh script. And it unit tests the newly generated scaffolding +# generated by the SETUP_TEMPLATE script. +# BASH_VERSION: 5.1.4(1)-release (x86_64-pc-linux-gnu) +# LICENSE: see in ../LICENSE (project root) or https://github.com/Josee9988/project-template/blob/master/LICENSE +# GITHUB: https://github.com/Josee9988/ +# REPOSITORY: https://github.com/Josee9988/project-template +# ISSUES: https://github.com/Josee9988/project-template/issues +# MAIL: jgracia9988@gmail.com +#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# TESTS_TRASH_DIR="tests/.ignore.tests_trash" USERNAME="FAKE_USERNAME_TESTS" From 3e75b4b73b9b53cf08af691ea5dbc1bd2dc74d56 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sat, 10 Jul 2021 14:31:18 +0200 Subject: [PATCH 150/152] "documented the changes" --- CHANGELOG.md | 30 +++++++++++++++++++++++------- README.md | 30 +++++++++++++++--------------- SETUP_TEMPLATE.sh | 2 +- 3 files changed, 39 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf9f4de..8ed8faf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,13 +7,29 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.8.1**] - 2021-07-10 + +### Added + +* Basic file documentation for all the tests. +* Improved the TESTS_RUNNER script. + +### Fixed + +* Some minor typos. +* The README's project tree + +### Changed + +* The comment 'BASH_VERSION' in all the scripts to the actual one. + ## [**1.8.0**] - 2021-07-09 ### Added * Multiple bash unit tests. * The SETUP_TEMPLATE.sh now takes a 4th argument which is the type of the project. -* Updated the README to add the new tests documentation +* Updated the README to add the documentation of the new test ### Fixed @@ -32,15 +48,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed -* Minnor typo in the generated README.md +* Minor typo in the generated README.md ## [**1.7.1**] - 2021-07-01 ### Added * `.env` file will be ignored in the `.gitignore`. -* Disabled some markdownlint rules in the generated README.md -* Fixed some minnor errors in the README.md file +* Disabled some markdown link rules in the generated README.md +* Fixed some minor errors in the README.md file ## [**1.7.0**] - 2021-06-01 @@ -48,13 +64,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) * Type: Test issue label. * Failing test issue template adds the new Type Test issue label. -* Updated README.md with the new label. +* Update README.md with the new label. ## [**1.6.0**] - 2021-05-21 ### Added -* Divided the feature request into feature and enhancement request, each one with its respective labels. +* Divided the feature request into feature and enhancement requests, each one with its respective labels. ### Changed @@ -130,7 +146,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Fixed -* Some README.md markdownlint bugs. +* Some README.md markdown link bugs. ## [**1.2.0**] - 2021-04-07 diff --git a/README.md b/README.md index c88a78d..47ffe44 100644 --- a/README.md +++ b/README.md @@ -95,14 +95,14 @@ Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not s . β”œβ”€β”€ CHANGELOG.md β”œβ”€β”€ .github -β”‚Β Β  β”œβ”€β”€ CODE_OF_CONDUCT.md -β”‚Β Β  β”œβ”€β”€ CODEOWNERS -β”‚Β Β  β”œβ”€β”€ CONTRIBUTING.md -β”‚Β Β  β”œβ”€β”€ FUNDING.yml -β”‚Β Β  β”œβ”€β”€ issue_label_bot.yaml -β”‚Β Β  β”œβ”€β”€ config.yml -β”‚Β Β  β”œβ”€β”€ ISSUE_TEMPLATE -β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 1-bug-report.md +β”‚ β”œβ”€β”€ CODE_OF_CONDUCT.md +β”‚ β”œβ”€β”€ CODEOWNERS +β”‚ β”œβ”€β”€ config.yml +β”‚ β”œβ”€β”€ CONTRIBUTING.md +β”‚ β”œβ”€β”€ FUNDING.yml +β”‚ β”œβ”€β”€ issue_label_bot.yaml +β”‚ β”œβ”€β”€ ISSUE_TEMPLATE +β”‚ β”‚ β”œβ”€β”€ 1-bug-report.md β”‚ β”‚ β”œβ”€β”€ 2-failing-test.md β”‚ β”‚ β”œβ”€β”€ 3-docs-bug.md β”‚ β”‚ β”œβ”€β”€ 4-feature-request.md @@ -110,15 +110,15 @@ Files that will get removed after the execution of `SETUP_TEMPLATE.sh` are not s β”‚ β”‚ β”œβ”€β”€ 6-security-report.md β”‚ β”‚ β”œβ”€β”€ 7-question-support.md β”‚ β”‚ └── config.yml -β”‚Β Β  β”œβ”€β”€ ISSUE_TEMPLATE.md -β”‚Β Β  β”œβ”€β”€ pull_request_template.md -β”‚Β Β  β”œβ”€β”€ SECURITY.md -β”‚Β Β  β”œβ”€β”€ settings.yml -β”‚Β Β  └── SUPPORT.md +β”‚ β”œβ”€β”€ ISSUE_TEMPLATE.md +β”‚ β”œβ”€β”€ pull_request_template.md +β”‚ β”œβ”€β”€ SECURITY.md +β”‚ β”œβ”€β”€ settings.yml +β”‚ └── SUPPORT.md β”œβ”€β”€ .gitignore └── README.md -2 directories, 21 files +2 directories, 22 files ``` --- @@ -173,7 +173,7 @@ Badges and texts will be replaced with your project details! ### πŸ”– The labels for your issues -If the bot [probot-settings](https://probot.github.io/apps/settings/) is not installed you will not have these beautiful labels! (there are actually 1 more issue label than in the screenshot!) +If the bot [probot-settings](https://probot.github.io/apps/settings/) is not installed you will not have these beautiful labels! (there are actually more issue labels than in the image!)

LABELS diff --git a/SETUP_TEMPLATE.sh b/SETUP_TEMPLATE.sh index 088dc07..0a25c09 100644 --- a/SETUP_TEMPLATE.sh +++ b/SETUP_TEMPLATE.sh @@ -14,7 +14,7 @@ # VERSION: See in CHANGELOG.md # NOTES: This script will auto remove itself, and in case of wanting to run it again, the user must download # it again or do a 'git stash' and revert the changes. -# BASH_VERSION: 5.0.17(1)-release +# BASH_VERSION: 5.1.4(1)-release (x86_64-pc-linux-gnu) # LICENSE: see in LICENSE (project root) or https://github.com/Josee9988/project-template/blob/master/LICENSE # GITHUB: https://github.com/Josee9988/ # REPOSITORY: https://github.com/Josee9988/project-template From c1d570597084560e35820989c51c0ec7626f9b38 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sun, 11 Jul 2021 12:51:38 +0200 Subject: [PATCH 151/152] "minor comments" --- tests/custom_data_test.sh | 2 +- tests/project_scaffolding_test.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/custom_data_test.sh b/tests/custom_data_test.sh index a2cf902..4c9d327 100755 --- a/tests/custom_data_test.sh +++ b/tests/custom_data_test.sh @@ -30,7 +30,7 @@ oneTimeSetUp() { rm -r $TESTS_TRASH_DIR/tests/ 2>/dev/null || : rm -r $TESTS_TRASH_DIR/.git/ 2>/dev/null || : cd $TESTS_TRASH_DIR || exit - bash SETUP_TEMPLATE.sh $USERNAME $NAME $MAIL $TYPE $OMIT_STR >/dev/null + bash SETUP_TEMPLATE.sh $USERNAME $NAME $MAIL $TYPE $OMIT_STR >/dev/null # run the setup script } oneTimeTearDown() { diff --git a/tests/project_scaffolding_test.sh b/tests/project_scaffolding_test.sh index e6ffb48..0a99a3b 100755 --- a/tests/project_scaffolding_test.sh +++ b/tests/project_scaffolding_test.sh @@ -30,7 +30,7 @@ oneTimeSetUp() { rm -r $TESTS_TRASH_DIR/tests/ 2>/dev/null || : rm -r $TESTS_TRASH_DIR/.git/ 2>/dev/null || : cd $TESTS_TRASH_DIR || exit - bash SETUP_TEMPLATE.sh $USERNAME $NAME $MAIL $TYPE $OMIT_STR >/dev/null + bash SETUP_TEMPLATE.sh $USERNAME $NAME $MAIL $TYPE $OMIT_STR >/dev/null # run the setup script } oneTimeTearDown() { From 2d0ca587b8a7cb79f95207df498bb9db689175fc Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Sun, 11 Jul 2021 12:51:48 +0200 Subject: [PATCH 152/152] "1.8.2 updated asciinema video" --- CHANGELOG.md | 10 ++++++++++ README.md | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ed8faf..9bf7f93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) --- +## [**1.8.2**] - 2021-07-11 + +### Added + +* Some minor comments in the test scripts + +### Changed + +* The asciinema video + ## [**1.8.1**] - 2021-07-10 ### Added diff --git a/README.md b/README.md index 47ffe44..844450f 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ * Make your _community healthier_ with all the guides like code of conduct, contributing, support, security... * Learn more with the [official Github guide on creating repositories from a template](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template). * To start using it; "**[click use this template](https://github.com/Josee9988/project-template/generate)**", create your new repository, -* All the basic setup is made through an easy script that will auto-detect all your data to make it lightning fast! πŸ—²πŸ—² clone your new repository and execute the `SETUP_TEMPLATE.sh` shell script to personalize the files with your private details. Check how to execute it [here](https://asciinema.org/a/398761). +* All the basic setup is made through an easy script that will auto-detect all your data to make it lightning fast! πŸ—²πŸ—² clone your new repository and execute the `SETUP_TEMPLATE.sh` shell script to personalize the files with your private details. Check how to execute it [here](https://asciinema.org/a/424847). * All the markdown follows [MarkdownLint rules](https://github.com/DavidAnson/markdownlint). --- @@ -48,7 +48,7 @@ for more information or guidance, follow the [Github guide](https://docs.github. chmod u+x SETUP_TEMPLATE.sh && ./SETUP_TEMPLATE.sh # additional parameters [Username] [Project-Name] [Email] [Project type] ``` - Additionally, watch *[this video](https://asciinema.org/a/404568)* to see **how to execute the script** or use *`bash SETUP_TEMPLATE.sh --help`* to obtain some extra information. + Additionally, watch *[this video](https://asciinema.org/a/424847)* to see **how to execute the script** or use *`bash SETUP_TEMPLATE.sh --help`* to obtain some extra information. If the automatic detection of the username, project name or email is NOT right, please post an issue, and you can **manually correct** them like: `bash SETUP_TEMPLATE.sh RightUsername RightProjectName RightEmail` being `$1` the new username, `$2` the new project name, `$3` the new email and `$4` the project type.