grimoirelab-elk icon indicating copy to clipboard operation
grimoirelab-elk copied to clipboard

Repo_name and Repository are the same thing in different git based schemas

Open jsmanrique opened this issue 7 years ago • 5 comments

It would help having the same field name (repo_nameor repository) for the name of the repository in the git related data indexes. Currently, they are different names for the same things in git and areas_of_code data schema.

jsmanrique avatar Apr 27 '18 10:04 jsmanrique

If you are suffering this issue: as a workaround you can create a scripted field that copies repo_name to "repository" in the "git" index.

canasdiaz avatar Dec 16 '22 12:12 canasdiaz

There is a strong limitation here as it is not possible to pin a repository in any of the Git dedicated dashboards and use that filter in the Areas of Code repository. My proposal here is to add the repository field and mark repo_name as deprecated. In the meantime applying the workaround manually should solve it.

canasdiaz avatar Dec 19 '22 11:12 canasdiaz

The current mess:

index pattern repository repo_name github_repo gitlab_repo origin tag url
git missing available short missing available available missing
git_areas_of_code available missing missing missing available missing missing
git_releases missing available short missing available available missing
github_repositories missing missing missing missing available available available
github_issues linked missing short linked missing available available other content
github2_issues available missing short missing available available other content
github2_pull_requests available missing short missing available available other content
gitlab_issues linked missing missing short encoded encoded other content
gitlab_merge_requests linked missing missing short encoded encoded other content
gerrit short missing missing missing domain domain other content

fioddor avatar Dec 19 '22 13:12 fioddor

I think it is very important first to unify the criteria with the git based repos. We can discuss later about the GitHub/Lab ones.

canasdiaz avatar Dec 20 '22 21:12 canasdiaz

Let's take the sanitized full git https URL as baseline:

sanitize: strip user and password if present in the URL.

  • Field name: repo_url_git
  • Pattern: https:///<repo_path>/<repo_name>.git

Then we can derive the URL usual in Github/GitLab, e.g. the git URL without the .git extension:

  • Field name: repo_url_web
  • Pattern: https:///<repo_path>/<repo_name>
  • Alternative field names: repo_url_forge, repo_weburl, repo_forgeurl

The path to repo within the forge

  • Field name: repo_path

The (clean) repository name

  • Field name: repo_name.
  • Alternative field name: repo_shortname

We might also need the slug (the current github_repo field).

  • Field name: repo_slug.
  • Pattern: <repo_path>/<repo_name>
  • Alternative field names: repo_path_name or repo_fullname or repo_fulllpath

The forge instance domain:

  • Field name: repo_domain
  • Alternative field names: repo_server, repo_server_domain, repo_forge_domain, repo_forge_server, repo_forge_instance

The Github owner:

  • Field name: repo_github_owner
  • Pattern: <repo_path>

The GitLab group:

  • Field name: repo_gitlab_group
  • Pattern: <repo_path> = <repo_gitlab_group_lineage>/<repo_gitlag_group>

fioddor avatar Apr 04 '24 09:04 fioddor