repository-provider-test-support 2.2.33 → 2.2.35
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/package.json +1 -1
- package/src/pull-request-test.mjs +13 -8
package/package.json
CHANGED
|
@@ -62,7 +62,7 @@ export async function pullRequestList(t, provider, repoName) {
|
|
|
62
62
|
|
|
63
63
|
const repository = await provider.repository(repoName);
|
|
64
64
|
t.truthy(repository, `repsitory present ${repoName}`);
|
|
65
|
-
|
|
65
|
+
|
|
66
66
|
const destination = await repository.defaultBranch;
|
|
67
67
|
|
|
68
68
|
const sources = await Promise.all(
|
|
@@ -72,21 +72,26 @@ export async function pullRequestList(t, provider, repoName) {
|
|
|
72
72
|
new StringContentEntry("README.md", `file content #${bn}`)
|
|
73
73
|
]);
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
try {
|
|
76
|
+
const pr = await repository.pullRequestClass.open(branch, destination, {
|
|
77
|
+
title: `test pr from ${bn}`,
|
|
78
|
+
body: "this is the body\n- a\n- b\n- c"
|
|
79
|
+
});
|
|
80
|
+
} catch (e) {
|
|
81
|
+
console.log(e);
|
|
82
|
+
}
|
|
80
83
|
return branch;
|
|
81
84
|
})
|
|
82
85
|
);
|
|
83
86
|
|
|
84
87
|
let numberOfSources = 0;
|
|
85
88
|
|
|
89
|
+
const source = sources[0];
|
|
90
|
+
|
|
86
91
|
for await (const pr of repository.pullRequestClass.list(repository, {
|
|
87
|
-
source
|
|
92
|
+
source
|
|
88
93
|
})) {
|
|
89
|
-
t.is(pr.source,
|
|
94
|
+
t.is(pr.source, source, `source: ${source.fullName}`);
|
|
90
95
|
t.is(pr.destination, destination, `destination: ${destination.fullName}`);
|
|
91
96
|
t.is(pr.title, "test pr from pr-test/source-1", "title");
|
|
92
97
|
t.false(pr.locked, "locked");
|