GithubHelp home page GithubHelp logo

github-telebot's Introduction

Introduction

Stars Earned Collaborated Stars Followers Repositories GitHub Page

  • πŸ‘‹ Hi! Here is AoiHosizora (ι’γ„γ»γ—γžγ‚‰), majors in Intelligent Software and Robotics, Software Engineering.
  • πŸ“ Speaking languages: Mandarin Chinese (Native), Teo-Swa-uΓͺ (Native), English (CET-6), Japanese (JLPT-N1).
  • 🏒 Some owned GitHub organizations: ah-shellext & ah-forklib, my public email: [email protected].
  • πŸš€ Interest areas: distributed backend system development, desktop client and android client development.
  • ⚑ Favorite programming languages: Go, Dart, C#, Kotlin, Rust, Typescript, etc.

Coding status

github-telebot's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

github-telebot's Issues

Show items order

Reverse items, make older one is on top (default is newer on top).

Issue duplicate

There are still some issues will show duplicatedly. Old issue events in redis should not be overwrite directly.

Use redis

Save old data to redis rather than memory directly.

var (
	oldActivities = make(map[int64][]*model.ActivityEvent, 0)
	oldIssues     = make(map[int64][]*model.IssueEvent, 0)
)

New event type render

New type record:

  1. head_ref_deleted
  2. head_ref_restored
  3. added_to_project
  4. PullRequestReviewEvent
  5. removed_from_project
  6. moved_columns_in_project

Add event and user filter

A new feature: add event-user filter for each chat, because some repos may generate a same event frequently.

String render in telegram

1. no-response\[bot\](https://github.com/no-responsebot) closed issue #376 (https://github.com/fireslime/photo_view/issues/376) in fireslime/photo_view (https://github.com/fireslime/photo_view)
2. no-response\[bot\](https://github.com/no-responsebot) created comment 736390737 (https://github.com/fireslime/photo_view/issues/376#issuecomment-736390737) on issue #376 (https://github.com/fireslime/photo_view/issues/376) in fireslime/photo_view (https://github.com/fireslime/photo_view)

Mention issue is wrong

Project related event

https://developer.github.com/v3/issues/issue-event-types/#moved_columns_in_project

added_to_project

{
  "project_card": {
    "id": 45842528,
    "url": "https://api.github.com/projects/columns/cards/45842528",
    "project_id": 4888736,
    "project_url": "https://api.github.com/projects/4888736",
    "column_name": "In progress"
  }
}

moved_columns_in_project

{
  "project_card": {
    "id": 45842528,
    "url": "https://api.github.com/projects/columns/cards/45842528",
    "project_id": 4888736,
    "project_url": "https://api.github.com/projects/4888736",
    "column_name": "To do",
    "previous_column_name": "In progress"
  }
}

Strange error

2020/07/26 20:50:22 runtime error: index out of range [-3]
gopkg.in/tucnak/telebot%2ev2.(*Bot).debug
        E:/Go/path/pkg/mod/gopkg.in/tucnak/[email protected]/util.go:12
gopkg.in/tucnak/telebot%2ev2.(*Bot).deferDebug
        E:/Go/path/pkg/mod/gopkg.in/tucnak/[email protected]/util.go:24
runtime.gopanic
        E:/Go/src/runtime/panic.go:969
runtime.goPanicIndex
        E:/Go/src/runtime/panic.go:88
github.com/Aoi-hosizora/ah-tgbot/util.renderGithubIssueString
        F:/Projects/github-tgbot/util/render.go:144
github.com/Aoi-hosizora/ah-tgbot/util.RenderGithubIssueString
        F:/Projects/github-tgbot/util/http.go:103
github.com/Aoi-hosizora/ah-tgbot/bot.sendIssuenCtrl
        F:/Projects/github-tgbot/bot/controller.go:281
github.com/Aoi-hosizora/ah-tgbot/bot.sendIssueCtrl
        F:/Projects/github-tgbot/bot/controller.go:244
github.com/Aoi-hosizora/ah-tgbot/bot.handleWithLogger.func1
        F:/Projects/github-tgbot/bot/bot.go:48
gopkg.in/tucnak/telebot%2ev2.(*Bot).handle.func1
        E:/Go/path/pkg/mod/gopkg.in/tucnak/[email protected]/bot.go:434
runtime.goexit
        E:/Go/src/runtime/asm_amd64.s:1373
case "referenced":
	toRepo := obj.CommitUrl // https://api.github.com/repos/gofiber/fiber/commits/a65d5027f336339cf4fe20cda0232c56cd64212e
	toSp := strings.Split(toRepo, "/")
	toRepo = fmt.Sprintf("%s/%s", toSp[len(toSp)-4], toSp[len(toSp)-3])
	toRepoUrl := fmt.Sprintf("https://github.com/%s", toRepo)
	message = fmt.Sprintf("%s added a commit [%s](%s) to [%s](%s) that referenced %s", actorMd, obj.CommitId[:7], obj.CommitUrl, toRepo, toRepoUrl, issueRepoMd)

Issue link wrong

In mension issue event, issue's link is error: issue -> issues.

image

go mod url

Update mod url from github.com/Aoi-hosizora/ah-tgbot to github.com/Aoi-hosizora/github-tgbot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.