Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 5f19480

Browse files
authored
Add readability report and secrets: bug fix (#794)
* Try this out * ${secrets.GH_PAT} * Update README * ${{ secrets. }} * Fix secrets * adding readability reports * Markdown * indent * Will this work? * Try it out * Fix image: * Try not fetch-depth: 0 * Try not actually on the docker image * Try this way * Try once more * markdownlint-cli2 * Update linter * continue-on-error: true * Try this out * echo it * Delete for now
1 parent e20a5b6 commit 5f19480

File tree

4 files changed

+38
-3
lines changed

4 files changed

+38
-3
lines changed

.github/workflows/pull_request.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ jobs:
4848
toggle_style_code: "${{ env.STYLE_CODE }}"
4949
toggle_url_check: "${{ env.URL_CHECKER }}"
5050
toggle_quiz_check: "${{ env.CHECK_QUIZZES }}"
51+
toggle_md_linter: "${{ env.MARKDOWN_LINTER }}"
52+
toggle_readability: "${{ env.READABILITY_REPORT }}"
5153
toggle_render_preview: "${{ env.RENDER_PREVIEW }}"
5254
rendering_docker_image: "${{ env.RENDERING_DOCKER_IMAGE }}"
5355

@@ -60,8 +62,9 @@ jobs:
6062
with:
6163
check_type: spelling
6264
error_min: 3
63-
gh_pat: secrets.GH_PAT
6465
branch_name: ${GITHUB_HEAD_REF}
66+
secrets:
67+
gh_pat: ${{ secrets.GH_PAT }}
6568

6669
url-check:
6770
name: Check URLs
@@ -71,8 +74,9 @@ jobs:
7174
with:
7275
check_type: urls
7376
error_min: 0
74-
gh_pat: secrets.GH_PAT
7577
branch_name: ${GITHUB_HEAD_REF}
78+
secrets:
79+
gh_pat: ${{ secrets.GH_PAT }}
7680

7781
quiz-check:
7882
name: Check quiz formatting
@@ -82,8 +86,9 @@ jobs:
8286
with:
8387
check_type: quiz_format
8488
error_min: 0
85-
gh_pat: secrets.GH_PAT
8689
branch_name: ${GITHUB_HEAD_REF}
90+
secrets:
91+
gh_pat: ${{ secrets.GH_PAT }}
8792

8893
############################# Style the code ###################################
8994
style-code:
@@ -110,6 +115,26 @@ jobs:
110115
git commit -m 'Style *mds' || echo "No changes to commit"
111116
git push origin || echo "No changes to commit"
112117
118+
############################# Readability Report ###################################
119+
120+
readability-report:
121+
name: Readability report
122+
needs: yaml-check
123+
runs-on: ubuntu-latest
124+
if: ${{needs.yaml-check.outputs.toggle_readability == 'yes'}}
125+
126+
steps:
127+
- name: Checkout repo
128+
uses: actions/checkout@v4
129+
with:
130+
fetch-depth: 0
131+
132+
- name: Readability report
133+
uses: Rebilly/lexi@v2
134+
with:
135+
github-token: ${{ secrets.GH_PAT }}
136+
glob: '**/*.md'
137+
113138
############################# Render Preview ###################################
114139

115140
render-preview:

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ _This template and guide helps you_:
2525
- [Advanced Reproducibility in Cancer Informatics](https://jhudatascience.org/Adv_Reproducibility_in_Cancer_Informatics/)
2626

2727
## To Get Started
28+
2829
- Go to the [ottrproject.org](https://www.ottrproject.org/).
2930
- Check out the [rendered version of the template](https://jhudatascience.org/OTTR_Template/).
3031
- Check out our [course on using Leanpub](https://hutchdatascience.org/Using_Leanpub/index.html) for help publishing on this platform.
3132
- Please take a look at the [code of conduct](./code_of_conduct.md).
3233
- If you encounter any problems or have ideas for improvements to this template repository or this getting started guide, please [file an issue here](https://github.com/jhudsl/OTTR_Template/issues/new/choose)! Your feedback is very much appreciated.
34+
35+
## Contributing
36+
37+
If you'd like to contribute, we love that! Please go to the [CONTRIBUTING.md doc](https://github.com/jhudsl/OTTR_Template/blob/main/CONTRIBUTING.md).

_output.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ bookdown::gitbook:
1616
<p style="text-align:center; font-size: 12px;"> <a href="https://github.com/rstudio4edu/rstudio4edu-book/"> Style adapted from: rstudio4edu-book </a> <a href ="https://creativecommons.org/licenses/by/2.0/"> (CC-BY 2.0) </a></p>
1717
bookdown::word_document2:
1818
toc: true
19+
always_allow_html: true

config_automation.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ render-preview: yes
1010
spell-check: yes
1111
# Style any R code
1212
style-code: yes
13+
# Would you like your markdown files to be checked for formatting
14+
markdown-linter: yes
15+
# Would you like a readability report on your markdowns?
16+
readability-report: yes
1317
# Test build the docker image if any docker-relevant files have been changed
1418
docker-test: no
1519
# Should URLs be tested periodically?

0 commit comments

Comments
 (0)