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

Create a new repo #305

Open
mcmayer opened this issue Dec 23, 2017 · 1 comment
Open

Create a new repo #305

mcmayer opened this issue Dec 23, 2017 · 1 comment

Comments

@mcmayer
Copy link
Contributor

mcmayer commented Dec 23, 2017

I'm going round in circles when trying to create a new repo:

Suppose I'm given the repo name "test"

myRepoName :: String
myRepoName = "test"

Then I'd like to instantiate a NewRepo

let nr = NewRepo {
            newRepoName = myRepoName,
            newRepoDescription = Nothing,
            newRepoHomepage = Nothing,
            newRepoPrivate = Just False,
            newRepoHasIssues = Just True,
            newRepoHasWiki = Just True,
            newRepoAutoInit = Just True
        }
let auth = GitHub.OAuth "abcdef"
GitHub.createRepo' auth nr

But newRepoName wants the type Name Repo and I don't quite see how it can be constructed. mkName has a proxy entity as first argument (which it discards), and entity should be a Repo. I don't have a Repo, though.

Could you explain this proxy entity construct?

@mcmayer
Copy link
Contributor Author

mcmayer commented Dec 23, 2017

the answer is fromString

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

No branches or pull requests

2 participants