github-repository-provider 7.26.26 → 7.26.29
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 +4 -4
- package/package.json +3 -3
- package/src/github-pull-request.mjs +1 -1
- package/src/github-repository.mjs +7 -6
package/README.md
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
[](https://opensource.org/licenses/BSD-3-Clause)
|
|
3
3
|
[](https://bundlephobia.com/result?p=github-repository-provider)
|
|
4
4
|
[](https://npmjs.org/package/github-repository-provider)
|
|
5
|
-
[](https://github.com/arlac77/github-repository-provider/issues)
|
|
6
|
+
[](https://actions-badge.atrox.dev/arlac77/github-repository-provider/goto)
|
|
7
7
|
[](https://github.com/prettier/prettier)
|
|
8
8
|
[](http://commitizen.github.io/cz-cli/)
|
|
9
|
-
[](https://snyk.io/test/github/arlac77/github-repository-provider)
|
|
10
|
+
[](https://coveralls.io/github/arlac77/github-repository-provider)
|
|
11
11
|
|
|
12
12
|
# github-repository-provider
|
|
13
13
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "github-repository-provider",
|
|
3
|
-
"version": "7.26.
|
|
3
|
+
"version": "7.26.29",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"matching-iterator": "^2.0.4",
|
|
37
37
|
"node-fetch": "^3.2.4",
|
|
38
38
|
"one-time-execution-method": "^2.0.13",
|
|
39
|
-
"repository-provider": "^
|
|
39
|
+
"repository-provider": "^29.1.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"ava": "^4.2.0",
|
|
43
43
|
"c8": "^7.11.2",
|
|
44
44
|
"documentation": "^13.2.5",
|
|
45
|
-
"repository-provider-test-support": "^2.1.
|
|
45
|
+
"repository-provider-test-support": "^2.1.14",
|
|
46
46
|
"semantic-release": "^19.0.2"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
@@ -166,14 +166,19 @@ export class GithubRepository extends Repository {
|
|
|
166
166
|
async createBranch(name, from, options) {
|
|
167
167
|
await this.initializeBranches();
|
|
168
168
|
|
|
169
|
-
const branch = this.
|
|
169
|
+
const branch = await this.branch(name);
|
|
170
170
|
if (branch) {
|
|
171
171
|
return branch;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
let sha;
|
|
175
175
|
|
|
176
|
-
if (this.
|
|
176
|
+
if (this.hasBranches) {
|
|
177
|
+
sha = await this.refId(
|
|
178
|
+
`heads/${from ? from.name : this.defaultBranchName}`
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
177
182
|
/*
|
|
178
183
|
* https://stackoverflow.com/questions/9765453/is-gits-semi-secret-empty-tree-object-reliable-and-why-is-there-not-a-symbolic/9766506#9766506
|
|
179
184
|
* sha1:4b825dc642cb6eb9a060e54bf8d69288fbee4904
|
|
@@ -189,10 +194,6 @@ export class GithubRepository extends Repository {
|
|
|
189
194
|
});
|
|
190
195
|
console.log(res);
|
|
191
196
|
*/
|
|
192
|
-
} else {
|
|
193
|
-
sha = await this.refId(
|
|
194
|
-
`heads/${from ? from.name : this.defaultBranchName}`
|
|
195
|
-
);
|
|
196
197
|
}
|
|
197
198
|
|
|
198
199
|
const res = await this.provider.fetch(`repos/${this.slug}/git/refs`, {
|