generated from jhudsl/OTTR_Template_Website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
git_actions.Rmd
77 lines (47 loc) · 3.39 KB
/
git_actions.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
title: "Git Actions"
output: html_document
---
We have set up several checks for website content edits.
When you create a pull request, you will see something like this if everything is successful. You can click on the `preview of website here` link to see a preview. Please note that some features may not be possible to see in the preview. For example, icons may only show up as a box.
```{r, fig.align='center', fig.alt= "pull request checks", echo = FALSE, out.width="70%"}
knitr::include_graphics("resources/images/checks.png")
```
## Rendering Action
If the rendering action fails, you will see something like this:
```{r, fig.align='center', fig.alt= "render issue pull request image", echo = FALSE, out.width="80%"}
knitr::include_graphics("resources/images/render_fail.png")
```
If you click on where it says `Details` on the far right, you will be taken to more information about what may have gone wrong.
```{r, fig.align='center', fig.alt= "render issue pull request image", echo = FALSE, out.width="80%"}
knitr::include_graphics("resources/images/render_fail2.png")
```
For example, we can see that an R object was not found in one of the files. You could identify which file by scrolling up.
```{r, fig.align='center', fig.alt= "render issue pull request image", echo = FALSE, out.width="80%"}
knitr::include_graphics("resources/images/render_fail_details.png")
```
## Spelling and Style Action
You may find that you have spelling errors if you get the following message from your pull request (PR):
```{r, fig.align='center', fig.alt= "spelling issue pull request image", echo = FALSE, out.width="80%"}
knitr::include_graphics("resources/images/spelling.png")
```
If this happens, click the `Download the errors here.` link. This will take you to a table with words that the check thought were misspelled, as well as what file they occurred in and the lines in that file.
Add words that are **not** actually misspelled to the `dictionary.txt` file located in the `resources` directory. It's a good idea to try to keep this in alphabetical order.
For words that are indeed misspelled, fix the errors and push your changes to your pull request.
You should then see that your pull request has a different message that tells you that you have no spelling errors.
## URL Check
You may find that you have broken URLs. If so, you will get this message when you create a Pull Request.
```{r, fig.align='center', fig.alt= "URL issue pull request image", echo = FALSE, out.width="80%"}
knitr::include_graphics("resources/images/url_check.png")
```
You can click on the `Download the errors here` link to see a document with a list of broken URLs and what files they are located in, like this:
```{r, fig.align='center', fig.alt= "broken url list", echo = FALSE, out.width="80%"}
knitr::include_graphics("resources/images/urls.png")
```
Here we can see that there are two URLs that are broken in the `git_actions.Rmd` file.
## Completing a Pull Request
Once all the Git Action checks pass, you can merge your pull request to your main branch for your website.
```{r, fig.align='center', fig.alt= "finishing a pull request", echo = FALSE, out.width="80%"}
knitr::include_graphics("resources/images/checks2.png")
```
If you are only working on this yourself without others to review your pull request, you can click the `Merge without waiting for requirements to be met` box, so that you can click the `Merge pull request` button.