Skip to content

Extend Project class to contain the owner #75

Open

Description

@jvcoutinho

Problem
To get the owner of a project given as a link to the input, we must to pass the access key and request a GET to the GitHub API. I think this is unnecessary effort.

private static String getOwnerName() {
String githubToken = MiningFramework.arguments.getAccessKey()
GithubHelper githubHelper = new GithubHelper(githubToken)
return githubHelper.getUser()['login']
}

Cause
The Project class doesn't have the owner field.

Suggestion
Parse the owner at Project's object creation (input parsing). For URLs, it's already there. For local file paths, you can use some Git tricks to retrieve the URLs.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions