Giter Site home page Giter Site logo

github_poller's Introduction

GithubPoller

Receive a message every time a PR is updated, checking them at constant intervals

The poller will periodically check the PRs on your Github repository and send a message to the GenServer which has spawned the process if any PR has changed.

Client Usage:

token = "your github token here"
github_org_name = "lorenzosinisi"
github_repo_name = "github_poller"
notify = self() # the GenServer will receive info messages when some PR is updated, default to self()
Github.Poller.start_link(api_token: token, owner: github_org_name, repo: github_repo_name, every: :timer.seconds(1), notify: notify)

Implement your own GenServer that will be notified of PR changes:

defmodule Example do
  use GenServer
  ...
  # add this
  @impl GenServer
  def handle_info({:repo_update, _repo_state} = message, state) do
    Logger.debug("#{__MODULE__} received #{inspect(message)}")
    {:noreply, state}
  end
end

github_poller's People

Contributors

lorenzosinisi avatar sasa1977 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

github_poller's Issues

Implement CI

We need to implement CI for this repo, ideally a GH action to run unit unit tests

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.