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

Commit

Permalink
New variable PULL_REQUEST_TITLE #65
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasbjerre committed Sep 9, 2015
1 parent 24c46ee commit 693476d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

Changelog of Pull Request Notifier for Stash.

## 1.28
* New variable ${PULL_REQUEST_TITLE}

## 1.27
* Adding an optional regular expression, that can be evaluated in the response from injection URL, to populate ${INJECTION_URL_VALUE}.

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ The plugin has its own implementation to create the RESCOPED_FROM and RESCOPED_T
The filter text as well as the URL support variables. These are:

* ${PULL_REQUEST_ID} Example: 1
* ${PULL_REQUEST_TITLE} Example: Anything
* ${PULL_REQUEST_VERSION} Example: 1
* ${PULL_REQUEST_COMMENT_TEXT} Example: A comment
* ${PULL_REQUEST_ACTION} Example: OPENED
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/se/bjurr/prnfs/listener/PrnfsRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,13 @@ public String resolve(PullRequest pullRequest, PrnfsPullRequestAction pullReques
return rawResponse;
}
}
}), PULL_REQUEST_TITLE(new Resolver() {
@Override
public String resolve(PullRequest pullRequest, PrnfsPullRequestAction pullRequestAction, StashUser stashUser,
RepositoryService repositoryService, ApplicationPropertiesService propertiesService,
PrnfsNotification prnfsNotification, Map<PrnfsVariable, Supplier<String>> variables) {
return pullRequest.getTitle();
}
});

private Resolver resolver;
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/admin.vm
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
You can use variables when invoking the URL, when forming the filter string, custom header values or in POST content.
<ul>
<li><b>${PULL_REQUEST_ID}</b> Example: 1</li>
<li><b>${PULL_REQUEST_TITLE}</b>Example: Anything</li>
<li><b>${PULL_REQUEST_ACTION}</b> Example: OPENED</li>
<li><b>${PULL_REQUEST_URL}</b> Example: http://localhost:7990/projects/PROJECT_1/repos/rep_1/pull-requests/1</li>
<li><b>${PULL_REQUEST_VERSION}</b> Example: 1</li>
Expand Down

0 comments on commit 693476d

Please sign in to comment.