-
Notifications
You must be signed in to change notification settings - Fork 59
/
maintenance_github_grooming.Rmd
49 lines (26 loc) · 3.25 KB
/
maintenance_github_grooming.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
aliases:
- grooming.html
---
# GitHub Grooming {#grooming}
```{block, type="summaryblock"}
rOpenSci packages are currently in their vast majority developed on GitHub. Here are a few tips to leverage the platform in a section about [making your repo more discoverable](#repodiscoverability) and a section about [marketing your own GitHub account after going through peer review](#marketown).
```
## Make your repository more discoverable {#repodiscoverability}
### GitHub repo topics {#git-hub-repo-topics}
GitHub [repo topics](https://blog.github.com/2017-01-31-introducing-topics/) help browsing and searching GitHub repos, are used by [R-universe on package pages and for search results](https://github.com/r-universe-org/help#how-to-add-keyword-labels-to-an-r-package), and are digested by [`codemetar`](https://github.com/ropensci/codemetar) for rOpenSci registry keywords.
We recommend:
- Adding "r", "r-package" and "rstats" as topics to your package repo.
- Adding any other relevant topics to your package repo.
We might make suggestions to you after your package is onboarded.
### GitHub linguist {#git-hub-linguist}
[GitHub linguist](https://github.com/github/linguist) will assign a language for your repo based on the files it contains. Some packages containing a lot of C++ code might get classified as C++ rather than R packages, which is fine and shows the need for the "r", "r-package" and "rstats" topics.
We recommend overriding GitHub linguist by adding or modifying a .gitattributes to your repo in two cases:
- If you store html files in non standard places (not in docs/, e.g. in vignettes/) use the documentation overrides. Add `*.html linguist-documentation=true` to .gitattributes ([Example in the wild](https://github.com/ropensci/ecoengine/blob/56b64d8d29dfae430a776d1dd440b240452eb1bf/.gitattributes#L5))
- If your repo contains code you haven't authored, e.g. JavaScript code, add `inst/js/* linguist-vendored` to .gitattributes ([Example in the wild](https://github.com/ropensci/wellknown/blob/4435eb620eeae346d2cab7d62276c29dee29a898/.gitattributes#L1))
This way the language classification and statistics of your repository will more closely reflect the source code it contains, as well as making it more discoverable. Notably, if linguist does not correctly recognize your repo as containing mainly R code, your package won't appear in search results with the `language:R` filter. Similarly, your repo cannot be listed among the [trending R repos](https://github.com/trending/r).
More info about GitHub linguist overrides [here](https://github.com/github/linguist#overrides).
## Market your own account {#marketown}
- As the author of an onboarded package, you are now a member of rOpenSci's "ropensci" GitHub organization. By default, organization memberships are private; see [how to make it public in GitHub docs](https://help.github.com/articles/publicizing-or-hiding-organization-membership/).
- Even after your package repo has been transferred to rOpenSci, you can [pin it under your own account](https://help.github.com/articles/pinning-repositories-to-your-profile/).
- In general we recommend adding at least an avatar (which doesn't need to be your face!) and your name [to your GitHub profile](https://help.github.com/articles/customizing-your-profile/).