GitHub Integration (Proof of Concept)#578
Conversation
|
!!!! This is awesome. I'll review this in a few hours when I'm off work |
I think showing the number of stars and forks is a great start. Personally I'm not as interested in number of issues or open PRs. |
| <p>{(!this.state.package.authors) ? 'Unknown' : this.state.package.authors}</p> | ||
| </div> | ||
|
|
||
| <RepoDetails url={this.state.package.projectUrl}/> |
There was a problem hiding this comment.
The projectUrl is the package's website, not necessarily it's source repository. Please use the repositoryUrl property instead:
BaGet/src/BaGet.Core/Metadata/BaGetPackageMetadata.cs
Lines 28 to 29 in f0ee2c5
This property isn't part of the NuGet V3 protocol, but, it maps to the package's source repository metadata: https://docs.microsoft.com/en-us/nuget/reference/nuspec#repository
By the way, the repositoryUrl property on the TypeScript interface should be nullable. Could you fix that as part of your changes?
repositoryUrl?: string;| detailsFound: boolean; | ||
| } | ||
|
|
||
| class RepoDetails extends React.Component<IRepoDetailsProps, IRepoDetailsState> { |
There was a problem hiding this comment.
Just curious, why did you create a new component instead of updating the SourceRepository component?
There was a problem hiding this comment.
Once I've finished this I might remove the heading tag and put it inside the SourceRepository component, this is a good point
I did this, but the GitHub API often seems to return incorrect results for open issues (whether you use 'open_issues' or 'open_issues_count'), and doesn't return number of open PRs at all. Would we not be better off listing the number of stars and forks?
Once we have decided on stats and so on to return I will clean up the code, but this works as a proof of concept.
Addresses #97