Skip to content

Commit

Permalink
feat: discussion handler
Browse files Browse the repository at this point in the history
  • Loading branch information
elianiva committed Jan 14, 2024
1 parent 7d30de6 commit df5d1ad
Show file tree
Hide file tree
Showing 17 changed files with 1,837 additions and 1,119 deletions.
58 changes: 57 additions & 1 deletion config/templates.ura
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ templates:
error: """
<b>💥 Error deploying <a href="https://github.com/{{repoName}}">{{repoName}}</a> ({{environment}})</b>
"""

issues:
closed: """
<b>🚫 Issue <a href="{{url}}">#{{no}} {{title}}</a> was closed by {{actor}}</b>
Expand Down Expand Up @@ -162,3 +162,59 @@ templates:
moderate: "⚠️ Moderate"
high: "‼️ High"
critical: "⛔ Critical"
discussion:
created: """
<b>🗣️ New discussion <a href="{{url}}">#{{no}} {{title}}</a> was opened by {{author}}</b>

{{body}}

<b>Repo</b>: <a href="https://github.com/{{repoName}}">{{repoName}}</a>
<b>Category</b>: {{category}}
"""
closed: """
<b>🚫 Discussion <a href="{{url}}">#{{no}} {{title}}</a> was closed by {{actor}}</b>

<b>Repo</b>: <a href="https://github.com/{{repoName}}">{{repoName}}</a>
<b>Category</b>: {{category}}
"""
deleted: """
<b>🗑️ Discussion <a href="{{url}}">#{{no}} {{title}}</a> was deleted by {{actor}}</b>

<b>Repo</b>: <a href="https://github.com/{{repoName}}">{{repoName}}</a>
<b>Category</b>: {{category}}
"""
edited: """
<b>🗣️ Discussion <a href="{{url}}">#{{no}} {{title}}</a> was edited by {{actor}}</b>

<b>Repo</b>: <a href="https://github.com/{{repoName}}">{{repoName}}</a>
<b>Category</b>: {{category}}
"""
pinned: """
<b>📌 Discussion <a href="{{url}}">#{{no}} {{title}}</a> was pinned by {{actor}}</b>

<b>Repo</b>: <a href="https://github.com/{{repoName}}">{{repoName}}</a>
<b>Category</b>: {{category}}
"""
reopened: """
<b>🗣️ Discussion <a href="{{url}}">#{{no}} {{title}}</a> was reopened by {{actor}}</b>

<b>Repo</b>: <a href="https://github.com/{{repoName}}">{{repoName}}</a>
<b>Category</b>: {{category}}
"""
answered: """
<b>🗣️ Discussion <a href="{{url}}">#{{no}} {{title}}</a> was answered by {{actor}}</b>

{{body}}

<b>Repo</b>: <a href="https://github.com/{{repoName}}">{{repoName}}</a>
<b>Category</b>: {{category}}
"""
comment_created: """
<b>💬 New comment on discussion <a href="{{url}}">#{{no}} {{title}}</a> by {{actor}}</b>

{{body}}

<b>Repo</b>: <a href="https://github.com/{{repoName}}">{{repoName}}</a>
<b>Category</b>: {{category}}
<b>Replies</b>: {{replyCount}}
"""
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,41 +27,41 @@
},
"homepage": "https://github.com/teknologi-umum/gitgram#readme",
"devDependencies": {
"@esbuild-kit/esm-loader": "^2.5.5",
"@esbuild-kit/esm-loader": "^2.6.5",
"@teknologi-umum/eslint-config-typescript": "^0.0.10",
"@types/eventsource": "^1.1.10",
"@types/node": "^18.17.11",
"@types/node-fetch": "^2.6.4",
"@types/sanitize-html": "^2.9.0",
"@vitest/coverage-v8": "^0.34.3",
"esbuild": "^0.19.2",
"esbuild-register": "^3.4.2",
"eslint": "^8.48.0",
"eslint-plugin-import": "^2.28.1",
"@types/eventsource": "^1.1.15",
"@types/node": "^20.11.0",
"@types/node-fetch": "^2.6.10",
"@types/sanitize-html": "^2.9.5",
"@vitest/coverage-v8": "^1.2.0",
"esbuild": "^0.19.11",
"esbuild-register": "^3.5.0",
"eslint": "^8.56.0",
"eslint-plugin-import": "^2.29.1",
"husky": "^8.0.3",
"nodemon": "^3.0.1",
"nodemon": "^3.0.2",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"vite": "^4.4.9",
"vitest": "^0.34.3"
"typescript": "^5.3.3",
"vite": "^5.0.11",
"vitest": "^1.2.0"
},
"dependencies": {
"@octokit/webhooks-types": "^7.2.0",
"@octokit/webhooks-types": "^7.3.1",
"cheerio": "1.0.0-rc.12",
"colorette": "^2.0.20",
"dotenv": "^16.3.1",
"eventsource": "^2.0.2",
"grammy": "^1.18.1",
"grammy": "^1.20.3",
"gura": "^1.4.4",
"polka": "1.0.0-next.22",
"remark-gfm": "^3.0.1",
"remark-html": "^15.0.2",
"remark-parse": "^10.0.2",
"remark-gfm": "^4.0.0",
"remark-html": "^16.0.1",
"remark-parse": "^11.0.0",
"rxjs": "^7.8.1",
"sanitize-html": "^2.11.0",
"templite": "^1.2.0",
"unified": "^10.1.2",
"zod": "^3.22.2"
"unified": "^11.0.4",
"zod": "^3.22.4"
},
"engineStrict": true,
"engines": {
Expand Down
Loading

0 comments on commit df5d1ad

Please sign in to comment.