repository-provider 32.7.6 → 32.7.7
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 +6 -1
- package/package.json +2 -2
- package/src/pull-request.mjs +2 -2
- package/src/single-group-provider.mjs +2 -2
- package/src/util.mjs +2 -2
package/README.md
CHANGED
|
@@ -228,6 +228,7 @@ console.log(await readme.getString());
|
|
|
228
228
|
* [reviews](#reviews)
|
|
229
229
|
* [identifier](#identifier-1)
|
|
230
230
|
* [defaultListStates](#defaultliststates)
|
|
231
|
+
* [states](#states)
|
|
231
232
|
* [validMergeMethods](#validmergemethods)
|
|
232
233
|
* [list](#list-1)
|
|
233
234
|
* [Parameters](#parameters-52)
|
|
@@ -1352,11 +1353,15 @@ States to list pull request by default
|
|
|
1352
1353
|
|
|
1353
1354
|
Returns **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** states to list by default
|
|
1354
1355
|
|
|
1356
|
+
### states
|
|
1357
|
+
|
|
1358
|
+
possible states
|
|
1359
|
+
|
|
1355
1360
|
### validMergeMethods
|
|
1356
1361
|
|
|
1357
1362
|
All valid merge methods
|
|
1358
1363
|
|
|
1359
|
-
Returns **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** valid merge methods
|
|
1364
|
+
Returns **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** valid merge methods.
|
|
1360
1365
|
|
|
1361
1366
|
### list
|
|
1362
1367
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repository-provider",
|
|
3
|
-
"version": "32.7.
|
|
3
|
+
"version": "32.7.7",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"c8": "^7.13.0",
|
|
39
39
|
"documentation": "^14.0.1",
|
|
40
40
|
"repository-provider-test-support": "^2.3.2",
|
|
41
|
-
"semantic-release": "^21.0.
|
|
41
|
+
"semantic-release": "^21.0.2",
|
|
42
42
|
"typescript": "^5.0.4"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
package/src/pull-request.mjs
CHANGED
|
@@ -60,12 +60,12 @@ export class PullRequest extends OwnedObject {
|
|
|
60
60
|
* possible states
|
|
61
61
|
*/
|
|
62
62
|
static states = new Set(["OPEN", "MERGED", "CLOSED"]);
|
|
63
|
-
|
|
63
|
+
|
|
64
64
|
/**
|
|
65
65
|
* All valid merge methods
|
|
66
66
|
* @return {Set<string>} valid merge methods.
|
|
67
67
|
*/
|
|
68
|
-
static validMergeMethods =new Set(/*["MERGE", "SQUASH", "REBASE"]*/);
|
|
68
|
+
static validMergeMethods = new Set(/*["MERGE", "SQUASH", "REBASE"]*/);
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* List all pull request for a given repo.
|
|
@@ -11,7 +11,7 @@ export class SingleGroupProvider extends RepositoryOwner(BaseProvider) {
|
|
|
11
11
|
/**
|
|
12
12
|
* Lookup a repository in the provider and all of its repository groups.
|
|
13
13
|
* @param {string} name of the repository
|
|
14
|
-
* @return {Promise<Repository>}
|
|
14
|
+
* @return {Promise<Repository|undefined>}
|
|
15
15
|
*/
|
|
16
16
|
async repository(name) {
|
|
17
17
|
const { base, repository } = this.parseName(name);
|
|
@@ -23,7 +23,7 @@ export class SingleGroupProvider extends RepositoryOwner(BaseProvider) {
|
|
|
23
23
|
/**
|
|
24
24
|
* Get a single group.
|
|
25
25
|
* @param {string} name
|
|
26
|
-
* @return {Promise<RepositoryGroup>} deliver the one and only present group
|
|
26
|
+
* @return {Promise<RepositoryGroup|undefined>} deliver the one and only present group
|
|
27
27
|
*/
|
|
28
28
|
async repositoryGroup(name) {
|
|
29
29
|
const { base } = this.parseName(name);
|
package/src/util.mjs
CHANGED
|
@@ -38,7 +38,7 @@ export function stripBaseName(name, repositoryBases, whenFound) {
|
|
|
38
38
|
* @param {string|string[]} names
|
|
39
39
|
* @param {string[]} repositoryBases all possible bases
|
|
40
40
|
* @param {Function} [whenFound] to be called with the found base name
|
|
41
|
-
* @return {string[]|undefined} names without base
|
|
41
|
+
* @return {string[]|string|undefined} names without base
|
|
42
42
|
*/
|
|
43
43
|
export function stripBaseNames(names, repositoryBases, whenFound) {
|
|
44
44
|
return Array.isArray(names)
|
|
@@ -61,5 +61,5 @@ export async function generateBranchName(repository, pattern) {
|
|
|
61
61
|
n++;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
return pattern.replace(/\*/, n);
|
|
64
|
+
return pattern.replace(/\*/, n.toString());
|
|
65
65
|
}
|