Skip to content

Commit 9617e71

Browse files
Copilotjbampton
andauthored
Add GitHub CLI contributing section to README
Agent-Logs-Url: https://github.com/NextCommunity/NextCommunity.github.io/sessions/a4b976e4-10d8-406a-a686-7eb6217202a8 Co-authored-by: jbampton <418747+jbampton@users.noreply.github.com>
1 parent 658ff09 commit 9617e71

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed

README.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
- [How to Add Yourself](#-how-to-add-yourself)
2929
- [YAML File Format](#-yaml-file-format)
3030
- [Local Development](#-local-development-optional)
31+
- [Contributing with GitHub CLI](#-contributing-with-github-cli)
3132
- [Git Workflow & Keeping in Sync](#-git-workflow--keeping-in-sync)
3233
- [Contribution Guidelines](#-contribution-guidelines)
3334
- [Troubleshooting](#-troubleshooting--faq)
@@ -185,6 +186,97 @@ git push origin my-feature-branch
185186

186187
---
187188

189+
## 🖥️ Contributing with GitHub CLI
190+
191+
Prefer the terminal over the browser? The [GitHub CLI (`gh`)](https://cli.github.com/) lets you complete the entire contribution workflow without leaving your command line. Install it from <https://cli.github.com/> and authenticate once with `gh auth login`.
192+
193+
### Step 1: Fork the Repository
194+
195+
```bash
196+
# Fork the repo and clone it locally in one command
197+
gh repo fork NextCommunity/NextCommunity.github.io --clone=true --remote=true
198+
cd NextCommunity.github.io
199+
```
200+
201+
The `--remote=true` flag automatically adds the original repo as an `upstream` remote, so you stay in sync without any extra setup.
202+
203+
### Step 2: Create a Feature Branch
204+
205+
```bash
206+
# Make sure your local main is up to date first
207+
git checkout main
208+
git pull upstream main
209+
210+
# Create and switch to a new feature branch
211+
git checkout -b add-your-github-username
212+
```
213+
214+
Use a descriptive branch name such as `add-jbampton` or `fix-yaml-typo`.
215+
216+
### Step 3: Create Your Profile File
217+
218+
```bash
219+
# Navigate to the users directory and create your YAML file
220+
cp src/users/_template.yaml src/users/your-github-username.yaml
221+
```
222+
223+
Open `src/users/your-github-username.yaml` in your editor and fill in your details (see [YAML File Format](#-yaml-file-format) below for the full field reference).
224+
225+
### Step 4: Test Locally (Optional but Recommended)
226+
227+
```bash
228+
npm install
229+
npm start
230+
```
231+
232+
Visit `http://localhost:8080` to preview your profile before submitting.
233+
234+
### Step 5: Commit and Push
235+
236+
```bash
237+
# Stage your new profile file
238+
git add src/users/your-github-username.yaml
239+
240+
# Commit with a descriptive message
241+
git commit -m "Add [Your Name] to developer directory"
242+
243+
# Push your feature branch to your fork
244+
git push origin add-your-github-username
245+
```
246+
247+
### Step 6: Open a Pull Request with `gh`
248+
249+
```bash
250+
gh pr create \
251+
--repo NextCommunity/NextCommunity.github.io \
252+
--base main \
253+
--title "Add [Your Name] to directory" \
254+
--body "Fixes #213
255+
256+
Adding my profile to the NextCommunity developer directory."
257+
```
258+
259+
The command prints a URL to the newly created PR. That's it — no browser required!
260+
261+
### Step 7: Monitor CI and Respond to Feedback
262+
263+
```bash
264+
# Watch the status of checks on your PR
265+
gh pr checks
266+
267+
# View any review comments left by maintainers
268+
gh pr view --comments
269+
270+
# If changes are requested, edit your file, then commit and push again
271+
git add src/users/your-github-username.yaml
272+
git commit -m "Address review feedback"
273+
git push origin add-your-github-username
274+
```
275+
276+
Once all checks pass and a maintainer approves the PR, it will be merged and your profile will go live! 🎉
277+
278+
---
279+
188280
## 📝 YAML File Format
189281

190282
### Required Fields

0 commit comments

Comments
 (0)