Skip to content

Commit

Permalink
Document how to check out a fork (#459)
Browse files Browse the repository at this point in the history
Co-authored-by: Christopher Moyer <[email protected]>
  • Loading branch information
jdbaldry and chri2547 authored Feb 6, 2024
1 parent f66a0d5 commit aee40b2
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -376,3 +376,20 @@ GitHub CLI simplifies some git workflows when working with GitHub repositories.
### Install GitHub CLI

To install the GitHub CLI tool, refer to [Installation](https://github.com/cli/cli#installation).

### Check out a fork

To check out a branch from a contributor's fork, use `gh pr checkout <PR NUMBER>`.
For more information, refer to [`gh pr checkout`](https://cli.github.com/manual/gh_pr_checkout).

The GitHub CLI tool automatically configures the remote tracking branch so you can push and pull from the fork branch.

<!-- vale Grafana.Timeless = NO -->

{{< admonition type="note" >}}
You can only push to a fork if the PR author has enabled **Allow edits and access to secrets by maintainers** or **Allow edits by maintainers**.

To enable maintainer edits, refer to [Enabling repository maintainer permissions on existing pull requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork#enabling-repository-maintainer-permissions-on-existing-pull-requests).
{{< /admonition >}}

<!-- vale Grafana.Timeless = YES -->
13 changes: 7 additions & 6 deletions vale/Grafana/ReferTo.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
extends: substitution
message: Prefer '%s' instead of '%s'
message: When linking in Markdown, use '%s' instead of '%s'.
link: https://grafana.com/docs/writers-toolkit/write/style-guide/style-conventions/#links-and-references
level: warning
level: error
ignorecase: false
action:
name: replace
scope: raw
swap:
Check out: Refer to
See: Refer to
check out: refer to
see: refer to
"Check out \\[": "Refer to ["
"See \\[": "Refer to ["
"check out \\[": "refer to ["
"see \\[": "refer to ["
1 change: 0 additions & 1 deletion vale/Grafana/WordList.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ swap:
blacklist: blocklist
chapter: documents|pages|sections
check box: checkbox
check: select
config file: configuration file
content type: media type
curated roles: predefined roles
Expand Down
4 changes: 4 additions & 0 deletions vale/fixtures/Grafana/ReferTo/.vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
StylesPath = ../../../
MinAlertLevel = suggestion
[*.md]
Grafana.ReferTo = YES
4 changes: 4 additions & 0 deletions vale/fixtures/Grafana/ReferTo/testinvalid.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testinvalid.md:1:1:Grafana.ReferTo:When linking, use 'Refer to [' instead of 'See ['.
testinvalid.md:2:1:Grafana.ReferTo:When linking, use 'Refer to [' instead of 'Check out ['.
testinvalid.md:4:23:Grafana.ReferTo:When linking, use 'refer to [' instead of 'see ['.
testinvalid.md:5:23:Grafana.ReferTo:When linking, use 'refer to [' instead of 'check out ['.
5 changes: 5 additions & 0 deletions vale/fixtures/Grafana/ReferTo/testinvalid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
See [here](https://example.com).
Check out [the link](https://example.com).

For more information, see [link text](https://example.com).
For more information, check out [link text](https://example.com).
Empty file.
1 change: 1 addition & 0 deletions vale/fixtures/Grafana/ReferTo/testvalid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
In order to check out the git repository.

0 comments on commit aee40b2

Please sign in to comment.