Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance pipeline message and pr title #3421

Draft
wants to merge 37 commits into
base: main
Choose a base branch
from

Conversation

6543
Copy link
Member

@6543 6543 commented Feb 22, 2024

Changes

  • show PR commit messages as "main" message
  • show PR title as a smaller text

@6543 6543 added enhancement improve existing features blocked It's ready but something external is blocking it forge/github github forge related forge/gitlab gitlab forge related forge/gitea gitea forge related forge/bitbucket bitbucket forge related labels Feb 22, 2024
@qwerty287
Copy link
Contributor

Actually the title field of pipelines is unused if I remember correctly 🤔 or is it shown in ui?

@6543
Copy link
Member Author

6543 commented Feb 22, 2024

This also change webui

@6543 6543 marked this pull request as ready for review February 22, 2024 09:21
@6543 6543 removed forge/github github forge related forge/gitlab gitlab forge related forge/gitea gitea forge related labels Feb 22, 2024
@anbraten anbraten changed the title Use actual title of event subjects if possible Enhance pipeline list Jun 25, 2024
@qwerty287
Copy link
Contributor

as text behind the author in by renovate (my pr title)
as on hover attribute for the #1234 badge
as text behind the message (normally commit message) like: chore(deps): lock file maintenance (my pr title)

I think the first option is the best if we then show the commit message as pipeline message. Otherwise it's duplicated. See e.g. the release PRs in your example: The ":tada: Release v2.7.0" is shown on top and in the message below.

How would this work with very long PR titles? And is this info shown in the pipeline detail view?

@anbraten
Copy link
Member

anbraten commented Jun 26, 2024

Okay then I would do it like:

  • first line: <first-line-of-message> on hover show the complete message
  • second line: .... <author> (<first-line-of-title>) title being left out if not set, on title hover showing the complete title

Events:

  • push:
    • message: commit-message
    • title: empty
  • pr / pr_closed:
    • message: commit-message
    • title: PR title (maybe + \n + PR description?)
  • tag:
    • message: commit message
    • title: empty
  • release:
    • message: release name (maybe + \n + release-notes)
    • title: empty
  • cron:
    • message: cron name
    • title: empty
  • manual:
    • message: MANUAL PIPELINE @ <branch>
    • title: empty

We might find some better names for message and title in general to reduce confusion with commit-messages and html titles.

@6543
Copy link
Member Author

6543 commented Jun 26, 2024

Thats not 100% correct, tag and release do have dedicated title information

@6543
Copy link
Member Author

6543 commented Jun 26, 2024

Pull also if the forge driver is implemented corectly ...

@anbraten
Copy link
Member

Thats not 100% correct, tag and release do have dedicated title information

Plan is to remove them. Not really helpful to store that information twice (see screenshot).

Sender: hook.Sender.UserName,
Email: hook.Sender.Email,
PRTitleDescription: hook.PullRequest.Title + "\n" + hook.PullRequest.Body,
Message: "", // TODO: get message from last commit to pr
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does someone know if we can this data from the webhook somehow, or do we need to query the api again?

@anbraten anbraten mentioned this pull request Jul 13, 2024
7 tasks
@anbraten anbraten changed the title Enhance pipeline list Enhance pipeline message and pr title Jul 13, 2024
@woodpecker-bot
Copy link
Collaborator

woodpecker-bot commented Jul 13, 2024

Deployment of preview was successful: https://woodpecker-ci-woodpecker-pr-3421.surge.sh

@qwerty287
Copy link
Contributor

I don't think we should store the PR description, the title is enough

var message string
if len(hook.Commits) > 0 {
message = hook.Commits[0].Message
if len(hook.Commits) == 1 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty if

@qwerty287 qwerty287 mentioned this pull request Dec 27, 2024
4 tasks
@pat-s pat-s marked this pull request as draft January 5, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improve existing features server ui frontend related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants