Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions docs/gemstones/00-gh_cli_installation.md
Original file line number Diff line number Diff line change
@@ -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
- Access to a terminal
- Basic familiarity with command line operations
- An existing Github account

## Proceedure

1. **Install GitHub CLI Using Script**:
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
```

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/).


83 changes: 83 additions & 0 deletions docs/gemstones/01-gh_cli_1st_pr.md
Original file line number Diff line number Diff line change
@@ -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!