RFR: 2143: Support selective tags mirroring [v2]

Erik Joelsson erikj at openjdk.org
Wed Jan 17 19:27:46 UTC 2024


> We need a way to mirror tags selectively. Here is how I think I want to solve this. We currently have
> 
> "branches": Is either a string of one branch pattern or an array of multiple branch patterns
> "tags": Takes either "include" or "only", if value is "only", "branches" cannot also be set
> 
> Instead of trying to somehow bend the "tags" parameter into taking some kind of patterns, I want to introduce a new parameter "refspecs". The value is an array (or a single string for convenience). Each string constitutes a single refspec that will be given unmodified to a "git push" command (with a + for force if not already present). The configuration becomes a bit more verbose by using this format, but it's also much more powerful. It makes it possible to express more complex mappings using the mirror bot, which may very well be needed when we start using branches more actively.
> 
> When setting "refspecs", we do not accept either "branches" or "tags" in the same configuration.
> 
> We still pull everything to the local repository in the bot. The refspec is only applied to the push command. Keeping the local repo the same as the source repo reduced the risk of bot configs interfering with each other through conflicting configurations.

Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision:

  Remove force

-------------

Changes:
  - all: https://git.openjdk.org/skara/pull/1600/files
  - new: https://git.openjdk.org/skara/pull/1600/files/27f9e5d5..e1addb69

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=skara&pr=1600&range=01
 - incr: https://webrevs.openjdk.org/?repo=skara&pr=1600&range=00-01

  Stats: 7 lines in 4 files changed: 0 ins; 3 del; 4 mod
  Patch: https://git.openjdk.org/skara/pull/1600.diff
  Fetch: git fetch https://git.openjdk.org/skara.git pull/1600/head:pull/1600

PR: https://git.openjdk.org/skara/pull/1600


More information about the skara-dev mailing list