Skip to content

Commit

Permalink
fix: properly use new flag (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSench authored Nov 6, 2024
1 parent 334d94d commit 9dc0c75
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions dist/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -42374,7 +42374,7 @@ __nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependen
async function run() {
try {
const { reactionConfig, channelConfig } = (0,_workflow_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getConfig */ .iE)();
for (let { channelId, limit } of channelConfig) {
for (let { channelId, limit, disableReactionCopying } of channelConfig) {
const messagesForChannel = [];
for (let message of await (0,_slack_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getMessages */ ._U)(channelId, limit)) {
const pullRequests = (0,_github_mjs__WEBPACK_IMPORTED_MODULE_3__/* .extractPullRequests */ .Nd)(message.text);
Expand All @@ -42391,7 +42391,7 @@ async function run() {
}

messagesForChannel.push(
await (0,_workflow_mjs__WEBPACK_IMPORTED_MODULE_1__/* .buildPrMessage */ .wB)(channelId, message, pullRequests[0], reactionConfig, channelConfig)
await (0,_workflow_mjs__WEBPACK_IMPORTED_MODULE_1__/* .buildPrMessage */ .wB)(channelId, message, pullRequests[0], reactionConfig, disableReactionCopying)
);
}
await (0,_slack_mjs__WEBPACK_IMPORTED_MODULE_2__/* .postOpenPrs */ .JZ)(channelId, messagesForChannel);
Expand Down Expand Up @@ -42661,9 +42661,9 @@ function isResolved(message, reactionConfig) {
* @param {ChannelConfig} channelConfig
* @returns {Promise<PrMessage>}
*/
async function buildPrMessage(channelId, message, pullRequest, reactionConfig, channelConfig) {
async function buildPrMessage(channelId, message, pullRequest, reactionConfig, disableReactionCopying) {
/** @type {Array<string>} */
const existingReactions = channelConfig.disableReactionCopying
const existingReactions = disableReactionCopying
? []
: (message.reactions ?? [])
.map(reaction => reaction.name)
Expand Down
4 changes: 2 additions & 2 deletions src/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { extractPullRequests } from "./github.mjs"
export async function run() {
try {
const { reactionConfig, channelConfig } = getConfig();
for (let { channelId, limit } of channelConfig) {
for (let { channelId, limit, disableReactionCopying } of channelConfig) {
const messagesForChannel = [];
for (let message of await getMessages(channelId, limit)) {
const pullRequests = extractPullRequests(message.text);
Expand All @@ -23,7 +23,7 @@ export async function run() {
}

messagesForChannel.push(
await buildPrMessage(channelId, message, pullRequests[0], reactionConfig, channelConfig)
await buildPrMessage(channelId, message, pullRequests[0], reactionConfig, disableReactionCopying)
);
}
await postOpenPrs(channelId, messagesForChannel);
Expand Down
4 changes: 2 additions & 2 deletions src/workflow.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ function isResolved(message, reactionConfig) {
* @param {ChannelConfig} channelConfig
* @returns {Promise<PrMessage>}
*/
export async function buildPrMessage(channelId, message, pullRequest, reactionConfig, channelConfig) {
export async function buildPrMessage(channelId, message, pullRequest, reactionConfig, disableReactionCopying) {
/** @type {Array<string>} */
const existingReactions = channelConfig.disableReactionCopying
const existingReactions = disableReactionCopying
? []
: (message.reactions ?? [])
.map(reaction => reaction.name)
Expand Down

0 comments on commit 9dc0c75

Please sign in to comment.