-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
35,998 additions
and
1,931 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
insert_final_newline = false | ||
trim_trailing_whitespace = false | ||
|
||
[*.{js,jsx,json,ts,tsx,yml}] | ||
indent_size = 2 | ||
indent_style = tab | ||
tab_width = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"extends": "@atlassian-partner-engineering", | ||
"rules": { | ||
"no-plusplus": "off" | ||
} | ||
} | ||
"extends": [ | ||
"eslint:recommended" | ||
], | ||
"rules": { | ||
} | ||
} |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @atlassian/fusion-arc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
**What's in this PR?** | ||
|
||
**Why** | ||
|
||
**Affected issues** | ||
_Jira Issues_ | ||
|
||
**How has this been tested?** | ||
_Include how to test if applicable_ | ||
|
||
**Whats Next?** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn precommit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,5 @@ inputs: | |
description: Comment | ||
required: true | ||
runs: | ||
using: 'node12' | ||
using: 'node16' | ||
main: './dist/index.js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,32 @@ | ||
const fetch = require('node-fetch') | ||
// const moment = require('moment') | ||
|
||
module.exports = serviceName => async (state, apiMethod = 'unknown') => { | ||
// const startTime = moment.now() | ||
|
||
const response = await fetch(state.req.url, state.req) | ||
const response = await fetch(state.req.url, state.req) | ||
|
||
state.res = { | ||
headers: response.headers.raw(), | ||
status: response.status, | ||
} | ||
state.res = { | ||
headers: response.headers?.raw(), | ||
status: response.status, | ||
} | ||
|
||
// const totalTime = moment.now() - startTime | ||
// const tags = { | ||
// api_method: apiMethod, | ||
// method: state.req.method || 'GET', | ||
// response_code: response.status, | ||
// service: serviceName, | ||
// } | ||
// const tags = { | ||
// api_method: apiMethod, | ||
// method: state.req.method || 'GET', | ||
// response_code: response.status, | ||
// service: serviceName, | ||
// } | ||
|
||
state.res.body = await response.text() | ||
state.res.body = await response.text() | ||
|
||
const isJSON = (response.headers.get('content-type') || '').includes('application/json') | ||
const isJSON = (response.headers.get('content-type') || '').includes('application/json') | ||
|
||
if (isJSON && state.res.body) { | ||
state.res.body = JSON.parse(state.res.body) | ||
} | ||
if (isJSON && state.res.body) { | ||
state.res.body = JSON.parse(state.res.body) | ||
} | ||
|
||
if (!response.ok) { | ||
throw new Error(response.statusText) | ||
} | ||
if (!response.ok) { | ||
throw new Error(response.statusText) | ||
} | ||
|
||
return state | ||
return state | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.