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

Open
graemeblair opened this issue Apr 30, 2017 · 6 comments
Open

branch option #61

graemeblair opened this issue Apr 30, 2017 · 6 comments

Comments

@graemeblair
Copy link

@graemeblair 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

@eddelbuettel eddelbuettel commented Apr 30, 2017

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

@eddelbuettel eddelbuettel commented Dec 16, 2017

This too is now talken care of thank to @nfultz

@dracodoc
Copy link

@dracodoc dracodoc commented Mar 12, 2018

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

@dracodoc dracodoc commented Mar 12, 2018

Added via #73

@eddelbuettel
Copy link
Owner

@eddelbuettel eddelbuettel commented Mar 12, 2018

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

@dracodoc dracodoc commented Mar 12, 2018

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.

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.