Skip to content

Drop deprecated repo_name passed to gitlabr::use_gitlab_ci() - #78

Open
VincentGuyader wants to merge 1 commit into
mainfrom
fix/gitlabr-2.1-drop-repo-name
Open

Drop deprecated repo_name passed to gitlabr::use_gitlab_ci()#78
VincentGuyader wants to merge 1 commit into
mainfrom
fix/gitlabr-2.1-drop-repo-name

Conversation

@VincentGuyader

Copy link
Copy Markdown
Member

Contexte

R-CMD-check et test-coverage étaient rouges sur main depuis 2025-10-23 :

```
Error in `gitlabr::use_gitlab_ci(image = image, repo_name = repo_name, path = ci_file, type = type)`:
unused argument (repo_name = repo_name)
```

Cause

gitlabr 2.1 a supprimé l'argument repo_name. Le mirror CRAN est désormais paramétré dans le template YAML via la variable CI/CD REPO_NAME (cf. `inst/gitlab-ci/bookdown-production.yml` chez gitlabr) plutôt qu'en argument de fonction.

Fix

  • Ne plus forwarder repo_name à `gitlabr::use_gitlab_ci()`.
  • Garder l'argument côté lozen pour compatibilité ascendante avec les appelants existants, marqué deprecated dans la doc et avec un `cli_alert_warning` si fourni explicitement.
  • Mêmes modifs côté flat fusen (`dev/flat_init_gitlab_ci.Rmd`) pour rester en phase.
  • Bump RoxygenNote 7.3.1 → 7.3.3 (effet de bord du `roxygenise()`).

Test

```

devtools::test(filter = "use_gitlab_ci$|check_if_yaml_exists")
[ FAIL 0 | WARN 0 | SKIP 5 | PASS 4 ]
```

Les tests précédemment rouges (`test-use_gitlab_ci.R:5:5` et `test-check_if_yaml_exists.R:5:5`) passent. Les SKIPs sont des tests `skip_on_ci()` existants pour scénarios bookdown/golem qui demandent un GitLab réel.

`gitlabr::use_gitlab_ci()` removed the `repo_name` parameter in 2.1: the
CRAN mirror is now read from the `REPO_NAME` GitLab CI/CD variable in the
generated YAML (see gitlabr's bookdown-production.yml template), not from
a function argument. lozen still passed `repo_name = repo_name` and so
errored with `unused argument`.

The lozen `repo_name` parameter is kept in the signature for backward
compatibility but documented as deprecated and emits a warning when set
explicitly. The internal call to gitlabr no longer forwards it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant