Git Product home page Git Product logo

gopherbot's People

Contributors

andrein avatar andydotxyz avatar ardan-bkennedy avatar ayushg3112 avatar deltamualpha avatar dlsniper avatar elliotforbes avatar idemelis avatar justenwalker avatar peterhellberg avatar runlevl4 avatar seankhliao avatar theckman avatar xe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gopherbot's Issues

Add some other CI system to allow testing of PRs

It looks like Heroku CI only tests branches on this repo, and not pull requests to this repo from others. That's a pretty terrible experience, so we'll need to invest in some other CI system.

Add bgtask to print GitHub statistics (would that be accepted?)

I would like to emit a count of open issues/PRs to #pion. My hope is that if people see the work that is available it will encourage more people to get involved!

I can write it in a general way so people can submit their own queries. I want to do the following queries. Would be nice to share the link, a label and the count.

Add #newbies channel to "newbie resources"

We should point folks to the #newbies channel if they are asking for newbie resources. It probably makes sense for the newbie resources command to take the channel in to account, and only recommend #newbies if we aren't already in that channel.

Add define command to define common words and terms

Add a simple command to define a word. I was thinking this should be an API somewhere we can hit to get a reasonable answer but realistically it will have to be a curated list.

The terms to be defined would probably just be Go terms, but there could be a fallback to a dictionary API for ESL people. It's probably over-complicating though.

Previous discussion here: gobridge/gopher#33

Enhance bgtask for GoTime

Since the Twitter app has been de-authorized on Gophers Slack; updates from the GoTime Twitter Feed / Mastodon Feed will no longer work. The preferred way of pushing these updates to Slack is through Gopher Bot.

This issue is to propose adding this support to the existing bgtask for gotime.

Proposal

  1. Create a new package internal/poller/gotimestatus

  2. Define NotifyFunc in internal/poller/gotimestatus. This function is called by poller/gotimestatus.GoTimeStatus whenever a new Mastodon post is discovered with the URL of the status.

    type NotifyFunc func(ctx context.Context, statusURL string) error
  3. Poll @[email protected] using the Account/Statuses API: https://changelog.social/api/v1/accounts/109349735213354404/statuses?since_id=LAST_ID

  • If there is no last status ID, post the latest status (only one)
  • If there is a last status ID
    • Get statuses since that ID using since_id
    • Skip any statuses older than maxStatusAge. We only want to post fresh statuses, and this doubles as a way to avoid spamming the channel with the same update if redis persistence fails.
    • Call NotifyStatus for each statuses newer than the id.
    • Store the last status ID so it doesn't re-post again on the next call to Poll.
  1. Create cmd/bgtasks/gotimestatus.go to set up the gotime status poller.

  2. Define goTimeStatusNotifyFactory in gotimestatus.go that creates a function which uses the Slack Client to call chat.postMessage with unfurl_links=true and the statusURL as text. This allows Slack to do most of the heavy lifting reading the HTML from Mastodon and translating that into a Slack post. Example Below.

    gotime_mastodon

Implementation Questions

  1. Should the GopherBot post as itself (ie: @gopher) or should it customize the slack message to use a Profile Image + Name. We can use any image and name. If there is an emoji we can also use that as the picture. Example:

gotime_changelog

Updates

Originally I had proposed to modify the gotime poller to add this functionality. But I did a little PoC and it is much cleaner to make a new package and copy/paste the implementation into the new package, making the necessary modifications. It gets real messy trying to shoehorn it into the existing poller.

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.