profclems / glab

The GitLab CLI tool. Archived: now officially adopted by GitLab as the official CLI tool and maintained at https://gitlab.com/gitlab-org/cli. See https://github.com/profclems/glab/issues/983
https://glab.readthedocs.io/
MIT License
2.08k stars 163 forks source link

glab showing incorrect pipeline "triggered by" name. #987

Open byjokese opened 2 years ago

byjokese commented 2 years ago

Description In then command glab ci view <tag_name>, If the pipeline was triggered using a tag, glab picks the author from the commit that is tagged on. It should pick the name of the person who created the tag, as the GitLab page is showing.

Expected Behavior vs Actual Behavior GitLab Web and glab cli showing different authors in "triggered X minutes ago by XXXX"

imagen

Possible Fix Instead of picked the name from the commit author, https://github.com/profclems/glab/blob/f405b97e8e7948637d9b7999153a4aa3bf8b4a6b/commands/ci/view/view.go#L110, try to pick it up from the Pipeline object see (https://docs.gitlab.com/ee/api/pipelines.html) username.

Steps to Reproduce

  1. trigger a pipeline with a tag, in which the commit and the tag authors are different.
  2. Use the command glab ci view <tag_name> to view that both authors are different.

Logs No logs

Your Environment

clemsbot commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. We haven't had the time to address it yet, but we want to keep it open. This message is just a reminder for us to help triage issues.