Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async function isTouchingSomethingNeedingTesting( github, owner, repo, number, c
* If there isn't, create one if it is needed.
*
* @param {github} github - Pre-authenticated octokit/rest.js client with pagination plugins
* @param {Object} context - Context of the workflow run
* @param {object} context - Context of the workflow run
* @param {core} core - A reference to the @actions/core package
* @returns {Promise<number>} Promise resolving to a comment ID, or 0 if no comment is found.
*/
Expand Down
8 changes: 8 additions & 0 deletions .pnpmfile.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,14 @@ function fixPeerDeps( pkg ) {
pkg.peerDependencies[ '@wordpress/data' ] = '^6.1.5 || ^7.0.0';
}

// Outdated peer dependency.
if (
pkg.name === 'eslint-plugin-wpcalypso' &&
pkg.peerDependencies[ 'eslint-plugin-jsdoc' ] === '^37.5.1'
) {
pkg.peerDependencies[ 'eslint-plugin-jsdoc' ] = '>=37.5.1';
}

return pkg;
}

Expand Down
90 changes: 43 additions & 47 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Clean up JavaScript eslint issues.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const sendSlackMessage = require( '../../utils/send-slack-message' );
* Search for a previous comment from this task in our issue.
*
* @param {Array} issueComments - Array of all comments on that issue.
* @returns {Promise<Object>} Promise resolving to an object of information about our comment.
* @returns {Promise<object>} Promise resolving to an object of information about our comment.
*/
async function getListComment( issueComments ) {
let commentInfo = {};
Expand Down Expand Up @@ -129,7 +129,7 @@ ${ issueReferences
* @param {WebhookPayloadIssue} payload - Issue event payload.
* @param {string} channel - Slack channel ID.
* @param {string} message - Basic message (without the formatting).
* @returns {Object} Object containing the slack message and its formatting.
* @returns {object} Object containing the slack message and its formatting.
*/
function formatSlackMessage( payload, channel, message ) {
const { issue, repository } = payload;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async function hasManySupportReferences( issueComments ) {
* @param {WebhookPayloadIssue} payload - Issue event payload.
* @param {string} channel - Slack channel ID.
* @param {string} message - Basic message (without the formatting).
* @returns {Object} Object containing the slack message and its formatting.
* @returns {object} Object containing the slack message and its formatting.
*/
function formatSlackMessage( payload, channel, message ) {
const { issue, repository } = payload;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const fetch = require( 'node-fetch' );
* @param {string} channel - Slack channel ID.
* @param {string} token - Slack token.
* @param {WebhookPayloadPullRequest} payload - Pull request event payload.
* @param {Object} customMessageFormat - Custom message formatting. If defined, takes over from message completely.
* @param {object} customMessageFormat - Custom message formatting. If defined, takes over from message completely.
* @returns {Promise<boolean>} Promise resolving to a boolean, whether message was successfully posted or not.
*/
async function sendSlackMessage( message, channel, token, payload, customMessageFormat = {} ) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Clean up JavaScript eslint issues.
2 changes: 1 addition & 1 deletion projects/github-actions/test-results-to-slack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "test-results-to-slack",
"version": "0.2.0",
"version": "0.2.1-alpha",
"description": "GitHub Action to send Slack notifications with test results",
"author": "Automattic",
"license": "GPL-2.0-or-later",
Expand Down
6 changes: 3 additions & 3 deletions projects/github-actions/test-results-to-slack/src/slack.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ const { debug, error } = require( './debug' );
/**
* Sends a Slack message.
*
* @param {Object} client - Slack client
* @param {object} client - Slack client
* @param {boolean} update - if it should update a message. For true, it will update an existing message based on `ts`, false will send a new message.
* @param {Object} options - options
* @param {object} options - options
* @returns {Promise<*>} the response from the Slack API. In case when multiple messages are sent due to the blocks length the last message response is returned.
*/
async function postOrUpdateMessage( client, update, options ) {
Expand Down Expand Up @@ -129,7 +129,7 @@ function getBlocksChunks( blocks, maxSize, typeDelimiter ) {
/**
* Finds and returns a Slack message that contains a given string in its text (not in blocks!)
*
* @param {Object} client - the Slack client
* @param {object} client - the Slack client
* @param {string} channelId - the channel id
* @param {string} identifier - the string to search for in the messages text
* @returns {Promise<*|null>} the message Object
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Clean up JavaScript eslint issues.
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ const DisconnectDialog = props => {
/**
* Determine what step to show based on the current state
*
* @returns { React.Component } - component for current step
* @returns { React.Component|undefined } - component for current step
*/
const getCurrentStep = () => {
if ( ! isDisconnected ) {
Expand Down Expand Up @@ -342,6 +342,8 @@ const DisconnectDialog = props => {
} else if ( isFeedbackProvided ) {
return <StepThankYou onExit={ backToWordpress } />;
}

return undefined;
};

return (
Expand Down
Loading