@uxf/scripts 10.0.0-beta.75 ā 10.0.0-beta.80
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 +6 -6
- package/src/GitLab.js +5 -8
- package/src/uxf-lunch/index.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxf/scripts",
|
|
3
|
-
"version": "10.0.0-beta.
|
|
3
|
+
"version": "10.0.0-beta.80",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
"author": "",
|
|
25
25
|
"license": "ISC",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@commitlint/parse": "
|
|
28
|
-
"axios": "
|
|
29
|
-
"cheerio": "
|
|
27
|
+
"@commitlint/parse": "17.7.0",
|
|
28
|
+
"axios": "1.5.1",
|
|
29
|
+
"cheerio": "1.0.0-rc.12",
|
|
30
|
+
"dayjs": "1.11.10",
|
|
30
31
|
"madge": "6.1.0",
|
|
31
|
-
"
|
|
32
|
-
"yargs": "^16.0.3"
|
|
32
|
+
"yargs": "17.7.2"
|
|
33
33
|
}
|
|
34
34
|
}
|
package/src/GitLab.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { env } = require("process");
|
|
2
2
|
const { create } = require("axios");
|
|
3
|
-
const
|
|
3
|
+
const dayjs = require("dayjs");
|
|
4
4
|
const parse = require("@commitlint/parse").default;
|
|
5
5
|
|
|
6
6
|
const axios = create({
|
|
@@ -20,7 +20,7 @@ async function loadCommits(from) {
|
|
|
20
20
|
const response = await axios.get(`/projects/${env.CI_PROJECT_ID}/repository/commits`, {
|
|
21
21
|
params: {
|
|
22
22
|
ref_name: "master",
|
|
23
|
-
since: from ?
|
|
23
|
+
since: from ? dayjs(from).toISOString() : undefined,
|
|
24
24
|
per_page: "100",
|
|
25
25
|
page: nextPage,
|
|
26
26
|
},
|
|
@@ -44,7 +44,7 @@ async function loadCommits(from) {
|
|
|
44
44
|
type: parsedTitle.type,
|
|
45
45
|
subject: (parsedTitle.subject || commit.title).replace(/(#[0-9]*)/g, "").trim(),
|
|
46
46
|
},
|
|
47
|
-
issueIds: parsedTitle.references.map(ref => Number.parseInt(ref.issue)).filter(i => !!i),
|
|
47
|
+
issueIds: parsedTitle.references.map((ref) => Number.parseInt(ref.issue)).filter((i) => !!i),
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -82,17 +82,14 @@ async function getLastTag() {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
async function createRelease(description, dryRun = false) {
|
|
85
|
-
const tag = "release-" +
|
|
85
|
+
const tag = "release-" + dayjs().format("YYYY-MM-DD-HH-mm");
|
|
86
86
|
|
|
87
87
|
if (dryRun) {
|
|
88
88
|
console.log(`\nššš Release "${tag}" published (skipped in dry run)\n\n${description}`);
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
await axios.post(
|
|
93
|
-
`/projects/${env.CI_PROJECT_ID}/releases`,
|
|
94
|
-
{ description, tag_name: tag, ref: 'master' }
|
|
95
|
-
);
|
|
92
|
+
await axios.post(`/projects/${env.CI_PROJECT_ID}/releases`, { description, tag_name: tag, ref: "master" });
|
|
96
93
|
|
|
97
94
|
console.log(`\nššš Release "${tag}" published\n\n${description}`);
|
|
98
95
|
}
|
package/src/uxf-lunch/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const
|
|
1
|
+
const { get } = require("axios");
|
|
2
2
|
const Slack = require("../Slack");
|
|
3
3
|
|
|
4
4
|
const numbers = [":keycap_star:", ":one:", ":two:", ":three:", ":four:", ":five:", ":six:", ":seven:"];
|
|
5
5
|
const paymentsUrl = "https://gitlab.uxf.cz/Vejvoda/obedy/-/wikis/%C4%8C%C3%ADsla-%C3%BA%C4%8Dt%C5%AF";
|
|
6
6
|
|
|
7
7
|
module.exports = async slackChannel => {
|
|
8
|
-
const { data } = await
|
|
8
|
+
const { data } = await get("https://hotel.servispc-liberec.cz/server/api/data-jidelak");
|
|
9
9
|
|
|
10
10
|
const menu = data.ListekPolozky.filter(({ druh }) => druh === "1").map(v => ({
|
|
11
11
|
...v,
|