Skip to content

awrrl/test_renovate_40690

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

test_renovate_40690

Simple Maven test project for testing Renovate issue #40690

Current behavior

The configuration of

{
  "baseBranches": [ "main/integration", "1000XX/integration" ],
  "branchPrefix": "",
  "additionalBranchPrefix": "{{lookup (split baseBranch '/') 0}}/update/renovate-",
  "useBaseBranchConfig": "merge",
  ...

Is creating the following wrong branch names:

  • 1000XX/integration-1000XX/update/renovate-major-maven-versions
  • 1000XX/integration-1000XX/update/renovate-maven-versions
  • main/integration-main/update/renovate-major-maven-versions
  • main/integration-main/update/renovate-maven-versions

Expected behavior

The template in additionalBranchPrefix should exract from the given baseBranches names the parts "main" and "1000XX" respectively and create branch names as:

  • 1000XX/update/renovate-major-maven-versions
  • 1000XX/update/renovate-maven-versions
  • main/update/renovate-major-maven-versions
  • main/update/renovate-maven-versions

Link to the Renovate issue or Discussion

See discussion here: renovatebot/renovate#40690

Project Overview

This project is designed to test the branch naming behavior when using additionalBranchPrefix in Renovate configuration with template expressions involving baseBranch.

Project Structure

This is a simple Maven project with:

  • 3 dependencies to be updated by Renovate:

    • JUnit 5 (version 5.9.3)
    • Log4j 2 (version 2.20.0)
    • Mockito (version 5.3.1)
  • Simple Java classes:

    • Calculator.java - A basic calculator class using Log4j for logging
    • CalculatorTest.java - JUnit 5 tests using Mockito extension

Issue Being Tested

The issue relates to branch naming when using additionalBranchPrefix with template expressions like:

"additionalBranchPrefix": "{{lookup (split baseBranch '/') 0}}/update/renovate-"

The expected behavior is to extract the first part of the base branch name and use it as a prefix. However, the reported issue shows that the full base branch name is being concatenated incorrectly.

Renovate Configuration

The renovate.json file contains the configuration that tests the issue with:

  • baseBranches: ["main"]
  • branchPrefix: ""
  • additionalBranchPrefix: "{{lookup (split baseBranch '/') 0}}/update/renovate-"

GitHub Actions Workflow

The .github/workflows/renovate.yml file provides a manually triggered workflow to run Renovate bot with options for dry-run mode.

Building the Project

mvn clean compile test

Running Renovate

Manually trigger the "Renovate" workflow from the GitHub Actions tab to test the branch naming behavior.

About

Simple test project for renovate/discussions/40690

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages