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

Comments

Projects
None yet
3 participants
@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

This comment has been minimized.

Show comment
Hide comment
@eddelbuettel

eddelbuettel Apr 30, 2017

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.

Owner

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

This comment has been minimized.

Show comment
Hide comment
@eddelbuettel

eddelbuettel Dec 16, 2017

Owner

This too is now talken care of thank to @nfultz

Owner

eddelbuettel commented Dec 16, 2017

This too is now talken care of thank to @nfultz

@dracodoc

This comment has been minimized.

Show comment
Hide comment
@dracodoc

dracodoc 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 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

This comment has been minimized.

Show comment
Hide comment
@dracodoc

dracodoc commented Mar 12, 2018

Added via #73

@eddelbuettel

This comment has been minimized.

Show comment
Hide comment
@eddelbuettel

eddelbuettel Mar 12, 2018

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()`.

Owner

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

This comment has been minimized.

Show comment
Hide comment
@dracodoc

dracodoc 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.

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