@ckeditor/ckeditor5-dev-ci 38.3.1 → 38.4.0

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.
@@ -0,0 +1,21 @@
1
+ #!/bin/bash
2
+
3
+ # @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
4
+ # For licensing, see LICENSE.md.
5
+
6
+ echo "Allocating swap memory to prevent running out of RAM."
7
+
8
+ # Remove existing swap so that allocating new swap does not throw.
9
+ sudo swapoff -a
10
+
11
+ # Create a 4 gigabyte swapfile.
12
+ sudo fallocate -l 4G /swapfile
13
+
14
+ # Secure the swapfile by restricting access to root.
15
+ sudo chmod 600 /swapfile
16
+
17
+ # Mark the file as a swap space.
18
+ sudo mkswap /swapfile
19
+
20
+ # Enable the swap.
21
+ sudo swapon /swapfile
File without changes
@@ -0,0 +1,13 @@
1
+ #!/bin/bash
2
+
3
+ # @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
4
+ # For licensing, see LICENSE.md.
5
+
6
+ echo "Installing the latest Chrome."
7
+
8
+ sudo apt-get update
9
+ sudo apt-get install lsb-release libappindicator3-1
10
+ curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
11
+ sudo dpkg -i google-chrome.deb
12
+ sudo sed -i 's|HERE/chrome"|HERE/chrome" --no-sandbox|g' /opt/google/chrome/google-chrome
13
+ rm google-chrome.deb
File without changes
File without changes
@@ -1,5 +1,6 @@
1
1
  [
2
2
  "CKTravisBot",
3
3
  "CKEditorBot",
4
- "CSBot"
4
+ "CSBot",
5
+ "CKCSBot"
5
6
  ]
@@ -8,26 +8,26 @@
8
8
  'use strict';
9
9
 
10
10
  const fetch = require( 'node-fetch' );
11
-
12
11
  const bots = require( './data/bots.json' );
13
12
  const members = require( './data/members.json' );
14
13
 
15
14
  const REPOSITORY_REGEXP = /github\.com\/([^/]+)\/([^/]+)/;
16
15
 
17
16
  /**
18
- * @param {String} slackMessageUsername
19
- * @param {String} iconUrl
20
- * @param {String} repositoryOwner
21
- * @param {String} repositoryName
22
- * @param {String} branch
23
- * @param {String} buildTitle
24
- * @param {String} buildUrl
25
- * @param {String} buildId
26
- * @param {String} githubToken
27
- * @param {String} triggeringCommitUrl
28
- * @param {Number} startTime
29
- * @param {Number} endTime
30
- * @param {Boolean} shouldHideAuthor
17
+ * @param {Object} options
18
+ * @param {String} options.slackMessageUsername
19
+ * @param {String} options.iconUrl
20
+ * @param {String} options.repositoryOwner
21
+ * @param {String} options.repositoryName
22
+ * @param {String} options.branch
23
+ * @param {String} options.buildTitle
24
+ * @param {String} options.buildUrl
25
+ * @param {String} options.buildId
26
+ * @param {String} options.githubToken
27
+ * @param {String} options.triggeringCommitUrl
28
+ * @param {Number} options.startTime
29
+ * @param {Number} options.endTime
30
+ * @param {Boolean} options.shouldHideAuthor
31
31
  */
32
32
  module.exports = async function formatMessage( options ) {
33
33
  const commitDetails = await getCommitDetails( options.triggeringCommitUrl, options.githubToken );
@@ -76,17 +76,22 @@ module.exports = async function formatMessage( options ) {
76
76
  */
77
77
  function getNotifierMessage( options ) {
78
78
  const slackAccount = members[ options.githubAccount ] || null;
79
+ const botActionMessage = '_Automated stuff happened on one of the branches. Got time to have a look at it, anyone?_';
79
80
 
80
81
  if ( options.shouldHideAuthor ) {
81
82
  return '_The author of the commit was hidden. <https://github.com/ckeditor/ckeditor5/issues/9252|Read more about why.>_';
82
83
  }
83
84
 
84
85
  if ( bots.includes( options.githubAccount ) ) {
85
- return '_Automated stuff happened on one of the branches. Got time to have a look at it, anyone?_';
86
+ return botActionMessage;
86
87
  }
87
88
 
88
89
  // If the author of the commit could not be obtained, let's ping the entire team.
89
90
  if ( !slackAccount ) {
91
+ if ( bots.includes( options.commitAuthor ) ) {
92
+ return botActionMessage;
93
+ }
94
+
90
95
  return `<!channel> (${ options.commitAuthor }), could you take a look?`;
91
96
  }
92
97
 
@@ -142,7 +147,7 @@ function getExecutionTime( startTime, endTime ) {
142
147
  */
143
148
  function getFormattedMessage( commitMessage, triggeringCommitUrl ) {
144
149
  if ( !commitMessage ) {
145
- return 'Unavailable';
150
+ return '_Unavailable._';
146
151
  }
147
152
 
148
153
  const [ , repoOwner, repoName ] = triggeringCommitUrl.match( REPOSITORY_REGEXP );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-dev-ci",
3
- "version": "38.3.1",
3
+ "version": "38.4.0",
4
4
  "description": "Utils used on various Continuous Integration services.",
5
5
  "keywords": [],
6
6
  "dependencies": {
@@ -19,7 +19,9 @@
19
19
  "bin": {
20
20
  "ckeditor5-dev-ci-notify-travis-status": "bin/notify-travis-status.js",
21
21
  "ckeditor5-dev-ci-notify-circle-status": "bin/notify-circle-status.js",
22
- "ckeditor5-dev-ci-circle-workflow-notifier": "bin/circle-workflow-notifier.js"
22
+ "ckeditor5-dev-ci-circle-workflow-notifier": "bin/circle-workflow-notifier.js",
23
+ "ckeditor5-dev-ci-allocate-swap-memory": "bin/allocate-swap-memory.sh",
24
+ "ckeditor5-dev-ci-install-latest-chrome": "bin/install-latest-chrome.sh"
23
25
  },
24
26
  "author": "CKSource (http://cksource.com/)",
25
27
  "license": "GPL-2.0-or-later",