Skip to content

Report HTTP and Markdown errors in repo view - #1403

Merged
vilmibm merged 2 commits into
trunkfrom
readme-markdown
Jul 21, 2020
Merged

Report HTTP and Markdown errors in repo view#1403
vilmibm merged 2 commits into
trunkfrom
readme-markdown

Conversation

@mislav

@mislav mislav commented Jul 21, 2020

Copy link
Copy Markdown
Contributor

If there is a dark file in the current directory, gh repo view will display No README provided even for repositories that have a README. This is due to Glamour trying to read style files from disk, and failing if dark did not contain style information as JSON. #1402

Any errors from fetching and rendering the README were silenced and ignored in repo view. This change:

  • Tolerates HTTP 404, but will raise exceptions for any other error;
  • Moves markdown rendering from api package to command implementation;
  • Ensures markdown rendering errors are correctly reported.

mislav added 2 commits July 21, 2020 13:47
Any errors from fetching and rendering the README were silenced and
ignored in `repo view`. This change:

- Tolerates HTTP 404, but will raise exceptions for any other error;
- Moves markdown rendering from `api` package to command implementation;
- Ensures markdown rendering errors are correctly reported.
@mislav
mislav requested a review from vilmibm July 21, 2020 12:08
@vilmibm
vilmibm merged commit 71bebd3 into trunk Jul 21, 2020
@mislav
mislav deleted the readme-markdown branch July 22, 2020 09:53
@Saleniece

Copy link
Copy Markdown

If there is a dark file in the current directory, gh repo view will display No README provided even for repositories that have a README. This is due to Glamour trying to read style files from disk, and failing if dark did not contain style information as JSON. #1402

Any errors from fetching and rendering the README were silenced and ignored in repo view. This change:

  • Tolerates HTTP 404, but will raise exceptions for any other error;
  • Moves markdown rendering from api package to command implementation;
  • Ensures markdown rendering errors are correctly reported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants