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
2 changes: 1 addition & 1 deletion components/slack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/slack",
"version": "0.6.3",
"version": "0.6.4",
"description": "Pipedream Slack Components",
"main": "slack.app.mjs",
"keywords": [
Expand Down
32 changes: 32 additions & 0 deletions components/slack/sources/new-saved-message/new-saved-message.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import common from "../common/base.mjs";
import sampleEmit from "./test-event.mjs";
Comment on lines +1 to +2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

Codebase Verification

The sampleEmit module is imported but not used in the new-saved-message.mjs file. Additionally, no circular dependencies were detected involving the common or sampleEmit modules.

  • Consider removing the unused sampleEmit import.
Analysis chain

Ensure that the imported modules are used effectively and check for potential circular dependencies.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the usage of imported modules and check for circular dependencies.
ast-grep --lang javascript --pattern $'import $$$$ from "$$";'

Length of output: 63



Script:

#!/bin/bash
# Description: Verify the usage of imported modules `common` and `sampleEmit` within `new-saved-message.mjs`.
echo "Usage of 'common' in new-saved-message.mjs:"
ast-grep --lang javascript --pattern 'common.$$$' components/slack/sources/new-saved-message/new-saved-message.mjs

echo "Usage of 'sampleEmit' in new-saved-message.mjs:"
ast-grep --lang javascript --pattern 'sampleEmit.$$$' components/slack/sources/new-saved-message/new-saved-message.mjs

# Description: Check for potential circular dependencies involving `common` and `sampleEmit` modules.
echo "Checking for circular dependencies involving 'common':"
ast-grep --lang javascript --pattern 'import $$$$ from "../common/base.mjs";' components/slack/sources/new-saved-message/new-saved-message.mjs

echo "Checking for circular dependencies involving 'sampleEmit':"
ast-grep --lang javascript --pattern 'import $$$$ from "./test-event.mjs";' components/slack/sources/new-saved-message/new-saved-message.mjs

Length of output: 1177


export default {
...common,
key: "slack-new-saved-message",
name: "New Saved Message (Instant)",
version: "0.0.1",
description: "Emit new event when a message is saved. Note: The endpoint is marked as deprecated, and Slack might shut this off at some point down the line.",
type: "source",
dedupe: "unique",
props: {
...common.props,
// eslint-disable-next-line pipedream/props-description,pipedream/props-label
slackApphook: {
type: "$.interface.apphook",
appProp: "slack",
async eventNames() {
return [
"star_added",
];
},
},
},
methods: {
...common.methods,
getSummary() {
return "New saved message";
},
},
sampleEmit,
};
37 changes: 37 additions & 0 deletions components/slack/sources/new-saved-message/test-event.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
export default {
"type": "star_added",
"user": "US676PZLY",
"item": {
"type": "message",
"channel": "C055ECVUMLN",
"message": {
"user": "US676PZLY",
"type": "message",
"ts": "1718379912.272779",
"client_msg_id": "def19b3b-4283-47bd-a2da-f32b35c0329c",
"text": "hello",
"team": "TS8319547",
"blocks": [
{
"type": "rich_text",
"block_id": "ZL1yL",
"elements": [
{
"type": "rich_text_section",
"elements": [
{
"type": "text",
"text": "hello"
}
]
}
]
}
],
"permalink": "https://michellestest-j1q3506.slack.com/archives/C055ECVUMLN/p1718379912272779"
},
"date_create": 1718385156
},
"event_ts": "1718385156.694322",
"pipedream_msg_id": "pd_1718385158733_tl8yx25evl"
}