Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let .pulls accept just a username. #20

Merged
merged 2 commits into from Nov 17, 2014
Merged

Let .pulls accept just a username. #20

merged 2 commits into from Nov 17, 2014

Conversation

ralphbean
Copy link
Contributor

Before this, it needed both a username and a repo. Check this out:

@threebean │ .pulls
  threebot │ threebean: (pulls <username[/repo]>) -- List the pending pull requests on github repos.
@threebean │ .pulls what/is/this
  threebot │ threebean: Must be GitHub repo of the format <username/repo> or just <username>
@threebean │ .pulls lmacken
  threebot │ threebean: One moment, please...  Looking up lmacken.
  threebot │ threebean: @msabramo's "README.rst: syntax highlight + tweaks" https://github.com/lmacken/tbgrep/pull/8 filed
           │ 4 days ago
  threebot │ threebean: @Qalthos's "Update action_hooks" https://github.com/lmacken/pyramid-openshift-quickstart/pull/7
           │ filed a year ago                                                                                            e
@threebean │ .pulls fedora-infra
  threebot │ threebean: One moment, please...
  threebot │ threebean: @ralphbean's "Handle timezones." https://github.com/fedora-infra/bugzilla2fedmsg/pull/4 filed 41
           │ minutes ago
  threebot │ threebean: @ralphbean's "Remove unused imports." https://github.com/fedora-infra/fedmsg/pull/300 filed 2 days
           │ ago
  threebot │ threebean: @pypingou's "Let the unorphan action call the unorphan API endpoint"
           │ https://github.com/fedora-infra/packagedb-cli/pull/21 filed 3 days ago
  threebot │ threebean: @ralphbean's "Getting ready for the 1.2.0 release." https://github.com/fedora-infra/kitchen/pull/5
           │ filed 4 days ago
  threebot │ threebean: ... and 6 more.
@threebean │ .pulls fedora-infra/fedmsg
  threebot │ threebean: @ralphbean's "Remove unused imports." https://github.com/fedora-infra/fedmsg/pull/300 filed 2 days
           │ ago

Before this, it needed both a username and a repo.  Check this out:

```
@threebean │ .pulls
  threebot │ threebean: (pulls <username[/repo]>) -- List the pending pull requests on github repos.
@threebean │ .pulls what/is/this
  threebot │ threebean: Must be GitHub repo of the format <username/repo> or just <username>
@threebean │ .pulls lmacken
  threebot │ threebean: One moment, please...  Looking up lmacken.
  threebot │ threebean: @msabramo's "README.rst: syntax highlight + tweaks" lmacken/tbgrep#8 filed
           │ 4 days ago
  threebot │ threebean: @Qalthos's "Update action_hooks" lmacken/pyramid-openshift-quickstart#7
           │ filed a year ago                                                                                            e
@threebean │ .pulls fedora-infra
  threebot │ threebean: One moment, please...
  threebot │ threebean: @ralphbean's "Handle timezones." fedora-infra/bugzilla2fedmsg#4 filed 41
           │ minutes ago
  threebot │ threebean: @ralphbean's "Remove unused imports." fedora-infra/fedmsg#300 filed 2 days
           │ ago
  threebot │ threebean: @pypingou's "Let the unorphan action call the unorphan API endpoint"
           │ fedora-infra/packagedb-cli#21 filed 3 days ago
  threebot │ threebean: @ralphbean's "Getting ready for the 1.2.0 release." fedora-infra/kitchen#5
           │ filed 4 days ago
  threebot │ threebean: ... and 6 more.
@threebean │ .pulls fedora-infra/fedmsg
  threebot │ threebean: @ralphbean's "Remove unused imports." fedora-infra/fedmsg#300 filed 2 days
           │ ago
```
@ralphbean
Copy link
Contributor Author

I figure this will be more useful to #fedora-apps since we want to know "man.. is there anything that needs review?"

list(self.yield_github_pulls(username, repo)) for repo in repos
], [])

# Reverse-sort by time (newest-first)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's useful to also have a .stalepulls [/] which is sorted oldest-first, so you can just go through the list from old to new?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat idea.

@puiterwijk
Copy link
Contributor

Looks good to me! 👍

ralphbean added a commit that referenced this pull request Nov 17, 2014
@ralphbean ralphbean merged commit f05e557 into develop Nov 17, 2014
@ralphbean ralphbean deleted the feature/more-pulls branch November 17, 2014 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants