ThinkR-open / attachment

Tools to deal with dependencies in scripts, Rmd and packages
https://thinkr-open.github.io/attachment/
Other
108 stars 13 forks source link

`set_remotes_to_desc()` does not account for branch #113

Closed statnmap closed 1 month ago

statnmap commented 6 months ago

I'd like set_remotes_to_desc() to account for source branch when asked

Validation

Run :

 fake_desc_gitlab_with_branch <- list(
    list(
        RemoteType = "gitlab",
        RemoteHost = "gitlab.com",
        RemoteRepo = "fakepkg",
        RemoteRef = "fakebranch",
        RemoteUsername = "fakeuser"
    )
) %>% setNames("fakepkg")

extract_pkg_info(fake_desc_gitlab_with_branch)

=> Return:

$fakepkg
[1] "gitlab::fakeuser/fakepkg@fakebranch"

Problem

structure(list(Package = "notionR", Title = "R interfase for Notion API", 
    Version = "0.0.0.9001", Author = "Eduardo Flores", Maintainer = "Eduardo Flores <eduardo@enelmargen.org>", 
    Description = "Provides wrappers to access the Notion API using R.", 
    License = "MIT + file LICENSE", URL = "https://Eflores89.github.io/notionR/,\nhttps://github.com/Eflores89/notionR", 
    Depends = "R (>= 2.10)", Imports = "dplyr, httr, httr2, stringi, tibble, tidyr", 
    Encoding = "UTF-8", Roxygen = "list(markdown = TRUE)", RoxygenNote = "7.3.1", 
    NeedsCompilation = "no", Packaged = "2024-02-13 17:42:12 UTC; sebastien", 
    Built = "R 4.3.2; ; 2024-02-13 17:42:12 UTC; unix", RemoteType = "github", 
    RemoteHost = "api.github.com", RemoteRepo = "notionR", RemoteUsername = "statnmap", 
    RemotePkgRef = "statnmap/notionR@to-httr2", RemoteRef = "to-httr2", 
    RemoteSha = "9572ee4417182e405f94c2bb20165468743b2606", GithubRepo = "notionR", 
    GithubUsername = "statnmap", GithubRef = "to-httr2", GithubSHA1 = "9572ee4417182e405f94c2bb20165468743b2606"), class = "packageDescription", file = "/path/to/notionR/Meta/package.rds")

results in

Remotes: 
    statnmap/notionR

instead of

Remotes: 
    statnmap/notionR@to-httr2

Tech

MurielleDelmotte commented 1 month ago

Validate