Skip to content

Conversation

@aduh95
Copy link
Contributor

@aduh95 aduh95 commented Dec 22, 2024

Fixes: #37

(tested with TestOrgPleaseIgnore@98427a5)

@aduh95 aduh95 requested a review from a team as a code owner December 22, 2024 22:09
@github-actions github-actions bot added documentation Improvements or additions to documentation automation Changes to the automation labels Dec 22, 2024
@AugustinMauroy
Copy link
Member

You use term "tweet" on your changes but we should use "post" it's the word use everywhere

richTextFile = path.resolve(path.dirname(requestFilePath), request.richTextFile);
request.richText = fs.readFileSync(richTextFile, 'utf-8');
}
const threadElements = request.action !== 'repost' && request.richText?.split(/\n+ {0,3}([-_*])[ \t]*(?:\1[ \t]*){2,}\n+/g);
Copy link
Member

Choose a reason for hiding this comment

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

I feel that at some point, it would be good to include a proper markdown parser - for example, we can support alternative link text, which is not currently supported in bluesky UI, but supported in their API (the hacker news bot uses this extensively https://bsky.app/profile/newsycombinator.bsky.social), and we can support that too with markdown link syntax, which is a nice-to-have.

replyURL: REPLY_IN_THREAD,
}),
richText,
})) : [request];
Copy link
Member

Choose a reason for hiding this comment

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

I feel this would be a lot more readable if it's just if-else blocks instead of lots of ternary branches, it kills way more brain cells than it deserves to understand this expression...

@joyeecheung joyeecheung merged commit 5ff8795 into nodejs:main Jan 6, 2025
1 check passed
@aduh95 aduh95 deleted the thread-support branch January 6, 2025 17:44
@joyeecheung joyeecheung mentioned this pull request Jan 6, 2025
richTextFile = path.resolve(path.dirname(requestFilePath), request.richTextFile);
request.richText = fs.readFileSync(richTextFile, 'utf-8');
}
const threadElements = request.action !== 'repost' && request.richText?.split(/\n+ {0,3}([-_*])[ \t]*(?:\1[ \t]*){2,}\n+/g);
Copy link
Member

Choose a reason for hiding this comment

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

This regexp appears to have a bug that was encountered in #116, the text ended up being split into

[
  'The future of OSUOSL is in jeopardy - as a nonprofit, they provide free infrastructure for many OSS projects, nurturing smaller projects and filling out support matrices for bigger projects like Node.js. Please help them keep the lights on for the OSS world! https://osuosl.org/blog/osl-future/',
  '-',
  'Node.js currently relies on OSUOSL to test and/or release binaries for Linux arm64, Linux ppc64le, and AIX. To learn more about why they are important for other OSS projects like us and how you can donate, check out https://osuosl.org/donate/'
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation Changes to the automation documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature: write a thread in same JSON file

3 participants