-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/fetch GitHub repo #217
Open
InbarDanieli
wants to merge
16
commits into
Pull-Request-Community:master
Choose a base branch
from
InbarDanieli:feat/fetch-github-repo
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
fdb53ea
feat: fetch github apu
InbarDanieli 045f738
Merge branch 'master' of https://github.com/InbarDanieli/pull-request…
InbarDanieli 201e34b
create github service
InbarDanieli 5933ee6
docs: added github api
InbarDanieli 3b6a5b5
Merge branch 'master' of https://github.com/InbarDanieli/pull-request…
InbarDanieli a9e5bb9
fix pr
InbarDanieli b2a68f0
fix: conflicting files
InbarDanieli 4c81460
lint
InbarDanieli 9566990
chore: image error
InbarDanieli d67f6d0
lint
InbarDanieli 2439e02
chore: undo vs code changes
InbarDanieli 87819ab
chore: undo vs code changes
InbarDanieli c46a4f4
chore: undo vs code changes
InbarDanieli c619980
chore: undo vs code changes
InbarDanieli f49db45
pr fixes
InbarDanieli 1f52b05
Merge branch 'master' of https://github.com/InbarDanieli/pull-request…
InbarDanieli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default interface githubFullinfo { | ||
stars: number; | ||
license: string; | ||
languages: object[]; | ||
projectname: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
import React from 'react'; | ||
import Technologies from './technologies/Technologies'; | ||
import style from './ProjectPage.module.scss'; | ||
import githubFullinfo from './ProjectPage.model'; | ||
|
||
function ProjectsPage() { | ||
function ProjectsPage({ stars, license, languages, projectname }: githubFullinfo) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please move type to new Interface There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @MichalPorag What do you mean by that? |
||
return ( | ||
<div className={style.descriptionContainer}> | ||
<h3 className={style.title}> | ||
<div className={style.star} /> | ||
Vest | ||
<div data-stars={stars} className={style.star} /> | ||
{projectname} | ||
</h3> | ||
<p dir="auto" className={style.description}> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut | ||
|
@@ -21,8 +22,8 @@ function ProjectsPage() { | |
</p> | ||
|
||
<div className={style.infoContainer}> | ||
<Technologies /> | ||
<div className={style.license}>Mozilla Public License 2.0</div> | ||
<Technologies lang={languages} /> | ||
<div className={style.license}>{license}</div> | ||
</div> | ||
</div> | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default interface TechnologiesProps { | ||
lang: object[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,4 +52,35 @@ export const Component = (props: Props): ReactElement => { | |
} | ||
``` | ||
|
||
## GitHub API | ||
|
||
In case you get an error from GitHub like this: | ||
|
||
```json | ||
{ | ||
"message": "API rate limit exceeded for xxx.xxx.xxx.xxx." | ||
} | ||
``` | ||
|
||
you may need to add a github token to your local enviroment to increase your rate limit. | ||
|
||
### Use Locally: | ||
|
||
#### Setup | ||
|
||
- first, you need to create your own [personal token](https://docs.github.com/en/[email protected]/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) | ||
- create `.env.local` file in the project's root | ||
- add this line to the `.env.local` file: `GITHUB_API_KEY=<personal-token>` | ||
- restart your local server | ||
|
||
#### Usage | ||
|
||
```tsx | ||
import { getOctokit } from '<relative path>/services/github'; | ||
|
||
const octokit = getOctokit(); | ||
``` | ||
|
||
> learn more about octokit [here](https://github.com/octokit/octokit.js#octokitrest-endpoint-methods). | ||
|
||
We hope you will have a great time contributing to this project. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What layout="fill" is for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without it i get this error
Also happens in master