Skip to content

Commit 64f793d

Browse files
Copilotjbampton
andauthored
docs: Add GitHub CLI alternative for contributing workflow (#420)
* 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> * Fix GitHub CLI section placement and ToC order in README Agent-Logs-Url: https://github.com/NextCommunity/NextCommunity.github.io/sessions/17aecb28-afd3-40b6-9bae-942ced043323 Co-authored-by: jbampton <418747+jbampton@users.noreply.github.com> * Disable MD024 and MD051 in markdownlint config Agent-Logs-Url: https://github.com/NextCommunity/NextCommunity.github.io/sessions/ed8e1077-c03c-461a-ba62-0ae39a857eea Co-authored-by: jbampton <418747+jbampton@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jbampton <418747+jbampton@users.noreply.github.com>
1 parent 658ff09 commit 64f793d

File tree

2 files changed

+98
-0
lines changed

2 files changed

+98
-0
lines changed

.github/linters/.markdown-lint.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
# MD013/line-length Line length
44
MD013: false
55

6+
# MD024/no-duplicate-heading No duplicate headings
7+
MD024: false
8+
9+
# MD051/link-fragments Link fragments
10+
MD051: false
11+
612
# MD033/no-inline-html Inline HTML
713
MD033: false
814

README.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
- [YAML File Format](#-yaml-file-format)
3030
- [Local Development](#-local-development-optional)
3131
- [Git Workflow & Keeping in Sync](#-git-workflow--keeping-in-sync)
32+
- [Contributing with GitHub CLI](#-contributing-with-github-cli)
3233
- [Contribution Guidelines](#-contribution-guidelines)
3334
- [Troubleshooting](#-troubleshooting--faq)
3435
- [License](#-license)
@@ -555,6 +556,97 @@ git push origin my-feature-branch --force-with-lease
555556

556557
---
557558

559+
## 🖥️ Contributing with GitHub CLI
560+
561+
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`.
562+
563+
### Step 1: Fork the Repository
564+
565+
```bash
566+
# Fork the repo and clone it locally in one command
567+
gh repo fork NextCommunity/NextCommunity.github.io --clone=true --remote=true
568+
cd NextCommunity.github.io
569+
```
570+
571+
The `--remote=true` flag automatically adds the original repo as an `upstream` remote, so you stay in sync without any extra setup.
572+
573+
### Step 2: Create a Feature Branch
574+
575+
```bash
576+
# Make sure your local main is up to date first
577+
git checkout main
578+
git pull upstream main
579+
580+
# Create and switch to a new feature branch
581+
git checkout -b add-your-github-username
582+
```
583+
584+
Use a descriptive branch name such as `add-jbampton` or `fix-yaml-typo`.
585+
586+
### Step 3: Create Your Profile File
587+
588+
```bash
589+
# Navigate to the users directory and create your YAML file
590+
cp src/users/_template.yaml src/users/your-github-username.yaml
591+
```
592+
593+
Open `src/users/your-github-username.yaml` in your editor and fill in your details (see [YAML File Format](#-yaml-file-format) for the full field reference).
594+
595+
### Step 4: Test Locally (Optional but Recommended)
596+
597+
```bash
598+
npm install
599+
npm start
600+
```
601+
602+
Visit `http://localhost:8080` to preview your profile before submitting.
603+
604+
### Step 5: Commit and Push
605+
606+
```bash
607+
# Stage your new profile file
608+
git add src/users/your-github-username.yaml
609+
610+
# Commit with a descriptive message
611+
git commit -m "Add [Your Name] to developer directory"
612+
613+
# Push your feature branch to your fork
614+
git push origin add-your-github-username
615+
```
616+
617+
### Step 6: Open a Pull Request with `gh`
618+
619+
```bash
620+
gh pr create \
621+
--repo NextCommunity/NextCommunity.github.io \
622+
--base main \
623+
--title "Add [Your Name] to directory" \
624+
--body "Fixes #213
625+
626+
Adding my profile to the NextCommunity developer directory."
627+
```
628+
629+
The command prints a URL to the newly created PR. That's it — no browser required!
630+
631+
### Step 7: Monitor CI and Respond to Feedback
632+
633+
```bash
634+
# Watch the status of checks on your PR
635+
gh pr checks
636+
637+
# View any review comments left by maintainers
638+
gh pr view --comments
639+
640+
# If changes are requested, edit your file, then commit and push again
641+
git add src/users/your-github-username.yaml
642+
git commit -m "Address review feedback"
643+
git push origin add-your-github-username
644+
```
645+
646+
Once all checks pass and a maintainer approves the PR, it will be merged and your profile will go live! 🎉
647+
648+
---
649+
558650
## 🤝 Contribution Guidelines
559651

560652
### Code of Conduct

0 commit comments

Comments
 (0)