Skip to content

Adds missing getCombinedStatus method to Repository.js #397

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

Closed

Conversation

jamsinclair
Copy link

@jamsinclair jamsinclair commented Nov 12, 2016

As I was about to use this great library I noticed it was missing the exact method I was using it for.
See https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref

So thought I better add it for the next person 😸

Changes:

  • Adds getCombinedStatus to the Repository.js module
  • Adds simple test case for getCombinedStatus method
  • Also fixes the only the only lint error in Repository.js

Let me know if it needs any changes 👍

Edit:
Added test seems to be passing see:
https://travis-ci.org/michael/github/jobs/175262817#L1148

@wking
Copy link

wking commented Dec 21, 2016

I'd like this too. It looks like the PR needs a rebase?

wking added a commit to wking/depviz that referenced this pull request Dec 21, 2016
Using a separate call to the GitHub API [1] for open pull requests,
because GitHub doesn't expose this information directly in its issue
response.  The hack access to _request works around the
currently-missing github-tools/github wrapper for this API endpoint
[2].

We don't look this up for closed pull requests, because a separate
per-issue request is expensive, and users are unlikely to care that
much about the CI status of closed pull requests.  If it turns out
that some do care, we'll have to make the done-ness filter
configurable.

This commit also shuffles the expanded card from a two-column,
three-line layout to a one-column, four-line layout (although the last
line is split into a number of columns).  That gives us more space for
multiple people and longer IDs/titles, keeps the cards at a reasonable
size, and doesn't crowd too much.

The status icons are:

* success: U+2713 (CHECK MARK).
* failure: U+26A0 (WARNING SIGN).  Also considered: U+2717 (BALLOT X).
* pending: U+231B (HOURGLASS).  Also considered:
  * U+25CF (BLACK CIRCLE)
  * U+2022 (BULLET)
  * U+23F2 (TIMER CLOCK)

[1]: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref
[2]: github-tools/github#397
@jamsinclair jamsinclair force-pushed the api-combined-status-method branch from b3ce44c to 7c1f28d Compare December 22, 2016 00:32
@codecov-io
Copy link

Current coverage is 90.79% (diff: 100%)

Merging #397 into master will increase coverage by 0.77%

@@             master       #397   diff @@
==========================================
  Files            12         12          
  Lines           401        402     +1   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits            361        365     +4   
+ Misses           40         37     -3   
  Partials          0          0          

Powered by Codecov. Last update 6ec1d0b...7c1f28d

This was referenced Aug 29, 2019
@j-rewerts
Copy link
Member

Closing in favour of #580.

@j-rewerts j-rewerts closed this Sep 1, 2019
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.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy