Skip to content
This repository was archived by the owner on Jun 9, 2021. It is now read-only.

Commit e69d231

Browse files
committed
Rendering variables in injection URL #208
1 parent 85aabe1 commit e69d231

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
Changelog of Pull Request Notifier for Bitbucket.
44

5+
## Unreleased
6+
### GitHub [#208](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/issues/208) Injection URL does not allow variables
7+
Rendering variables in injection URL
8+
9+
[2fb4a6760970dd9](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/commit/2fb4a6760970dd9) Tomas Bjerre *2017-03-25 07:45:57*
10+
11+
### No issue
12+
Refering to violation comments to bbs for job DSL
13+
14+
[85aabe1de07d124](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/commit/85aabe1de07d124) Tomas Bjerre *2017-03-18 12:59:43*
15+
516
## 2.60
617
### GitHub [#197](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/issues/197) Button not displaying on PRs which are merged
718
Adding previously uncommitted change for

src/main/java/se/bjurr/prnfb/service/PrnfbVariable.java

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import se.bjurr.prnfb.http.Invoker;
4444
import se.bjurr.prnfb.http.UrlInvoker;
4545
import se.bjurr.prnfb.listener.PrnfbPullRequestAction;
46+
import se.bjurr.prnfb.service.PrnfbRenderer.ENCODE_FOR;
4647
import se.bjurr.prnfb.settings.PrnfbNotification;
4748

4849
public enum PrnfbVariable {
@@ -105,9 +106,25 @@ public String resolve(
105106
if (prnfbNotification == null || !prnfbNotification.getInjectionUrl().isPresent()) {
106107
return "";
107108
}
109+
PrnfbRenderer renderer =
110+
new PrnfbRenderer(
111+
pullRequest,
112+
pullRequestAction,
113+
applicationUser,
114+
repositoryService,
115+
propertiesService,
116+
prnfbNotification,
117+
variables,
118+
securityService);
119+
String renderedUrlParam =
120+
renderer.render(
121+
prnfbNotification.getInjectionUrl().get(),
122+
ENCODE_FOR.URL,
123+
clientKeyStore,
124+
shouldAcceptAnyCertificate);
108125
UrlInvoker urlInvoker =
109126
urlInvoker() //
110-
.withUrlParam(prnfbNotification.getInjectionUrl().get()) //
127+
.withUrlParam(renderedUrlParam) //
111128
.withMethod(GET) //
112129
.withProxyServer(prnfbNotification.getProxyServer()) //
113130
.withProxyPort(prnfbNotification.getProxyPort()) //

0 commit comments

Comments
 (0)