-
Notifications
You must be signed in to change notification settings - Fork 10
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
update github status to allow for drier object oriented usage #7
update github status to allow for drier object oriented usage #7
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you provide a brief example of what calling this in a pipeline would look like?
Yes, example new usage is
or you can still use the old
|
is there a contrib anywhere on how to apply contributions and make them public? |
} | ||
|
||
void update() { | ||
public void setStatus(String context, String status, String description) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHubStatus
objects are meant to encapsulate an individual status. context
is part of the composite key that identifies each status, so it should be included in the constructor.
Nit: public
is the default in Groovy.
801ef20
to
2ba6f00
Compare
@cmparkinson after an offline talk i went ahead and extracted the github api portion out into it's own object, which allows for things to be dried up. I also switched the instance method original execution of gitHubStatus variable remains working, and drier usage of GitHubStatus looks like:
|
2ba6f00
to
f40e35e
Compare
a3c1399
to
e4c74e0
Compare
c642318
to
51e2438
Compare
3312751
to
c61e796
Compare
c61e796
to
b32d777
Compare
@cmparkinson @jadametz am i good to merge this? and what's the release process? |
Looks good to merge. No formally outlined contribution guidelines at the moment. To make it available it just needs to have a tag/release. Feel free to add release notes 😄 |
Doing this to help with dryness in pipeline files that are looking to set many statuses for the same sha