@rocket.chat/houston 0.24.0 → 0.25.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 +9 -9
- package/src/logs.js +4 -9
- package/src/md.js +5 -6
- package/src/release-table.js +2 -2
- package/src/set-version.js +4 -4
- package/.github/history.json +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rocket.chat/houston",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.1",
|
|
4
4
|
"description": "Rocket.Chat Command Line Tools",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
"houston": "./bin/cli.js"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@octokit/rest": "^
|
|
20
|
+
"@octokit/rest": "^18.6.7",
|
|
21
21
|
"commander": "^2.19.0",
|
|
22
|
-
"eslint": "^
|
|
23
|
-
"git-url-parse": "^11.
|
|
24
|
-
"handlebars": "^4.7.
|
|
22
|
+
"eslint": "^7.30.0",
|
|
23
|
+
"git-url-parse": "^11.5.0",
|
|
24
|
+
"handlebars": "^4.7.7",
|
|
25
25
|
"inquirer": "^5.2.0",
|
|
26
|
-
"just-handlebars-helpers": "^1.0.
|
|
26
|
+
"just-handlebars-helpers": "^1.0.18",
|
|
27
27
|
"progress": "^2.0.3",
|
|
28
|
-
"semver": "^
|
|
29
|
-
"simple-git": "^
|
|
30
|
-
"underscore": "^1.
|
|
28
|
+
"semver": "^7.3.5",
|
|
29
|
+
"simple-git": "^2.40.0",
|
|
30
|
+
"underscore": "^1.13.1",
|
|
31
31
|
"update-notifier": "^2.5.0"
|
|
32
32
|
},
|
|
33
33
|
"bugs": {
|
package/src/logs.js
CHANGED
|
@@ -4,9 +4,9 @@ const semver = require('semver');
|
|
|
4
4
|
const ProgressBar = require('progress');
|
|
5
5
|
const _ = require('underscore');
|
|
6
6
|
const git = require('simple-git/promise')(process.cwd());
|
|
7
|
-
const Octokit = require('@octokit/rest');
|
|
7
|
+
const { Octokit } = require('@octokit/rest');
|
|
8
8
|
|
|
9
|
-
const commitRegexString = '(^Merge pull request #([0-9]+) from )|(
|
|
9
|
+
const commitRegexString = '(^Merge pull request #([0-9]+) from )|( ?\\(?#([0-9]+)\\)?$)';
|
|
10
10
|
const commitRegex = new RegExp(commitRegexString);
|
|
11
11
|
|
|
12
12
|
const https = require('https');
|
|
@@ -103,7 +103,7 @@ function getPRInfo(number, commit) {
|
|
|
103
103
|
process.exit(1);
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
return promiseRetryRateLimit(() => octokit.
|
|
106
|
+
return promiseRetryRateLimit(() => octokit.pulls.get({owner, repo, pull_number: number}))
|
|
107
107
|
.catch(onError)
|
|
108
108
|
.then(pr => {
|
|
109
109
|
if (pr === undefined) {
|
|
@@ -128,7 +128,7 @@ function getPRInfo(number, commit) {
|
|
|
128
128
|
info.milestone = pr.data.milestone.title;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
return promiseRetryRateLimit(() => octokit.
|
|
131
|
+
return promiseRetryRateLimit(() => octokit.pulls.listCommits({owner, repo, pull_number: number}))
|
|
132
132
|
.catch(onError)
|
|
133
133
|
.then(commits => {
|
|
134
134
|
info.contributors = _.unique(_.flatten(commits.data.map(i => {
|
|
@@ -189,11 +189,6 @@ async function getPullRequests(from, to) {
|
|
|
189
189
|
const log = await git.log(logParams);
|
|
190
190
|
|
|
191
191
|
const items = log.all
|
|
192
|
-
.filter(item => /^(\*\s)[0-9a-z]+$/.test(item.hash))
|
|
193
|
-
.map(item => {
|
|
194
|
-
item.hash = item.hash.replace(/^(\*\s)/, '');
|
|
195
|
-
return item;
|
|
196
|
-
})
|
|
197
192
|
.filter(item => commitRegex.test(item.message));
|
|
198
193
|
|
|
199
194
|
const data = [];
|
package/src/md.js
CHANGED
|
@@ -2,7 +2,7 @@ const path = require('path');
|
|
|
2
2
|
const fs = require('fs');
|
|
3
3
|
const semver = require('semver');
|
|
4
4
|
const execSync = require('child_process').execSync;
|
|
5
|
-
const Octokit = require('@octokit/rest');
|
|
5
|
+
const { Octokit } = require('@octokit/rest');
|
|
6
6
|
|
|
7
7
|
const Handlebars = require('handlebars');
|
|
8
8
|
|
|
@@ -103,11 +103,10 @@ const readManualFile = () => {
|
|
|
103
103
|
};
|
|
104
104
|
|
|
105
105
|
module.exports = async function({tag, write = true, title = true, owner, repo} = {}) {
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
106
|
+
const data = await octokit.paginate(octokit.orgs.listMembers, {
|
|
107
|
+
org: owner,
|
|
108
|
+
});
|
|
109
|
+
const teamMembers = data.map(({ login }) => login);
|
|
111
110
|
|
|
112
111
|
let historyDataReleases = readHistoryFile();
|
|
113
112
|
|
package/src/release-table.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const Octokit = require('@octokit/rest');
|
|
1
|
+
const { Octokit } = require('@octokit/rest');
|
|
2
2
|
const semver = require('semver');
|
|
3
3
|
|
|
4
4
|
const octokit = new Octokit({
|
|
@@ -40,7 +40,7 @@ module.exports = async function({owner, repo} = {}) {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
releases[0].last = true;
|
|
43
|
-
for (const {tag_name, html_url, lts, last} of releases
|
|
43
|
+
for (const {tag_name, html_url, lts, last} of releases) {
|
|
44
44
|
const minor = tag_name.replace(/\.\d+$/, '');
|
|
45
45
|
const releaseDate = new Date(releasesMap[`${ minor }.0`].published_at);
|
|
46
46
|
if (releaseDate.getDate() < 20) {
|
package/src/set-version.js
CHANGED
|
@@ -5,7 +5,7 @@ const semver = require('semver');
|
|
|
5
5
|
const inquirer = require('inquirer');
|
|
6
6
|
const git = require('simple-git/promise')(process.cwd());
|
|
7
7
|
const logs = require('./logs');
|
|
8
|
-
const Octokit = require('@octokit/rest');
|
|
8
|
+
const { Octokit } = require('@octokit/rest');
|
|
9
9
|
const md = require('../src/md');
|
|
10
10
|
|
|
11
11
|
const octokit = new Octokit({
|
|
@@ -569,13 +569,13 @@ class Houston {
|
|
|
569
569
|
const body = await md({tag: this.version, write: false, title: false, owner: this.owner, repo: this.repo});
|
|
570
570
|
if (answers.create) {
|
|
571
571
|
console.log('Creating pull request');
|
|
572
|
-
const pr = await octokit.
|
|
572
|
+
const pr = await octokit.pulls.create({
|
|
573
573
|
owner: this.owner,
|
|
574
574
|
repo: this.repo,
|
|
575
575
|
title: `Release ${ this.version }`,
|
|
576
576
|
head: await this.currentBranch(),
|
|
577
577
|
base: 'master',
|
|
578
|
-
body
|
|
578
|
+
body: body.slice(0, 65536)
|
|
579
579
|
});
|
|
580
580
|
if (pr.data) {
|
|
581
581
|
console.log(`Pull Request created: ${ pr.data.title }`);
|
|
@@ -593,7 +593,7 @@ class Houston {
|
|
|
593
593
|
|
|
594
594
|
if (answers.create) {
|
|
595
595
|
console.log('Creating pull request');
|
|
596
|
-
const pr = await octokit.
|
|
596
|
+
const pr = await octokit.pulls.create({
|
|
597
597
|
owner: this.owner,
|
|
598
598
|
repo: this.repo,
|
|
599
599
|
title: `Merge master into develop & Set version to ${ this.version }`,
|
package/.github/history.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|