github-repository-provider 7.25.22 → 7.25.26

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.
package/README.md CHANGED
@@ -235,7 +235,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
235
235
 
236
236
  ### instanceIdentifier
237
237
 
238
- Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** default instance environment name prefix
238
+ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** default environment name prefix for the provider instance
239
239
 
240
240
  ## GithubPullRequest
241
241
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "github-repository-provider",
3
- "version": "7.25.22",
3
+ "version": "7.25.26",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -30,19 +30,19 @@
30
30
  "lint:docs": "documentation lint ./src/**/*.mjs"
31
31
  },
32
32
  "dependencies": {
33
- "content-entry": "^4.1.3",
33
+ "content-entry": "^4.1.4",
34
34
  "fetch-link-util": "^1.0.5",
35
35
  "fetch-rate-limit-util": "^2.4.8",
36
36
  "matching-iterator": "^2.0.2",
37
37
  "node-fetch": "3.2.0",
38
38
  "one-time-execution-method": "^2.0.10",
39
- "repository-provider": "^26.4.3"
39
+ "repository-provider": "^26.5.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "ava": "^4.0.1",
43
43
  "c8": "^7.11.0",
44
44
  "documentation": "^13.2.5",
45
- "repository-provider-test-support": "^1.11.1",
45
+ "repository-provider-test-support": "^1.12.0",
46
46
  "semantic-release": "^19.0.2"
47
47
  },
48
48
  "engines": {
@@ -2,7 +2,6 @@ import { matcher } from "matching-iterator";
2
2
  import { Branch } from "repository-provider";
3
3
  import {
4
4
  BaseCollectionEntry,
5
- BufferContentEntry,
6
5
  BufferContentEntryMixin,
7
6
  ContentEntry
8
7
  } from "content-entry";
@@ -76,26 +75,22 @@ export class GithubBranch extends Branch {
76
75
  }
77
76
  );
78
77
 
79
- const shaNewTree = json.sha;
80
-
81
78
  const r = await this.provider.fetchJSON(`repos/${this.slug}/git/commits`, {
82
79
  method: "POST",
83
80
  body: JSON.stringify({
84
81
  message,
85
- tree: shaNewTree,
82
+ tree: json.sha,
86
83
  parents: [shaLatestCommit]
87
84
  })
88
85
  });
89
86
 
90
- const sha = r.json.sha;
91
-
92
87
  return await this.provider.fetchJSON(
93
88
  `repos/${this.slug}/git/refs/heads/${this.name}`,
94
89
  {
95
90
  method: "PATCH",
96
91
  body: JSON.stringify({
97
92
  ...options,
98
- sha
93
+ sha : r.json.sha
99
94
  })
100
95
  }
101
96
  );
@@ -42,7 +42,7 @@ export class GithubProvider extends MultiGroupProvider {
42
42
  }
43
43
 
44
44
  /**
45
- * @return {string} default instance environment name prefix
45
+ * @return {string} default environment name prefix for the provider instance
46
46
  */
47
47
  static get instanceIdentifier() {
48
48
  return "GITHUB_"; // "GH_" "GH_ENTERPRISE_"
@@ -186,7 +186,6 @@ export class GithubProvider extends MultiGroupProvider {
186
186
  get entryClass() {
187
187
  return BufferContentEntry;
188
188
  }
189
-
190
189
  }
191
190
 
192
191
  replaceWithOneTimeExecutionMethod(
@@ -21,11 +21,15 @@ export class GithubRepository extends Repository {
21
21
  return {
22
22
  ...super.attributes,
23
23
  auto_init: { type: "boolean", writable: true },
24
- allow_squash_merge: { type: "boolean", writable: true },
25
- allow_merge_commit: { type: "boolean", writable: true },
26
- allow_rebase_merge: { type: "boolean", writable: true },
27
- allow_auto_merge: { type: "boolean", writable: true },
28
- delete_branch_on_merge: { type: "boolean", writable: true }
24
+ allow_squash_merge: { type: "boolean", writable: true, default: false },
25
+ allow_merge_commit: { type: "boolean", writable: true, default: false },
26
+ allow_rebase_merge: { type: "boolean", writable: true, default: false },
27
+ allow_auto_merge: { type: "boolean", writable: true, default: false },
28
+ delete_branch_on_merge: {
29
+ type: "boolean",
30
+ writable: true,
31
+ default: false
32
+ }
29
33
  };
30
34
  }
31
35