Description
Create a new component which renders a codebox with syntax highlighting with a files content. The component should accept the following parameters:
path: string (the file path)
commit: string (the commit hash)
repository: string (the repository name)
user: string (the repository owner's name)
- Get the file's content from the GitHub API
- Decode the base64 within the
content property returned
- Render the syntax highlighted content.
Each line of the codeblock should be clickable. For the time being it can just open a browser alert with the line number.
User Story
As a user
I want to be able to view code
So that I will can review it
Notes
Description
Create a new component which renders a codebox with syntax highlighting with a files content. The component should accept the following parameters:
path: string(the file path)commit: string(the commit hash)repository: string(the repository name)user: string(the repository owner's name)contentproperty returnedEach line of the codeblock should be clickable. For the time being it can just open a browser alert with the line number.
User Story
As a user
I want to be able to view code
So that I will can review it
Notes
?refparameter with the given commit hash to get the right contents