Files
theia-code-os/.github/workflows/discussion-welcome.yml
mawkone 8bb5110148
Some checks failed
Playwright Tests / Playwright Tests (ubuntu-22.04, Node.js 22.x) (push) Has been cancelled
3PP License Check / 3PP License Check (11, 22.x, ubuntu-22.04) (push) Has been cancelled
Publish packages to NPM / Perform Publishing (push) Has been cancelled
deploy: current vibn theia state
Made-with: Cursor
2026-02-27 12:01:08 -08:00

47 lines
1.7 KiB
YAML

name: Welcome Discussion
on:
discussion:
types: [created]
permissions:
discussions: write
jobs:
welcome:
runs-on: ubuntu-latest
steps:
- name: Add welcome comment
uses: actions/github-script@e69ef5462fd455e02edcaf4dd7708eda96b9eda0 # v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const discussion = context.payload.discussion;
const author = discussion.user.login;
const message = [
`Hi @${author}, thanks for starting this discussion! 👋`,
'',
'The Theia community will take a look soon. In the meantime, you might find helpful information in:',
'- 📖 [Theia Documentation](https://theia-ide.org/docs/)',
'- ❓ [FAQ](https://theia-ide.org/docs/faq/)',
'- 💬 [Previous Discussions](https://github.com/eclipse-theia/theia/discussions)',
'',
'---',
'',
'💙 Eclipse Theia is built and maintained by a community of contributors and sponsors. ' +
'If Theia is valuable to your work, consider [sponsoring the project](https://theia-ide.org/support/). ' +
'For professional support, training, or consulting services, [learn more about available options](https://theia-ide.org/support/).'
].join('\n');
await github.graphql(`
mutation($discussionId: ID!, $body: String!) {
addDiscussionComment(input: {discussionId: $discussionId, body: $body}) {
clientMutationId
}
}
`, {
discussionId: discussion.node_id,
body: message
});