Skip to content

Commit

Permalink
backport dev-utils constants
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Oct 9, 2019
1 parent 390391c commit a5ec565
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
22 changes: 22 additions & 0 deletions packages/kbn-dev-utils/src/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

import { dirname } from 'path';

export const REPO_ROOT = dirname(require.resolve('../../../package.json'));
1 change: 1 addition & 0 deletions packages/kbn-dev-utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ export {
} from './tooling_log';
export { createAbsolutePathSerializer } from './serializers';
export { run, createFailError, createFlagError, combineErrors, isFailError } from './run';
export { REPO_ROOT } from './constants';
export * from './axios';
4 changes: 2 additions & 2 deletions packages/kbn-test/src/failed_tests_reporter/github_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class GithubApi {
await this.request(
{
method: 'PATCH',
url: Url.resolve(BASE_URL, `issues/${encodeURIComponent(issueNumber)}`),
url: Url.resolve(BASE_URL, `issues/${encodeURIComponent(String(issueNumber))}`),
data: {
state: 'open', // Reopen issue if it was closed.
body: newBody,
Expand All @@ -111,7 +111,7 @@ export class GithubApi {
await this.request(
{
method: 'POST',
url: Url.resolve(BASE_URL, `issues/${encodeURIComponent(issueNumber)}/comments`),
url: Url.resolve(BASE_URL, `issues/${encodeURIComponent(String(issueNumber))}/comments`),
data: {
body: commentBody,
},
Expand Down

0 comments on commit a5ec565

Please sign in to comment.