-
Notifications
You must be signed in to change notification settings - Fork 85
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
Currently lacks support for GitLab repositories #91
Comments
Thanks, yes, we've previous considered this in #69, did you take a look at that? Checking again just now, I see that the developers of usethis are not interested to support gitlab at the moment: r-lib/usethis#567 |
Thanks, @benmarwick, for alerting me to the very similar #69. Nonetheless, that issue seemed to be resolved by a solution that does not resolve the issue I've posted here. Solution to #69 [bold added by @ntrlshrp ]: My new issue #91: I would like the convenience function,
This convenience function strikes me as easy and allows maximum benefit from |
Yes, it would be useful to see this function you propose appear in your fork where we can explore and test it. Given the challenges that the Your proposal (a) may need further discussion. We decided with So it might be more consistent with our current approach to have an argument in those docker and travis functions that has a default value of GitHub, which the user can change to GitLab. |
Finally with some free time, I've pushed an MWE of Recipe
Part 2
GitLab will run two CI/CD jobs, Part 3
GitLab will run five CI/CD jobs, the two jobs above plus Outputs
I'm curious to see if these changes work for those who primarily use github and, more generally, on other machines. There is no rigorous testing of the changes yet, simply an MWE to get things off the ground. Details
|
When I tried to test this workflow I got stuck because my git user name does not equal my gitlab user name.
is not a sufficient solution, I guess. Maybe you could also add some documentation for |
Thanks, @nevrome ! This is awesome. I don't have time presently, but will attempt to resolve this issue %1 where gitlab username does not equal the value returned by |
In response to @nevrome, who pointed out a simple, but critical bug (and the need for more documentation), I've whipped up a new branch on my fork, Recipe
Part 2
GitLab will run two CI/CD jobs, Part 3 is as above. NOTES:
Feedback:
I hope this is helpful. Thanks. PS: Running Parts 1 and 2 inside a Docker container (replace
|
Thank you for your patience, @ntrlshrp. I finally came around to test this fixed implementation. Everything seems to work and the documentation is fine. You did an excellent job here and I'm sorry that it took my so long to come back to this. What do you think @benmarwick? I suggest you, @ntrlshrp, create PR to the current rrtools master and we review it formally. You don't have to add any message in the PR, just a link to this issue. If more tests and features are required it will become clear there. I'm for example not sure if these backup .bak-files (?) are necessary. I also get the warning
when I apply |
No need for apologies, @nevrome , glad to hear that it looks ready for a more formal review. Please see the suggested PR. Thanks again! Also, your solution to the backup |
Closing due to lack of activity. |
I'm curious to see if others think this would be valuable to this package. Thanks!
Is your feature request related to a problem? Please describe.
I want to use
rrtools
and host my remote repository on GitLab, not GitHub. Currently, there are no convenience functions to make this happen (nor to change all instances ofgithub.com
togitlab.com
(e.g., in theREADME.Rmd
)).Describe the solution you'd like
Offer users a convenience function,
rrtools::use_gitlab
that is analogous tousethis::use_github(credentials = git2r::cred_ssh_key(), auth_token = "xxxx", protocol = "https", private = FALSE)
doing the following:git push --set-upstream
git remote add origin
.gitlab-ci.yml
(GitLab does their own Continuous Integration and Continuous Development (CI/CD))Dockerfile
in that.gitlab-ci.yml
(so you can reproduce the outputs usingdocker
rather thangitlab-runner
)Outside this convenience function, other changes may be necessary:
rrtools::use_travis()
function to alert the user to possible duplication and allow an off-ramp if GitLab CI/CD already covers the user's needsrrtools::create_compendium()
function to ask if GitHub or GitLabREADME.Rmd
onrrtools
to alert people that you can dorrtools::use_gitlab()
to do in a single step what is currently represented as steps (3b)usethis::use_github
, (6)rrtools::use_dockerfile()
, and (7)rrtools::use_travis()
Describe alternatives you've considered
I could attempt to request this feature in the
usethis
package rather than here, i.e.,usethis::use_gitlab
. My sense, however, is that this is fairly simple to start a new repository by simply calling somesystem()
functions although, at the same time, I see thatusethis::use_github
is ~70 lines with at least 6 checks that the function can appropriately succeed.Also, if
rrtools
uses the hypotheticalusethis::use_gitlab()
, it may be difficult to wrap into a single step what is currently represented as steps (3b)usethis::use_github
, (6)rrtools::use_dockerfile()
, and (7)rrtools::use_travis()
.Additional context
NA
The text was updated successfully, but these errors were encountered: