You're welcome to contribute to gitlabr by editing the source code, adding more convenience functions, filing issues, etc. This document compiles some information helpful in that process.
Please also note the Code of Conduct.
If you want to run the test suite locally, you need to setup a a Gitlab instance for testing. Then, in the file tests/environment.yml
configuration variables are recorded about how to connect to the gitlab instance. tests/environment.yml.example contains an example configuration for a server that is, however, not publicly available for a testing.
The gitlab test suite expects certain entities (user, project, files) to be present in the test server. Here is how to setup a test server:
testor
, owned by the user testuser
, and containing a README.md fileWhen the test server is set up as described above tests can be run with the following R code that loads the recorded environment variables and runs the test code:
library(devtools)
library(yaml)
do.call(Sys.setenv, yaml.load_file("tests/environment.yml")) ## load test environment variables
test() ## run tests
The test suite is intended for use with Gitlab API v4, compatibility with API v3 is no longer maintained. Still, you can switch to run the tests against API v3, by setting the environment variable GITLABR_TEST_API_VERSION
to value v3
. Note that API v3 is not present in recent gitlab versions!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.