From 7a4f9aeeae36a26d63724d2e166e8e536ef39c9a Mon Sep 17 00:00:00 2001 From: wale soyinka Date: Sun, 3 Mar 2024 18:00:58 -0500 Subject: [PATCH 1/3] Add new Gemstone for installing Github CLI tool (gh) --- docs/gemstones/gh_cli_installation.md | 57 +++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 docs/gemstones/gh_cli_installation.md diff --git a/docs/gemstones/gh_cli_installation.md b/docs/gemstones/gh_cli_installation.md new file mode 100644 index 0000000000..a474885f7e --- /dev/null +++ b/docs/gemstones/gh_cli_installation.md @@ -0,0 +1,57 @@ + +--- +title: Installing and Setting Up GitHub CLI on Rocky Linux 9.3 +author: Wale Soyinka +tags: + - GitHub CLI + - gh + - git + - github +--- + +## Introduction + +This gemstone covers the installation and basic setup of the GitHub CLI tool (gh) on Rocky Linux 9.3, enabling users to interact with GitHub repositories directly from the command line. + +## Problem Description + +Users need a convenient way to interact with GitHub without leaving the command line environment. + +## Prerequisites + +- A system running Rocky Linux 9.3. +- Access to a terminal. +- Basic familiarity with command line operations. + +## Solution Steps + +1. **Install GitHub CLI Using Script**: + Use the provided script to install `gh`. + ``` + curl -fsSL https://cli.github.com/packages/rpm/gh-cli.repo | sudo tee /etc/yum.repos.d/github-cli.repo + sudo dnf -y install gh + ``` + +2. **Verify Installation**: + Ensure that `gh` is correctly installed. + ``` + gh --version + ``` + +3. **Authenticate with GitHub**: + Log in to your GitHub account. + ``` + gh auth login + ``` + Follow the prompts to authenticate. + +## Conclusion + +You should now have the GitHub CLI installed and set up on your Rocky Linux 9.3 system, allowing you to interact with GitHub repositories directly from your terminal. + +## Additional Information (Optional) + +- GitHub CLI provides various commands like `gh repo clone`, `gh pr create`, `gh issue list`, etc. +- For more detailed usage, refer to the [official GitHub CLI documentation](https://cli.github.com/manual/). + + From 138d03eca095e0a2e71bf7c8f1bf395bdcb08b9b Mon Sep 17 00:00:00 2001 From: wale soyinka Date: Sun, 3 Mar 2024 18:08:23 -0500 Subject: [PATCH 2/3] Add new Gemstone for installing Github CLI tool (gh) --- docs/gemstones/gh_cli_installation.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/gemstones/gh_cli_installation.md b/docs/gemstones/gh_cli_installation.md index a474885f7e..846b804664 100644 --- a/docs/gemstones/gh_cli_installation.md +++ b/docs/gemstones/gh_cli_installation.md @@ -1,4 +1,3 @@ - --- title: Installing and Setting Up GitHub CLI on Rocky Linux 9.3 author: Wale Soyinka @@ -19,14 +18,15 @@ Users need a convenient way to interact with GitHub without leaving the command ## Prerequisites -- A system running Rocky Linux 9.3. -- Access to a terminal. -- Basic familiarity with command line operations. +- A system running Rocky Linux +- Access to a terminal +- Basic familiarity with command line operations +- An existing Github account -## Solution Steps +## Proceedure 1. **Install GitHub CLI Using Script**: - Use the provided script to install `gh`. + Use the curl command to download the official repository file for `gh`. The downloaded file will be saved under the /etc/yum.repos.d/ directory. After downloading, use the dnf command to install `gh` from the repository. Type: ``` curl -fsSL https://cli.github.com/packages/rpm/gh-cli.repo | sudo tee /etc/yum.repos.d/github-cli.repo sudo dnf -y install gh From 9426106e5d8e0ec2d0d957d30a5746decf48658a Mon Sep 17 00:00:00 2001 From: wale soyinka Date: Sun, 3 Mar 2024 20:17:41 -0500 Subject: [PATCH 3/3] Add new Gemstone for creating 1st Pull Request via CLI (gh) --- ...tallation.md => 00-gh_cli_installation.md} | 0 docs/gemstones/01-gh_cli_1st_pr.md | 83 +++++++++++++++++++ 2 files changed, 83 insertions(+) rename docs/gemstones/{gh_cli_installation.md => 00-gh_cli_installation.md} (100%) create mode 100644 docs/gemstones/01-gh_cli_1st_pr.md diff --git a/docs/gemstones/gh_cli_installation.md b/docs/gemstones/00-gh_cli_installation.md similarity index 100% rename from docs/gemstones/gh_cli_installation.md rename to docs/gemstones/00-gh_cli_installation.md diff --git a/docs/gemstones/01-gh_cli_1st_pr.md b/docs/gemstones/01-gh_cli_1st_pr.md new file mode 100644 index 0000000000..06b3da1974 --- /dev/null +++ b/docs/gemstones/01-gh_cli_1st_pr.md @@ -0,0 +1,83 @@ + +--- +title: 1st time contribution to Rocky Linux Documentation via CLI +author: Wale Soyinka +contributors: [List of Contributors] +tags: + - GitHub + - Rocky Linux + - Contribution + - Pull Request + - CLI +--- + +## Introduction + +This guide details how to contribute to the Rocky Linux documentation using only the command line interface (CLI). It covers forking the repository and creating a pull request. +We'll use contributing a new Gemstone document in our example. + +## Problem Description + +Contributors may prefer or need to perform all actions via the CLI, from forking repositories to submitting pull requests for the very first time. + +## Prerequisites + +- A GitHub account +- `git` and `GitHub CLI (gh)` installed on your system +- A markdown file ready for contribution + +## Solution Steps + +1. **Fork the Repository Using GitHub CLI**: + Fork the upstream repository to your account. + ```bash + gh repo fork https://github.com/rocky-linux/documentation --clone + ``` + +2. **Navigate to the Repository Directory**: + ```bash + cd documentation + ``` + +3. **Add the Upstream Repository**: + ```bash + git remote add upstream https://github.com/rocky-linux/documentation.git + ``` + +4. **Create a New Branch**: + Create a new branch for your contribution. Type: + ```bash + git checkout -b new-gemstone + ``` + +5. **Add Your New Document**: + Use your favorite text editor to create and edit the file containing your new contribution. + For this example, we'll create a new file named `gemstome_new_pr.md` and save the file under the `docs/gemstones/` directory. + +6. **Commit Your Changes**: + Stage and commit your new file. Type: + ```bash + git add docs/gemstones/gemstome_new_pr.md + git commit -m "Add new Gemstone document" + ``` + +7. **Push to Your Fork**: + Push the changes to your fork/copy of the Rocky Linux documentation repo. Type: + ```bash + git push origin new-gemstone + ``` + +8. **Create a Pull Request**: + Create a pull request to the upstream repository. + ``` + gh pr create --base main --head wsoyinka:new-gemstone --title "New Gemstone: Creating PRs via CLI" --body "Guide on how to contribute to documentation using CLI" + ``` + +## Additional Information (Optional) + +- Use `gh pr list` and `gh pr status` to track the status of your pull requests. +- Review and follow the contribution guidelines of the Rocky Linux documentation project. + +## Conclusion + +Following these steps, you should be able to successfully create your very first PR and contribute to the Rocky Linux documentation repository entirely via the CLI!