jfrog / jfrog/frogbot

Customizing Frogbot Comments on PR Scan results

Open
#945 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
Go
Stars
372
Forks
107
Avg merge
2d 20h
Merged PRs (30d)
5

Description

Is your feature request related to a problem? Please describe.

When Frogbot scans a PR/Merge request (in our case, in gitlab), it shows the results of the scan as comments/messages in the PR. The footer of each message that frogbot writes has a link to Frogbot Docs (see image below).

However, the results of the PR scan are mainly viewed by the development team, who are only interested in the results of the scan, not the frogbot configs and docs (since frogbot configurations are more relevant to devops team/repository maintainer).

Describe the solution you'd like to see

Provide the flexibility to change the footer/URL of frogbot PR comments, so that we may, for instance, refer the developers to the internal URL of Xray scan list results where they can see more details and scans history. Or to point them to any relevant URL.

As I can see from the frogbot github repo:

@ frogbot/utils/outputwriter/outputcontent.go, there are some hardcoded variables. Specifically:

  1. const FrogbotDocumentationUrl = "https://docs.jfrog-applications.jfrog.io/jfrog-applications/frogbot"
  2. var CommentGeneratedByFrogbot = MarkAsLink("🐸 JFrog Frogbot", FrogbotDocumentationUrl)

At the very least, it would be nice to expose these as ENV variables that we can optionally set.
Any extra customization/flexibility to the PR messages would also be a welcomed addition.

Describe alternatives you've considered

We could add a job in our CI pipeline to add additional comments after frogbot is done scanning, in which we can add any required details. However, it would still be better/neater to customize the frogbot message/footer itself.

Additional context

Add any other context or screenshots about the feature request here.

The frogbot footer:

Image

The variables in "outputcontent.go" that could be exposed as ENV variables possibly:

Image

Adding this feature would be greatly appreciated. Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in frogbot/utils/outputwriter/outputcontent.go and trace how FrogbotDocumentationUrl and CommentGeneratedByFrogbot are used when pull or merge request comments are assembled. Check existing environment-variable configuration patterns before deciding how the footer URL should be supplied. Done means the footer can use a configured URL while retaining the current default when no customization is provided.

Written by the indexing model from the issue text.

Assessment

Tech stack
gitlab, go
Domain
ci-cd, devtools
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.