Can the branch of the sonar.pullrequest.branch property contain wildcard?

Is it possible that the branch I define in this property can have wildcard?

I would like it to take all the branches that begin with feature/*. The asterisk being anything after the slash.

For example:

sonar.pullrequest.branch=feature/*

and that it takes values like for example

sonar.pullrequest.branch=feature/ticket-1
sonar.pullrequest.branch=feature/ticket-2
sonar.pullrequest.branch=feature/anythinghere

Hey there.

I don’t think what you’re trying to do is possible – nor do I really understand the intent. What’s the perceived advantage of doing this over just setting the branch name?

Because each branch that is created is a different feature and has a different name. That’s why not always a single branch name is given.

For example:

If dev A is working on a ticket-1, the branch will be called feature/ticket-1.

If dev B is working on a ticket-2, the branch will be called feature/ticket-2.

It is never the same, that’s why I had thought if I could use a wildcard * in that property so that in each PR Decoration it takes the branch from which it is working :sweat_smile:

Thanks. I think you’re better off finding an environment variable that will change based on the target branch! What CI are you using to run the analysis?

That’s what I thought for a moment, to use the CI. I’m using AWS Codebuild with Docker.

I think as long as you can get CODEBUILD_WEBHOOK_BASE_REF into your analysis environment, you’re golden.