Skip to content
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

Added GitHub support for self-hosted repositories (fix: #269) #429

Closed
wants to merge 1 commit into from

Conversation

haardikdharma10
Copy link

Description

Added support for Github, similar to Gitlab, for self-hosted repositories.

Motivation and Context

Fixes: #269

@adelkahomolova
Copy link
Contributor

Can you add tests for your code? Thank you :) @haardikdharma10

@haardikdharma10
Copy link
Author

Sure thing @adelkahomolova, is there an example test template I can refer?

@adelkahomolova
Copy link
Contributor

Sure thing @adelkahomolova, is there an example test template I can refer?

Sure, you can be inspired by three already existing component detectors. For example JavaScriptComponentDetector

@haardikdharma10

@adelkahomolova
Copy link
Contributor

@haardikdharma10 Hi, how are you going? Do you need any help?

@haardikdharma10
Copy link
Author

Hii @adelkahomolova, yeah I'm having difficulties in adding tests, if you can help me with that? What do you think about the code I pushed? 🤔

@adelkahomolova
Copy link
Contributor

The problem is you've just copied the code from implementation for GitLab. I told you this isn't the way you should proceed. The APIs are different. There are no projects in GitHub and also the Github client (Octokit) doesn't have methods this.client.Versin.check(), this.client.Projects.list() nor this.client.Users.listGroups(). I also don't think Github has properties like revision and version. So the reason why you have difficulties with tests is, that your code can't be working since you're using methods that don't exist on the GH Client (octokit).
Here is the documentation for GitHub REST API where you should find everything you need for completing this task. https://docs.github.com/en/free-pro-team@latest/rest
@haardikdharma10

@adelkahomolova
Copy link
Contributor

Hi @haardikdharma10 did you work on the pull request?

@adelkahomolova
Copy link
Contributor

Hi, @haardikdharma10 , is there any progress? :)

@prokopsimek
Copy link
Member

/close not finished

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GitHub doesn't support self-hosted repositories
3 participants