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

branch option #61

Closed
graemeblair opened this issue Apr 30, 2017 · 7 comments
Closed

branch option #61

graemeblair opened this issue Apr 30, 2017 · 7 comments

Comments

@graemeblair
Copy link

graemeblair commented Apr 30, 2017

Thanks for this terrifically useful package.

The branch that drat commits, gh-pages, is hardcoded. This is sensible in general, but for user or organization Github pages (i.e. user.github.io) Github requires those files to be stored in the master branch of a repo named user.github.io. Because of the hardcoding, it isn't possible to use drat to create a drat repo in such a Github repo.

What do you think of adding a field in insertPackage() for branch name, i.e. insertPackage(branch = "master")? Happy to add a PR.

@eddelbuettel
Copy link
Owner

a repo named user.github.io.

I think that had come up before and there was a reason not to do it. Maybe it was mostly because 'user.github.io' webpages don't correspond to the 'github.com/user/drat' scheme.

In any event one other (newer) change is worth considering too: master branch and docs/ directory. That is now permitted as an alternative.

The one thing I am a little wary about is the number of different code paths over the different helper functions. We'd need at least initRepo() and insertPackage() changed.

@eddelbuettel
Copy link
Owner

This too is now talken care of thank to @nfultz

@dracodoc
Copy link

gh-pages is still hard-coded in initRepo. Is it supposed to come from option dratBranch now? I didn't this option is set by default.

I think an option is fine for this, but initRepo and insertPackage should also provide a parameter for one time settings.

@dracodoc
Copy link

Added via #73

@eddelbuettel
Copy link
Owner

If you are suggesting a minimal (two file, maybe?) PR to add support for getOption("dratBranch", "gh-pages") to initRepo()then I would be favour as it works well enough in the existing functioninsertPackage()`.

@dracodoc
Copy link

The extreme minimal changes can be made with only changing initRepo and its .Rd file. However I felt it's easier to make one time adjustment for branch name with a parameter instead of options.

The default value still use options, so previous usage will not be interfered.

@eddelbuettel
Copy link
Owner

This can be closed, the lack of following suggests the issue is addressed. If more is needed please reopen and ideally demonstrate with small reproducible examples why.

Also, we have that change working in 0.1.8.1 (i.e GitHub version of drat) and it will be in the next CRAN release "real soon".

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

No branches or pull requests

3 participants