Skip to content

Commit

Permalink
Merge pull request #106 from ThinkR-open/mpolano-merged
Browse files Browse the repository at this point in the history
File operations with folders in path - pre-merged
  • Loading branch information
statnmap authored May 14, 2024
2 parents bd31578 + af7487f commit 6226dbc
Show file tree
Hide file tree
Showing 55 changed files with 1,510 additions and 1,232 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:

name: pkgdown

permissions: read-all

jobs:
pkgdown:
runs-on: ubuntu-latest
Expand All @@ -19,8 +21,10 @@ jobs:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand All @@ -39,7 +43,7 @@ jobs:

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
Expand Down
22 changes: 16 additions & 6 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,46 @@ jobs:
COMMENTED_COMMIT: '5666b975e168866ed77ae61d4cd5402a74f3d6c6'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
extra-packages: any::covr, any::xml2
needs: coverage


- name: Test coverage
run: |
covr::codecov(
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
file: ./cobertura.xml
plugin: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ devtools::test() ## run all tests
testthat::test_file("tests/testthat/test_ci.R") ## run test on one file
```

_Note that if the test suite fails, you may leave the repository in a state that is not cleaned._
_Hence, you may have to manually clean the repository on GitLab before running the tests again._

### How to check the package with GitHub Actions on your own fork

Expand Down Expand Up @@ -116,6 +118,8 @@ I recommend to keep only one OS tested to avoid unit tests to be run in parallel
To do so, you can comment all but one OS in ".github/workflows/R-CMD-check.yaml", and change the values of the variable according to your configuration.
-->

_Note that if the test suite fails, you may leave the repository in a state that is not cleaned._
_Hence, you may have to manually clean the repository on GitLab before running the tests again._

### API version

Expand Down
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: gitlabr
Title: Access to the 'Gitlab' API
Version: 2.0.1.9000
Version: 2.0.1.9002
Authors@R: c(
person("Jirka", "Lewandowski", , "[email protected]", role = "aut"),
person("Sébastien", "Rochette", , "[email protected]", role = c("aut", "cre"),
Expand All @@ -25,14 +25,15 @@ Imports:
httr (>= 1.1.0),
magrittr,
purrr (>= 0.2.2),
shiny (>= 0.13.0),
stringr,
tibble (>= 1.1),
tidyr,
utils
Suggests:
DT,
knitr,
rmarkdown,
shiny (>= 0.13.0),
testthat (>= 3.0.0),
yaml
VignetteBuilder:
Expand All @@ -42,4 +43,4 @@ Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.2
RoxygenNote: 7.3.1
41 changes: 8 additions & 33 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,30 +1,8 @@
# Generated by roxygen2: do not edit by hand

export("%>%")
export(archive)
export(assign_issue)
export(close_issue)
export(comment_commit)
export(comment_issue)
export(create_branch)
export(create_merge_request)
export(delete_branch)
export(edit_commit_comment)
export(edit_issue)
export(edit_issue_comment)
export(file_exists)
export(get_comments)
export(get_commit_comments)
export(get_commits)
export(get_diff)
export(get_file)
export(get_gitlab_connection)
export(get_issue)
export(get_issue_comments)
export(get_issues)
export(get_project_id)
export(gitlab)
export(gitlab_connection)
export(gitlabr_options_set)
export(glLoginInput)
export(glReactiveLogin)
Expand All @@ -41,10 +19,13 @@ export(gl_create_branch)
export(gl_create_issue)
export(gl_create_merge_request)
export(gl_delete_branch)
export(gl_delete_file)
export(gl_delete_group)
export(gl_delete_issue)
export(gl_delete_merge_request)
export(gl_delete_project)
export(gl_edit_commit_comment)
export(gl_edit_group)
export(gl_edit_issue)
export(gl_edit_issue_comment)
export(gl_edit_merge_request)
Expand All @@ -56,22 +37,27 @@ export(gl_get_commit_comments)
export(gl_get_commits)
export(gl_get_diff)
export(gl_get_file)
export(gl_get_group_id)
export(gl_get_issue)
export(gl_get_issue_comments)
export(gl_get_project)
export(gl_get_project_id)
export(gl_get_projects)
export(gl_group_req)
export(gl_jobs)
export(gl_latest_build_artifact)
export(gl_list_branches)
export(gl_list_files)
export(gl_list_group_members)
export(gl_list_group_projects)
export(gl_list_groups)
export(gl_list_issues)
export(gl_list_merge_requests)
export(gl_list_project_members)
export(gl_list_projects)
export(gl_list_sub_groups)
export(gl_list_user_projects)
export(gl_new_group)
export(gl_new_issue)
export(gl_new_project)
export(gl_pipelines)
Expand All @@ -82,19 +68,8 @@ export(gl_reopen_issue)
export(gl_repository)
export(gl_to_issue_id)
export(gl_unassign_issue)
export(list_branches)
export(list_files)
export(list_projects)
export(multilist_to_tibble)
export(new_issue)
export(proj_req)
export(project_connection)
export(push_file)
export(reopen_issue)
export(repository)
export(set_gitlab_connection)
export(to_issue_id)
export(unassign_issue)
export(unset_gitlab_connection)
export(use_gitlab_ci)
importFrom(arpr,iff)
Expand Down
22 changes: 16 additions & 6 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,38 @@

## Breaking changes

* Functions deprecated since version 0.7 are removed
* Transfer ownership of the project to ThinkR-open

## New features

* `gl_new_group()`, `gl_edit_group()`, `gl_delete_group()`, `gl_list_groups()`, `gl_list_sub_groups()` to deal with groups on a GitLab instance (@mpolano)
* `gl_delete_file()` to delete a file in a repository
* `gl_list_project_members()` and `gl_list_group_members` to retrieve members of a project or a group (#61, @datawookie)

## Minor changes

* `multilist_to_tibble()` transforms a deep structured nested list from an API into a tibble (#86, @statnmap, @ymansiaux)

## Bug fixes

* `gl_file_exists()`, `gl_list_files()`, `gl_push_file()`, `gl_delete_file()` now work with files in subdirectories

# gitlabr 2.0.1

New features
## New features

* Connection now uses the token as "header" instead of being sent clearly in the URL (#66, @ei-ds)
* `gl_list_group_projects()` lists projects of a group (@Yoshinobu-Ishizaki)
* `gl_list_project_members()` and `gl_list_group_members` to retrieve members of a project or a group (#61, @datawookie)

Minor changes
## Minor changes

* doc HTML5 re-created with last version of roxygen2


# gitlabr 2.0.0

Breaking changes
## Breaking changes

* Default branch is named `main` whenever required.
+ This can be changed with `gitlabr_options_set("gitlabr.main", "master")`
Expand All @@ -36,14 +46,14 @@ Breaking changes
* Changed use of `api_version = "v4"` by `api_version = 4`
* Changed use of `force_api_v3 = TRUE` by `api_version = 4` for deprecation by default

Major
## Major

* New use of `use_gitlab_ci()` with pre-defined templates
* Add new functions to manage projects: `gl_get_project()`, `gl_new_project()`, `gl_edit_project()`,
`gl_delete_project()`
* Update documentation: recommend using `gl_*` functions

Minor
## Minor

* `gl_archive()` is used to archive a project (not to download an archive)
* fix use of `max_page` with `gl_()` functions calling `gitlab()`
Expand Down
Loading

0 comments on commit 6226dbc

Please sign in to comment.