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

Expose the underlying Github Client? #25

Open
xsc opened this issue Jun 30, 2018 · 5 comments
Open

Expose the underlying Github Client? #25

xsc opened this issue Jun 30, 2018 · 5 comments

Comments

@xsc
Copy link

xsc commented Jun 30, 2018

Thanks for this plugin! It has improved our PR workflow quite a bit by allowing us to provide build feedback as comments or commit statuses.

Now, I was looking for a way to leverage Github's Deployment API – which might be a separate feature request (and I'm considering working on it when time allows).

However, I'm wondering if exposing this plugin's underlying Github client might be a way to quickly address or try out things like this (now and in future) until there is an integrated solution. This way, people can leverage existing code regarding repository lookup, credential handling, etc...

Maybe I'm way off the mark – in which case I apologise – but intuitively this sounds quite useful.
What do you think?

@aaronjwhiteside
Copy link

I think this not too bad of an idea, it should be pretty simple to do... a single getter method.

The only drawback would be that all usage of the internal GitHub client would have to happen in @NonCPS annotated methods

@xsc
Copy link
Author

xsc commented Jul 17, 2018

The only drawback would be that all usage of the internal GitHub client would have to happen in @NonCPS annotated methods.

@aaronjwhiteside To address this, how about exposing GET, PUT, POST, DELETE methods with pre-bound credentials and API URL? Not as simple of a change, though.

@aaronjwhiteside
Copy link

It wouldn't make much difference as those too would have to be called from @NonCPS methods. Because those methods don't return anything that implements Serializable.

I can implement the ability to expose the underlying GitHub client fairly quickly and easily. But it also doesn't completely support the entire GitHub API. I had to extend a lot of the "services" to get the functionality I needed for this plugin.

And while people may be able to utilize it for things not currently covered by this plugin, we can work on implementing robust support for things like the Deployment API.

What do you think?

@xsc
Copy link
Author

xsc commented Jul 19, 2018

Sounds like a good approach!

@phibo23
Copy link

phibo23 commented Oct 10, 2019

Did you actually work on this? I was so hopeful when I saw this issue (because experimenting with the deployment api is also what I want to do) but then your conversation ended so abruptly 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants