renovatebot / renovate

Home of the Renovate CLI: Cross-platform Dependency Automation by Mend.io
https://mend.io/renovate
GNU Affero General Public License v3.0
17.44k stars 2.29k forks source link

Multiple dashboards #10607

Open irudoy opened 3 years ago

irudoy commented 3 years ago

What would you like Renovate to be able to do?

On some large projects where several package managers are used at once, it turns out to be quite difficult to see the state of the dependencies by the particular package manager.

For example, some monorepo has a back-end and a front-end part. The frontend team uses NPM and updates the dependencies frequently. At the same time, the backend team uses Composer and takes a more relaxed approach, updating dependencies much less frequently.

In the current implementation with one dashboard, the front-end team gets a lot of Composer-related noise, and they cannot clearly see the current situation related to NPM dependencies.

Option 1 As a solution, packageRules could be used to make the Renovate create separate dashboards for different conditions:

{
  "packageRules": [
    {
      "matchManagers": ["npm"],
      "dependencyDashboardTitle": "NPM Dependency Dashboard"
    },
    {
      "matchManagers": ["composer"],
      "dependencyDashboardTitle": "Composer Dependency Dashboard"
    }
  ]
}

Option 2 There is also an option to leave one dashboard, but add the ability to group items according to some criteria, for example, by the type of manager.

Did you already have any implementation ideas?

I'll be glad to try to implement one of these options

HonkingGoose commented 3 years ago

This feature request seems similar to one that was closed before: https://github.com/renovatebot/renovate/issues/7372. Seeing as that issue was closed as "too hard too implement", maybe we expect the same kind of problems with implementing this feature request?

rarkins commented 3 years ago

@HonkingGoose this request is about multiple dashboards per repo, whereas the other one was about a single dashboard covering multiple repos. Subtly different :)

rarkins commented 3 years ago

My goal is that dashboard content will be completely templated in future which could mean in theory you could group/arrange how you like. However that would be quite advanced usage and not easy for most.

I like the elegance of configuring multiple dashboards using separate titles. One challenge would be how to find all the dashboards at the start. Possibilities:

irudoy commented 3 years ago

Seems like the dashboard templating option will cover more cases, not just this one. And overall looks like a more flexible and future-proof solution.

@rarkins do you have a vision of how this should be implemented? For now, only Handlebars is used for templating. It fits perfectly for simple goals, but perhaps, in this case, it needs a more flexible and verbose approach? Something like:

dependencyDashboardTemplate.js

module.exports = (config, data /* normalised data with all branches/PRs, etc., grouped */) => {
  let issueBody: string;
  // ...
  return issueBody;
}
viceice commented 3 years ago

@irudoy we won't allow javascript on repo config for security concerns. So your idea would only work for self-hosted renovate admin config. That's why we use such a template engine.

irudoy commented 3 years ago

@viceice oh, did not take this into account. Seems like template engine is the only applicable option.