@opentermsarchive/engine 0.36.1 → 0.37.1
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
CHANGED
|
@@ -20,9 +20,9 @@ export default class DeclarationUtils {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
async getModifiedData() {
|
|
23
|
-
const modifiedFilePathsAsString = (await this.git.diff([ '--diff-filter=d', '--name-only', this.defaultBranch, 'HEAD', '--', './declarations' ])).trim();
|
|
23
|
+
const modifiedFilePathsAsString = (await this.git.diff([ '-z', '--diff-filter=d', '--name-only', this.defaultBranch, 'HEAD', '--', './declarations' ])).trim(); // -z option is required to avoid pathnames with "unusual" characters to be quoted, but it also replaces result separator by the zero byte character \0
|
|
24
24
|
|
|
25
|
-
const modifiedFilePaths = modifiedFilePathsAsString ? modifiedFilePathsAsString.split('\
|
|
25
|
+
const modifiedFilePaths = (modifiedFilePathsAsString ? modifiedFilePathsAsString.split('\0') : []).filter(str => str !== ''); // split on \0 rather than \n due to the -z option of git diff
|
|
26
26
|
|
|
27
27
|
return { modifiedFilePaths, modifiedServicesIds: Array.from(new Set(modifiedFilePaths.map(DeclarationUtils.filePathToServiceId))) };
|
|
28
28
|
}
|
package/src/reporter/github.js
CHANGED
|
@@ -24,14 +24,6 @@ export default class GitHub {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
async initialize() {
|
|
27
|
-
try {
|
|
28
|
-
const { data: user } = await this.octokit.request('GET /user', { ...this.commonParams });
|
|
29
|
-
|
|
30
|
-
this.authenticatedUserLogin = user.login;
|
|
31
|
-
} catch (error) {
|
|
32
|
-
logger.error(`🤖 Could not get authenticated user: ${error}`);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
27
|
this.MANAGED_LABELS = require('./labels.json');
|
|
36
28
|
|
|
37
29
|
const existingLabels = await this.getRepositoryLabels();
|
|
@@ -140,7 +132,6 @@ export default class GitHub {
|
|
|
140
132
|
const issues = await this.octokit.paginate('GET /repos/{owner}/{repo}/issues', {
|
|
141
133
|
...this.commonParams,
|
|
142
134
|
per_page: 100,
|
|
143
|
-
creator: this.authenticatedUserLogin,
|
|
144
135
|
...searchParams,
|
|
145
136
|
}, response => response.data);
|
|
146
137
|
|