Skip to content

Commit

Permalink
Merge branch 'master' into jenkins_gitlab
Browse files Browse the repository at this point in the history
  • Loading branch information
sandratatarevicova committed Sep 25, 2019
2 parents 06efce9 + 776153e commit 0c81810
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 77 deletions.
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"ints",
"isobject",
"jira",
"jsome",
"jsondsl",
"jsonpointer",
"keplersj",
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

<!-- Your comment below this -->

- Fix structuredDiffForFile for BitBucket Server - [@osmestad]
- Fix Buddy.works isPR and use PR number instead of PR ID - [@mmiszy]
- remove jsome package and replace with prettyjson - [@watchinharrison]
- Add GitLab support to Jenkins provider - [@sandratatarevicova]

<!-- Your comment above this -->
Expand Down Expand Up @@ -1694,6 +1696,7 @@ Not usable for others, only stubs of classes etc. - [@orta]
[@nminhnguyen]: https://github.com/NMinhNguyen
[@nornagon]: https://github.com/nornagon
[@orta]: https://github.com/orta
[@osmestad]: https://github.com/osmestad
[@patrickkempff]: https://github.com/patrickkempff
[@peterjgrainger]: https://github.com/peterjgrainger
[@randak]: https://github.com/randak
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@
"http-proxy-agent": "^2.1.0",
"https-proxy-agent": "^2.2.1",
"hyperlinker": "^1.0.0",
"jsome": "^2.3.25",
"json5": "^2.1.0",
"jsonpointer": "^4.0.1",
"jsonwebtoken": "^8.4.0",
Expand All @@ -167,6 +166,7 @@
"parse-github-url": "^1.0.2",
"parse-link-header": "^1.0.1",
"pinpoint": "^1.1.0",
"prettyjson": "^1.2.1",
"readline-sync": "^1.4.9",
"require-from-string": "^2.0.2",
"rfc6902": "^3.0.1",
Expand Down
2 changes: 1 addition & 1 deletion source/ambient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ declare module "jest-runtime"
declare module "jest-haste-map"
declare module "jest-environment-node"
declare module "jest-config"
declare module "jsome"
declare module "jsonpointer"
declare module "parse-link-header"
declare module "pinpoint"
declare module "prettyjson"

declare module "*/package.json"

Expand Down
5 changes: 2 additions & 3 deletions source/commands/danger-pr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import program from "commander"
import { debug } from "../debug"
import jsome from "jsome"
import prettyjson from "prettyjson"

import { FakeCI } from "../ci_source/providers/Fake"
import { pullRequestParser } from "../platforms/pullRequestParser"
Expand Down Expand Up @@ -140,10 +140,9 @@ async function runHalfProcessJSON(platform: Platform, source: CISource) {
const output = JSON.parse(processInput)
const dsl = { danger: output }

// See https://github.com/Javascipt/Jsome/issues/12
if (app.json) {
process.stdout.write(JSON.stringify(dsl, null, 2))
} else if (app.js) {
jsome(dsl)
console.log(prettyjson.render(dsl))
}
}
2 changes: 1 addition & 1 deletion source/platforms/bitbucket_server/BitBucketServerAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export class BitBucketServerAPI implements BitBucketServerAPIDSL {

getStructuredDiffForFile = async (base: string, head: string, filename: string): Promise<BitBucketServerDiff[]> => {
const { repoSlug } = this.repoMetadata
const path = `rest/api/1.0/${repoSlug}/compare/diff/${filename}?withComments=false&from=${base}&to=${head}`
const path = `rest/api/1.0/${repoSlug}/compare/diff/${filename}?withComments=false&from=${head}&to=${base}`
const res = await this.get(path)
throwIfNotOk(res)
return (await res.json()).diffs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe("API testing - BitBucket Server", () => {
expect(api.fetch).toHaveBeenCalledWith(
`${host}/rest/api/1.0/projects/FOO/repos/BAR/compare/diff/` +
`filename.txt` +
`?withComments=false&from=BASE&to=HEAD`,
`?withComments=false&from=HEAD&to=BASE`,
{ method: "GET", body: null, headers: expectedJSONHeaders },
undefined
)
Expand Down
84 changes: 15 additions & 69 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2456,6 +2456,11 @@ color-name@1.1.1:
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689"
integrity sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=

colors@^1.1.2:
version "1.4.0"
resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78"
integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==

combined-stream@^1.0.5, combined-stream@~1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009"
Expand Down Expand Up @@ -2999,7 +3004,7 @@ decamelize-keys@^1.0.0:
decamelize "^1.1.0"
map-obj "^1.0.0"

decamelize@^1.0.0, decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0:
decamelize@^1.0.0, decamelize@^1.1.0, decamelize@^1.1.2, decamelize@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=
Expand Down Expand Up @@ -3785,7 +3790,7 @@ find-up@^1.0.0:
path-exists "^2.0.0"
pinkie-promise "^2.0.0"

find-up@^2.0.0, find-up@^2.1.0:
find-up@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7"
integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c=
Expand Down Expand Up @@ -4620,11 +4625,6 @@ invariant@^2.2.4:
dependencies:
loose-envify "^1.0.0"

invert-kv@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6"
integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY=

invert-kv@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02"
Expand Down Expand Up @@ -5485,15 +5485,6 @@ jsesc@~0.5.0:
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d"
integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=

jsome@^2.3.25:
version "2.5.0"
resolved "https://registry.yarnpkg.com/jsome/-/jsome-2.5.0.tgz#5e417eef4341ffeb83ee8bfa9265b36d56fe49ed"
integrity sha1-XkF+70NB/+uD7ov6kmWzbVb+Se0=
dependencies:
chalk "^2.3.0"
json-stringify-safe "^5.0.1"
yargs "^11.0.0"

json-buffer@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898"
Expand Down Expand Up @@ -5687,13 +5678,6 @@ lazy-req@^2.0.0:
resolved "https://registry.yarnpkg.com/lazy-req/-/lazy-req-2.0.0.tgz#c9450a363ecdda2e6f0c70132ad4f37f8f06f2b4"
integrity sha1-yUUKNj7N2i5vDHATKtTzf48G8rQ=

lcid@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835"
integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=
dependencies:
invert-kv "^1.0.0"

lcid@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf"
Expand Down Expand Up @@ -6150,13 +6134,6 @@ media-typer@0.3.0:
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=

mem@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76"
integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=
dependencies:
mimic-fn "^1.0.0"

mem@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/mem/-/mem-4.0.0.tgz#6437690d9471678f6cc83659c00cbafcd6b0cdaf"
Expand Down Expand Up @@ -6856,15 +6833,6 @@ os-homedir@^1.0.0:
resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M=

os-locale@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2"
integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==
dependencies:
execa "^0.7.0"
lcid "^1.0.0"
mem "^1.1.0"

os-locale@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.0.1.tgz#3b014fbf01d87f60a1e5348d80fe870dc82c4620"
Expand Down Expand Up @@ -7347,6 +7315,14 @@ pretty-ms@^3.1.0:
dependencies:
parse-ms "^1.0.0"

prettyjson@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/prettyjson/-/prettyjson-1.2.1.tgz#fcffab41d19cab4dfae5e575e64246619b12d289"
integrity sha1-/P+rQdGcq0365eV15kJGYZsS0ok=
dependencies:
colors "^1.1.2"
minimist "^1.2.0"

private@^0.1.6, private@^0.1.8:
version "0.1.8"
resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
Expand Down Expand Up @@ -9514,11 +9490,6 @@ xtend@~4.0.1:
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68=

y18n@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
integrity sha1-bRX7qITAhnnA136I53WegR4H+kE=

"y18n@^3.2.1 || ^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b"
Expand Down Expand Up @@ -9557,31 +9528,6 @@ yargs-parser@^11.1.1:
camelcase "^5.0.0"
decamelize "^1.2.0"

yargs-parser@^9.0.2:
version "9.0.2"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077"
integrity sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=
dependencies:
camelcase "^4.1.0"

yargs@^11.0.0:
version "11.0.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.0.0.tgz#c052931006c5eee74610e5fc0354bedfd08a201b"
integrity sha512-Rjp+lMYQOWtgqojx1dEWorjCofi1YN7AoFvYV7b1gx/7dAAeuI4kN5SZiEvr0ZmsZTOpDRcCqrpI10L31tFkBw==
dependencies:
cliui "^4.0.0"
decamelize "^1.1.1"
find-up "^2.1.0"
get-caller-file "^1.0.1"
os-locale "^2.0.0"
require-directory "^2.1.1"
require-main-filename "^1.0.1"
set-blocking "^2.0.0"
string-width "^2.0.0"
which-module "^2.0.0"
y18n "^3.2.1"
yargs-parser "^9.0.2"

yargs@^12.0.1:
version "12.0.2"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.2.tgz#fe58234369392af33ecbef53819171eff0f5aadc"
Expand Down

0 comments on commit 0c81810

Please sign in to comment.