Skip to contents

Retrieves a GitLab project's metadata via the GET /projects/{id_project} endpoint of GitLab's v4 RESTful API.

Usage

project(
  id_project = funky::config_val("id_project"),
  base_url = funky::config_val("base_url"),
  token = funky::config_val("token"),
  max_tries = 3L
)

Arguments

id_project

integer(1)
GitLab project identifier.

base_url

character(1)
Base URL to the GitLab v4 RESTful API root.

token

character(1)
GitLab access token used for authentication. If NULL, the API request is made unauthenticated which results in HTTP 404 Not Found and other errors for non-public resources.

max_tries

integer(1)
Maximum number of request attempts in case of an HTTP error. An integerish scalar. Retries are performed using exponential backoff and jitter, see httr2::req_retry() for details.

Value

A list.

See also

Other functions to manage GitLab projects: project_default_branch()

Examples

gitlab::project(id_project = 64767928) |> names()
#>   [1] "id"                                               "description"                                      "name"                                            
#>   [4] "name_with_namespace"                              "path"                                             "path_with_namespace"                             
#>   [7] "created_at"                                       "default_branch"                                   "tag_list"                                        
#>  [10] "topics"                                           "ssh_url_to_repo"                                  "http_url_to_repo"                                
#>  [13] "web_url"                                          "readme_url"                                       "forks_count"                                     
#>  [16] "avatar_url"                                       "star_count"                                       "last_activity_at"                                
#>  [19] "visibility"                                       "namespace"                                        "container_registry_image_prefix"                 
#>  [22] "_links"                                           "marked_for_deletion_at"                           "marked_for_deletion_on"                          
#>  [25] "packages_enabled"                                 "empty_repo"                                       "archived"                                        
#>  [28] "resolve_outdated_diff_discussions"                "container_expiration_policy"                      "repository_object_format"                        
#>  [31] "issues_enabled"                                   "merge_requests_enabled"                           "wiki_enabled"                                    
#>  [34] "jobs_enabled"                                     "snippets_enabled"                                 "container_registry_enabled"                      
#>  [37] "service_desk_enabled"                             "service_desk_address"                             "can_create_merge_request_in"                     
#>  [40] "issues_access_level"                              "repository_access_level"                          "merge_requests_access_level"                     
#>  [43] "forking_access_level"                             "wiki_access_level"                                "builds_access_level"                             
#>  [46] "snippets_access_level"                            "pages_access_level"                               "analytics_access_level"                          
#>  [49] "container_registry_access_level"                  "security_and_compliance_access_level"             "releases_access_level"                           
#>  [52] "environments_access_level"                        "feature_flags_access_level"                       "infrastructure_access_level"                     
#>  [55] "monitor_access_level"                             "model_experiments_access_level"                   "model_registry_access_level"                     
#>  [58] "emails_disabled"                                  "emails_enabled"                                   "shared_runners_enabled"                          
#>  [61] "lfs_enabled"                                      "creator_id"                                       "import_url"                                      
#>  [64] "import_type"                                      "import_status"                                    "import_error"                                    
#>  [67] "open_issues_count"                                "description_html"                                 "updated_at"                                      
#>  [70] "ci_default_git_depth"                             "ci_delete_pipelines_in_seconds"                   "ci_forward_deployment_enabled"                   
#>  [73] "ci_forward_deployment_rollback_allowed"           "ci_job_token_scope_enabled"                       "ci_separated_caches"                             
#>  [76] "ci_allow_fork_pipelines_to_run_in_parent_project" "ci_id_token_sub_claim_components"                 "build_git_strategy"                              
#>  [79] "keep_latest_artifact"                             "restrict_user_defined_variables"                  "ci_pipeline_variables_minimum_override_role"     
#>  [82] "runner_token_expiration_interval"                 "group_runners_enabled"                            "auto_cancel_pending_pipelines"                   
#>  [85] "build_timeout"                                    "auto_devops_enabled"                              "auto_devops_deploy_strategy"                     
#>  [88] "ci_push_repository_for_job_token_allowed"         "ci_config_path"                                   "public_jobs"                                     
#>  [91] "shared_with_groups"                               "only_allow_merge_if_pipeline_succeeds"            "allow_merge_on_skipped_pipeline"                 
#>  [94] "request_access_enabled"                           "only_allow_merge_if_all_discussions_are_resolved" "remove_source_branch_after_merge"                
#>  [97] "printing_merge_request_link_enabled"              "merge_method"                                     "merge_request_title_regex"                       
#> [100] "merge_request_title_regex_description"            "squash_option"                                    "enforce_auth_checks_on_uploads"                  
#> [103] "suggestion_commit_message"                        "merge_commit_template"                            "squash_commit_template"                          
#> [106] "issue_branch_template"                            "warn_about_potentially_unwanted_characters"       "autoclose_referenced_issues"                     
#> [109] "max_artifacts_size"                               "external_authorization_classification_label"      "requirements_enabled"                            
#> [112] "requirements_access_level"                        "security_and_compliance_enabled"                  "compliance_frameworks"                           
#> [115] "web_based_commit_signing_enabled"                 "permissions"