Skip to content

Add script to bulk modify analyser projects

James Liu requested to merge jliu/bulk-update-analysers into master

This MR adds a Ruby script that simplifies the process of making arbitrary bulk changes to a set of analyser projects. The impetus for this change comes from this comment. The script was adapted from this and:

  • allows you to specify a list of GitLab project slugs to update
  • clones each repository locally
  • provides a callback (modify_fn) to be implemented by you, where you can make the necessary changes to the local checkout
  • commits, pushes, and opens an MR with customisable values (author, title, description etc.)

Two modify_fn implementations are included in this MR. The demo method is meant to explain the function signature to users of the script. bump_common was written to update all analysers after gitlab-org/gitlab#224440 (closed) is merged.

Update:

Yesterday (4th July) @vbhat161 gave me a demo of a tool he's been working on that automatically updates dependencies across most analyser projects, updates the changelog, and opens an MR according to our template. It's a more robust implementation than this script, and can be executed as a scheduled CI pipeline.

Because of this, I've reworded the MR so the intention of this script is to allow users to make arbitrary changes across a set of analysers, not just dependency updates.

Edited by James Liu

Merge request reports