fedora-infra / supybot-fedora

Fedora plugin for Supybot
20 stars 23 forks source link

Add a new command to list GH pull requests. #17

Closed ralphbean closed 9 years ago

ralphbean commented 9 years ago

The command looks like this:

threebean │ .pulls
   zodbot │ threebean: (pulls <username/repo>) -- List the pending pull requests on a github repo.
threebean │ .pulls fedora-infra
   zodbot │ threebean: Must be GitHub repo of the format <username/repo>
threebean │ .pulls fedora-infra/tahrir
   zodbot │ threebean: @hroncok's "Reenable gravatar fallback" https://github.com/fedora-infra/tahrir/pull/209
threebean │ .pulls fedora-watwat/tahrir
   zodbot │ threebean: No such GitHub repository 'fedora-watwat/tahrir'
threebean │ .pulls kennethreitz/requests
   zodbot │ threebean: @dpursehouse's "Linkify Github usernames in authors list" https://github.com/kennethreitz/requests/pull/2140
   zodbot │ threebean: @jamielennox's "Apply environment features to prepared requests" https://github.com/kennethreitz/requests/pull/2129
   zodbot │ threebean: @alekstorm's "Create Request.links_multi and utils function for properly parsing Link headers" https://github.com/kennethreitz/requests/pull/1980
   zodbot │ threebean: @kevinburke's "Connect timeout" https://github.com/kennethreitz/requests/pull/1801

It requires that we add an github.oauth_token to the zodbot config which we can get from https://github.com/settings/tokens/new

pypingou commented 9 years ago

One comment about the number of results per page (which might lead to flooding), otherwise looks good

ralphbean commented 9 years ago

Good point.. I adding some limiting on the end so that it looks like this now:

threebean │ .pulls kennethreitz/requests
   zodbot │ threebean: @dpursehouse's "Linkify Github usernames in authors list"
          │ https://github.com/kennethreitz/requests/pull/2140
   zodbot │ threebean: @jamielennox's "Apply environment features to prepared requests"
          │ https://github.com/kennethreitz/requests/pull/2129
   zodbot │ threebean: ... and 2 more.