aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby <[email protected]>2022-11-05 03:19:46 -0400
committerBobby <[email protected]>2022-11-05 03:19:46 -0400
commit880bf33c0a3a69918bb1fadd5969d6ac5a2c0ba0 (patch)
tree1dff418e40230fd30ddcd251eb166c7481cfaedd
parent3487049d5b7ada8b9e10cb5500e2f5c4249a13d8 (diff)
downloadtexty-880bf33c0a3a69918bb1fadd5969d6ac5a2c0ba0.tar.xz
texty-880bf33c0a3a69918bb1fadd5969d6ac5a2c0ba0.zip
refactor: Updated maintainers
-rw-r--r--README.md31
-rw-r--r--maintainers.yml7
-rw-r--r--scripts/maintainers.py7
3 files changed, 27 insertions, 18 deletions
diff --git a/README.md b/README.md
index 33a7f57..2046cf1 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@ Before you start contributing, there are a few things you need to have installed
You should start by [forking this repository](https://github.com/luciferreeves/texty/fork) and then cloning it to your local machine. If you need help with this, you can follow [this guide](https://help.github.com/articles/fork-a-repo/). Once you have cloned the repository, you can start making changes.
-**Note**: You must be working in a virtual environment. If you don't know what that is, you can read more about it [here](https://docs.python.org/3/tutorial/venv.html). To create a virtual environment, run the following command:
+> **Note**: You must be working in a virtual environment. If you don't know what that is, you can read more about it [here](https://docs.python.org/3/tutorial/venv.html). To create a virtual environment, run the following command:
python -m venv env
@@ -52,16 +52,15 @@ This repository uses a custom commit script `commit.sh` to commit changes. This
-t type: change type (optional)
-b branch: branch name (optional)
-h, --help display help message
+> **Note**: The `files` argument is required. If you do not specify any files, the script will produce an error. You can add multiple files by separating them with a space. If you want to commit all files, use `"."` as the argument.
-**Note**: The `files` argument is required. If you do not specify any files, the script will produce an error. You can add multiple files by separating them with a space. If you want to commit all files, use `"."` as the argument.
+> **Note**: The `-m` flag is required. If you do not specify a message, the script will prompt you for one.
-**Note**: The `-m` flag is required. If you do not specify a message, the script will prompt you for one.
+> **Note**: The `-t` and `-b` flags are optional. If you do not specify a branch, the script will use the current branch. If you do not specify a type, the script will use the default type `feat`.
-**Note**: The `-t` and `-b` flags are optional. If you do not specify a branch, the script will use the current branch. If you do not specify a type, the script will use the default type `feat`.
+> **Note**: Valid change types are `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `chore`, and `revert`. If you specify an invalid type, the script will ask if you want to use the default type `feat`.
-**Note**: Valid change types are `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `chore`, and `revert`. If you specify an invalid type, the script will ask if you want to use the default type `feat`.
-
-**Note**: If a non-existent branch is specified, the script will ask if you want to create the branch, and if you do, it will create the branch and push it to the remote repository; otherwise, it will abort.
+> **Note**: If a non-existent branch is specified, the script will ask if you want to create the branch, and if you do, it will create the branch and push it to the remote repository; otherwise, it will abort.
Before running the script, make sure you have `git` installed and configured and that you have the correct permissions to push to the remote repository. Then you can start by making the script executable first:
@@ -79,7 +78,7 @@ Then you can run the script:
You can open and edit the `commit.sh` script directly to add your own commands. These commands will be executed before the commit is made. For example, you can add a command to run a linter before committing.
-**Note**: If any of the commands in the script fail, the script will exit and the commit will not be made.
+> **Note**: If any of the commands in the script fail, the script will exit and the commit will not be made.
In order to configure the script, you should add your commands inside the `commands()` function. The `commands()` function is called before the commit is made. You can add your commands inside the function.
@@ -103,4 +102,18 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
## Maintainers
-<!-- maintainers --> - [Bobby](luciferreeves) - [https://thatcomputerscientist.com](https://thatcomputerscientist.com) ![Bobby](https://github.com/luciferreeves.png?size=40) \ No newline at end of file
+This is a list of the current maintainers of this project. This list is automatically generated from the [maintainers.yml](maintainers.yml) file. The maintainers are listed in the order of their addition to the file. If you ever added or modified any parts of this repository, please add your name to the file and open a pull request.
+
+The maintainers in the `maintainers.yml` file are listed in the following format:
+
+ - name: <name of the maintainer>
+ github: <github username of the maintainer>
+ email: <email of the maintainer> (optional)
+ website: <website of the maintainer> (optional)
+
+> **Note**: Please do not edit the `README.md` file directly. Instead, edit the `maintainers.yml` file and run the `commit.sh` script to generate the `README.md` file.
+
+<!-- maintainers --> - [Bobby](luciferreeves) - [https://thatcomputerscientist.com](https://thatcomputerscientist.com) ![Bobby](https://github.com/luciferreeves.png?size=40)
+- [Bobby](luciferreeves) - [https://thatcomputerscientist.com](https://thatcomputerscientist.com)
+
+![Bobby](https://github.com/luciferreeves.png?size=40) \ No newline at end of file
diff --git a/maintainers.yml b/maintainers.yml
index 6d6babd..87661f6 100644
--- a/maintainers.yml
+++ b/maintainers.yml
@@ -1,7 +1,7 @@
# This file is a list of maintainers for the project. It is used by the
-# `maintainers` command in the `commit.sh` script to automatically add
-# maintainers to the `README.md` file in the maintainers section, present
-# at the bottom of the file.
+# the `commit.sh` script to automatically add maintainers to the
+# `README.md` file in the maintainers section, present at the bottom
+# of the file.
# The maintainers are listed in the following format:
@@ -9,7 +9,6 @@
# github: <github username of the maintainer>
# email: <email of the maintainer> (optional)
# website: <website of the maintainer> (optional)
-# twitter: <twitter username of the maintainer> (optional)
# The maintainers are listed in the order of their addition to the file. If
# you ever added or modified any parts of this repository, please add your
diff --git a/scripts/maintainers.py b/scripts/maintainers.py
index 2ab3b0f..b4111b2 100644
--- a/scripts/maintainers.py
+++ b/scripts/maintainers.py
@@ -36,11 +36,8 @@ def main():
image_url = "https://github.com/{}.png?size=40".format(maintainer['github'])
maintainer_images += "![{}]({}) ".format(maintainer['name'], image_url)
- # Remove everything below "<!-- maintainers -->" in the README.md file
- readme = readme.split("<!-- maintainers -->")[0]
-
- # Add the list of maintainers to the README.md file
- readme += "<!-- maintainers -->\r" + maintainers_list + "\r" + maintainer_images
+ # Replace "<!-- maintainers -->" in the README.md file
+ readme = readme.replace("<!-- maintainers -->", "<!-- maintainers -->\r" + maintainers_list + "\r" + maintainer_images)
# Save the README.md file
with open('README.md', 'w') as f: