backport 6.3.0-beta-10 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ const entrypoint_module_1 = require("./entrypoint.module");
4
4
  const getDevAccessToken_1 = require("./test/private/getDevAccessToken");
5
5
  describe('entrypoint.module', () => {
6
6
  it('getCommits', async () => {
7
- const accessToken = await (0, getDevAccessToken_1.getDevAccessToken)();
7
+ const accessToken = (0, getDevAccessToken_1.getDevAccessToken)();
8
8
  const commits = await (0, entrypoint_module_1.getCommits)({
9
9
  accessToken: accessToken,
10
10
  repoName: 'backport-e2e',
@@ -262,7 +262,7 @@ function getOptionsFromCliArgs(processArgs, { exitOnError = true } = {}) {
262
262
  string: true,
263
263
  })
264
264
  .option('username', {
265
- description: 'User repo that branch will be pushed to. Defaults to the authenticated user',
265
+ description: 'Defaults to the authenticated user ',
266
266
  type: 'string',
267
267
  })
268
268
  .option('verbose', {
@@ -139,6 +139,8 @@ function throwForRequiredOptions(options) {
139
139
  'username',
140
140
  ];
141
141
  // Disallow empty strings
142
+ // this is primarily an issue in Github actions where inputs default to empty strings instead of undefined
143
+ // in those cases failing early provides a better UX
142
144
  optionKeys.forEach((optionName) => {
143
145
  const option = options[optionName];
144
146
  if (option === '') {
@@ -63,7 +63,7 @@ describe.skip('enablePullRequestAutoMerge', () => {
63
63
  let octokit;
64
64
  let options;
65
65
  beforeAll(async () => {
66
- const accessToken = await (0, getDevAccessToken_1.getDevAccessToken)();
66
+ const accessToken = (0, getDevAccessToken_1.getDevAccessToken)();
67
67
  const randomString = crypto_1.default.randomBytes(4).toString('hex');
68
68
  branchName = `test-${randomString}`;
69
69
  options = {
@@ -22,13 +22,7 @@ function getMockSourceCommit({ sourceCommit, sourcePullRequest, timelineItems =
22
22
  };
23
23
  }
24
24
  return {
25
- repository: {
26
- name: 'kibana',
27
- owner: { login: 'elastic' },
28
- },
29
- committedDate: sourceCommit.commitedDate ?? '2021-12-22T00:00:00Z',
30
- sha: sourceCommit.sha ?? defaultSourceCommitSha,
31
- message: sourceCommit.message,
25
+ ...baseMockCommit,
32
26
  associatedPullRequests: {
33
27
  edges: [
34
28
  {
@@ -29,7 +29,7 @@ describe('backport e2e', () => {
29
29
  beforeAll(async () => {
30
30
  // set alternative homedir
31
31
  jest.spyOn(os_1.default, 'homedir').mockReturnValue(`${sandboxPath}/homedir`);
32
- accessToken = await (0, getDevAccessToken_1.getDevAccessToken)();
32
+ accessToken = (0, getDevAccessToken_1.getDevAccessToken)();
33
33
  (0, mockConfigFiles_1.mockConfigFiles)({
34
34
  globalConfig: {},
35
35
  projectConfig: {},
@@ -8,7 +8,7 @@ jest.unmock('find-up');
8
8
  jest.setTimeout(15000);
9
9
  describe('Handle unbackported pull requests', () => {
10
10
  it('shows missing backports for PR number 8', async () => {
11
- const accessToken = await (0, getDevAccessToken_1.getDevAccessToken)();
11
+ const accessToken = (0, getDevAccessToken_1.getDevAccessToken)();
12
12
  const commits = await (0, entrypoint_module_1.getCommits)({
13
13
  accessToken: accessToken,
14
14
  repoOwner: 'backport-org',
@@ -35,7 +35,7 @@ describe('Handle unbackported pull requests', () => {
35
35
  expect(commits[0]).toEqual(expectedCommit);
36
36
  });
37
37
  it('shows that backport failed because PR number 8 was not backported', async () => {
38
- const accessToken = await (0, getDevAccessToken_1.getDevAccessToken)();
38
+ const accessToken = (0, getDevAccessToken_1.getDevAccessToken)();
39
39
  const sandboxPath = (0, sandbox_1.getSandboxPath)({ filename: __filename });
40
40
  await (0, sandbox_1.resetSandbox)(sandboxPath);
41
41
  await (0, child_process_promisified_1.exec)('git init', { cwd: sandboxPath });
@@ -1 +1 @@
1
- export declare const PACKAGE_VERSION = "6.3.0-beta-10";
1
+ export declare const PACKAGE_VERSION = "7.0.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PACKAGE_VERSION = void 0;
4
- exports.PACKAGE_VERSION = '6.3.0-beta-10';
4
+ exports.PACKAGE_VERSION = '7.0.0';
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "branches",
15
15
  "branching"
16
16
  ],
17
- "version": "6.3.0-beta-10",
17
+ "version": "7.0.0",
18
18
  "main": "./dist/entrypoint.module.js",
19
19
  "types": "dist/entrypoint.module.d.ts",
20
20
  "bin": {
@@ -91,24 +91,24 @@
91
91
  "@types/safe-json-stringify": "^1.1.2",
92
92
  "@types/yargs": "^17.0.8",
93
93
  "@types/yargs-parser": "^20.2.1",
94
- "@typescript-eslint/eslint-plugin": "^5.10.2",
95
- "@typescript-eslint/parser": "^5.10.2",
94
+ "@typescript-eslint/eslint-plugin": "^5.11.0",
95
+ "@typescript-eslint/parser": "^5.11.0",
96
96
  "eslint": "^8.8.0",
97
97
  "eslint-config-prettier": "^8.3.0",
98
98
  "eslint-plugin-import": "^2.25.4",
99
- "eslint-plugin-jest": "^26.0.0",
99
+ "eslint-plugin-jest": "^26.1.0",
100
100
  "eslint-plugin-prettier": "^4.0.0",
101
101
  "graphql": "^16.3.0",
102
102
  "graphql-config": "^4.1.0",
103
103
  "husky": "^7.0.4",
104
- "jest": "^27.4.7",
104
+ "jest": "^27.5.1",
105
105
  "jest-snapshot-serializer-ansi": "^1.0.0",
106
106
  "lint-staged": "^12.3.3",
107
107
  "nock": "^13.2.4",
108
108
  "prettier": "^2.5.1",
109
109
  "strip-ansi": "^6.0.1",
110
110
  "ts-jest": "^27.1.3",
111
- "ts-node": "^10.4.0",
111
+ "ts-node": "^10.5.0",
112
112
  "typescript": "^4.5.5"
113
113
  }
114
114
  }