teknologi-umum / gitgram Goto Github PK
View Code? Open in Web Editor NEWGithub notifications for Telegram
License: GNU General Public License v3.0
Github notifications for Telegram
License: GNU General Public License v3.0
@TokoBapak is using gitgram (of course) and Github Discussion to talk all things regarding the project. Most people don't get the notification unless mentioned. It didn't appeared on the Telegram channel anyway.
A few actions that most likely will help us:
discussion_comment.created
-> <user>
left a comment on <discussion title>
discussion.created
-> <user>
started a discussion on <category>
: <discussion title>
discussion.closed
-> <user>
closed discussion on <category>
: <discussion title>
discussion.answered
-> <user>
marked <category>
: <discussion title>
as answereddiscussion.pinned
-> <user>
pinned a discussion on <category>
: <discussion title>
discussion.reopened
-> <user>
reopened a discussion on <category>
: <discussion title>
Documentations:
the changes
field, which is used here:
simply add the changes
field to the GithubAdapter like any other field here: https://github.com/teknologi-umum/gitgram/blob/master/src/application/adapters/GithubAdapter.ts
After somebody push a commit to master, the CI would run. After that succeeds, a container image should be created.
Should create two variants:
For each variant, should create multiple tags:
Try spamming on GitHub doing some activities that activates the webhook for 15 minutes, and see if you get any notification.
This is a bug that can be fixed by checking the length of the text for each webhook item to be send on Telegram before sending it.
currently it sends the wrong body which results in an empty body, it should send changes.body.from
(old) and comments.body
(new)
Maybe we'll just focus on Github and Gitlab first, then we can work our way through Gitea and Bitbucket later on.
Github reference: https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads
Gitlab reference: https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html
some reference that parses data from multiple providers: https://github.com/go-playground/webhooks
Initial setup has been done in #26, but it only covers a single function. We need more unit tests.
anunya anu
currently it uses throttle which ignores events that occured too frequent, what we actually want is something like this:
--1-2-3-4-5-6--> // every 500ms
turned into:
--1---3---5----> // every 1s
we lost some events
--1-2-3-4-5-6--> // every 500ms
turned into:
--1---2---3----> // every 1s
we no longer losing some events because we buffered past events and then send it based on the configured interval
Sentry Issue: GITGRAM-1
GrammyError: Call to 'sendMessage' failed! (400: Bad Request: can't parse entities: Unclosed start tag at byte offset 161)
File "/home/app/dist/src/presentation/TelegramPresenter.js", line 41, in Object.next
await this._bot.api.sendMessage(info[0].targetId.toString(), message, {
Implement adapter to convert the event payload that Gitlab sends into our interface. See https://github.com/teknologi-umum/gitgram/blob/master/src/application/adapters/GithubAdapter.ts for reference
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.