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

Commit 3e1fdda

Browse files
committed
Refactoring #109
1 parent 25ccd05 commit 3e1fdda

File tree

88 files changed

+6064
-6833
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+6064
-6833
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ target
44
.settings
55
*~
66
.okhttpcache
7+
node_modules

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 [#109](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/issues/109) Refactor admin pages
7+
Refactoring #109
8+
9+
[39e9178185e939a](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/commit/39e9178185e939a) Tomas Bjerre *2016-05-03 15:33:36*
10+
11+
### No issue
12+
changelog maven plugin 1.29
13+
14+
[25ccd05b465bd4a](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/commit/25ccd05b465bd4a) Tomas Bjerre *2016-04-14 16:36:16*
15+
516
## 2.17
617
### GitHub [#107](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/issues/107) java.lang.NullPointerException: null at PrnfbRenderer.java:367
718
Finding current user correctly #107

Gruntfile.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
module.exports = function(grunt) {
2+
grunt.initConfig({
3+
pkg: grunt.file.readJSON('package.json'),
4+
5+
6+
jsbeautifier: {
7+
files: ["Gruntfile.js",
8+
"**/*.vm",
9+
"**/*.xml",
10+
"pom.xml",
11+
"**/*.js",
12+
"Gruntfile.js",
13+
"**/*.css"
14+
],
15+
options: {
16+
html: {
17+
fileTypes: [".vm", ".xml"],
18+
indentChar: " ",
19+
indentSize: 1,
20+
preserveNewlines: true,
21+
unformatted: ["a", "sub", "sup", "b", "i", "u", "strong"]
22+
},
23+
js: {
24+
indentChar: " ",
25+
indentSize: 1
26+
}
27+
}
28+
}
29+
});
30+
31+
grunt.loadNpmTasks("grunt-jsbeautifier");
32+
33+
grunt.registerTask('default', ['jsbeautifier']);
34+
};

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,27 @@ The ${PULL_REQUEST_USER...} contains information about the user who issued the e
8282

8383
You may want to use [Violation Comments to Stash plugin](https://wiki.jenkins-ci.org/display/JENKINS/Violation+Comments+to+Stash+Plugin) and/or [StashNotifier plugin](https://wiki.jenkins-ci.org/display/JENKINS/StashNotifier+Plugin) to report results back to Bitbucket.
8484

85+
### Rest
86+
Some rest resources are available. You can figure out the JSON structure by looking at the [DTO:s](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/tree/master/src/main/java/se/bjurr/prnfb/presentation/dto).
87+
88+
* `/bitbucket/rest/prnfb-admin/1.0/settings`
89+
* `GET` Get all global settings.
90+
* `POST` Store all global settings.
91+
92+
* `/bitbucket/rest/prnfb-admin/1.0/settings/notifications`
93+
* `DELETE /{uuid}` Deletes notification with *uuid*.
94+
* `GET` Get all notifications.
95+
* `GET /{uuid}` Get notification with *uuid*.
96+
* `POST` Save a notification.
97+
98+
* `/bitbucket/rest/prnfb-admin/1.0/settings/buttons`
99+
* `DELETE /{uuid}` Deletes button with *uuid*.
100+
* `GET` Get all buttons that the current user is allowed to use.
101+
* `GET /{uuid}` Get button with *uuid*.
102+
* `GET /repository/{repositoryId}/pullrequest/{pullRequestId}` Get all buttons for repository that the current user is allowed to use.
103+
* `POST` Save a button.
104+
* `POST /press` Press the button.
105+
85106
### Jenkins
86107
Parameterized Jenkins jobs can be triggered remotely via:
87108
```
@@ -96,7 +117,7 @@ If you are using a CSRF protection in Jenkins, you can use the **Injection URL**
96117
Prerequisites:
97118

98119
* Atlas SDK [(installation instructions)](https://developer.atlassian.com/docs/getting-started/set-up-the-atlassian-plugin-sdk-and-build-a-project).
99-
* JDK 1.7 or newer
120+
* JDK 1.8 or newer
100121

101122
Generate Eclipse project:
102123
```

build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
#!/bin/bash
2-
mvn install eclipse:eclipse -DGITHUB_OAUTH2TOKEN=$GITHUB_OAUTH2TOKEN
2+
npm install
3+
grunt
4+
mvn package

eclipse_formatter.xml

Lines changed: 293 additions & 293 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"devDependencies": {
3+
"grunt": "0.4.5",
4+
"grunt-cli": "0.1.13",
5+
"grunt-jsbeautifier": "0.2.10"
6+
}
7+
}

0 commit comments

Comments
 (0)