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

Support PubSubHubbub API for creating hooks #1265

Closed
tomasaschan opened this issue Aug 28, 2019 · 22 comments · Fixed by #2397
Closed

Support PubSubHubbub API for creating hooks #1265

tomasaschan opened this issue Aug 28, 2019 · 22 comments · Fixed by #2397

Comments

@tomasaschan
Copy link

Are there any plans to support the PubSubHubbub API for creating webhooks?

I could try to create a PR for implementing this (I'm hoping to use it for implementing https://github.com/terraform-providers/terraform-provider-github/issues/275) if there is any chance of it being accepted.

@gmlewis
Copy link
Collaborator

gmlewis commented Aug 28, 2019

Since it is a part of the GitHub Developer v3 API, it makes sense to me to support it in this repo.

If there are no objections from @willnorris or @gauntface then I say we move forward with a design and PR.

@tomasaschan
Copy link
Author

@gmlewis Great! Is there any design documents or similar that I should submit for review before starting to work on the actual code? (Also, are there any specific build instructions for this repo I should know about?)

@gmlewis
Copy link
Collaborator

gmlewis commented Aug 28, 2019

We have no formal design docs but you should definitely read through and be familiar with CONTRIBUTING.md.

It would be great if you could informally describe your design here in this issue including generally how you plan to implement the new feature and give other contributors and users an opportunity to comment before getting too deep into the PR.

@tomasaschan
Copy link
Author

All the infrastructure for handling authentication etc seems to already be handled, so I figure I can just look at how other API calls are handled, and mimic that. For example, the create webhook code seems simple enough to imitate.

To avoid cluttering up existing code, I figure I'll place it in a new file github/repos_pubsubhubbub.go (with unit tests next to it), and add the functions to the RepositoryService type.

Does that sound OK?

@gmlewis
Copy link
Collaborator

gmlewis commented Aug 29, 2019

That sounds like a great plan to me. Hopefully if others have any feedback they will respond to this thread earlier rather than later. 😂

@wesleimp
Copy link
Collaborator

wesleimp commented Dec 5, 2019

@gmlewis this issue can be closed

@gmlewis
Copy link
Collaborator

gmlewis commented Dec 5, 2019

It seems to me like this issue is still open, @wesleimp ... why do you say this one can be closed?

@wesleimp
Copy link
Collaborator

wesleimp commented Dec 5, 2019

@gmlewis you are correct, sorry my bad.

@gmlewis
Copy link
Collaborator

gmlewis commented Dec 5, 2019

No problem, @wesleimp ! Thank you for all your help! It is greatly appreciated!

@joshuabezaleel
Copy link
Contributor

Hi @gmlewis , I stumbled upon this issue while browsing the repo and I am interested if somehow this issue is still available 🙂

@gmlewis
Copy link
Collaborator

gmlewis commented May 26, 2020

Yes, since we have not heard from @tomasaschan since last August, I think we can safely assume that this issue is available.

Thank you, @joshuabezaleel ! I'll assign it to you.

@joshuabezaleel
Copy link
Contributor

joshuabezaleel commented May 26, 2020

Hi @gmlewis , is it okay if I ask a particular technical question here?

For DeleteHook testing, does it mean that we don't have to check whether the statusCode of the response is 204 or not?
I tried to issue the PubSubHubBub request using curl and it returns 204 with proper parameters and 422 with invalid parameters but I kept getting 200 while firing it in the testing part of the code.

Thank you very much in advance! 🙂

@gmlewis
Copy link
Collaborator

gmlewis commented May 26, 2020

If I understand correctly, you are asking about the unit test... Correct, you don't need to fake (or test) the 204 explicitly... it is sufficient to just fake/test the 200. You can modify the test if you wish, but the unit tests are mainly concerned with getting the full round-trip exercised, and the 200 is sufficient.

Thank you, @joshuabezaleel !

@joshuabezaleel
Copy link
Contributor

Hi @gmlewis , I was actually thinking of this since the resp.statusCode would be different if I leave some required parameter empty, that is hub.mode and hub.topic, or not so I don't know whether I should cover this for the test.

I've put up a PR and I think the code is still not good enough and really subject to change. Sorry for the troublesome in advance. Looking forward to the review! 🙂

@gmlewis
Copy link
Collaborator

gmlewis commented Aug 6, 2021

This would be a great PR for any new contributor to this repo or a new Go developer.
All contributions are greatly appreciated!

Feel free to volunteer for any issue and the issue can be assigned to you so that others don't attempt to duplicate the work.

Please check out our CONTRIBUTING.md guide to get started. (In particular, please remember to go generate ./... and don't use force-push to your PRs.)

Thank you!

@hemachandarv
Copy link
Contributor

@gmlewis I saw that there was a closed PR (#1540) related to this issue. Can I take this up?

@gmlewis
Copy link
Collaborator

gmlewis commented Sep 2, 2021

@gmlewis I saw that there was a closed PR (#1540) related to this issue. Can I take this up?

Thanks, @hemachandarv , but let's see how #625 goes before you also attempt to tackle this one.
We'll leave this one open so someone else can take it while you work on the other one.
Then, if this is still available when you are done with the other, we can assign it to you.

@hemachandarv
Copy link
Contributor

Sounds like a plan. Thanks, @gmlewis

@hemachandarv
Copy link
Contributor

@gmlewis As #625 is about to be closed, can I take this up?

@gmlewis
Copy link
Collaborator

gmlewis commented Sep 13, 2021

@gmlewis As #625 is about to be closed, can I take this up?

Sure, @hemachandarv , it is yours. Thank you!

@amarlearning
Copy link

@gmlewis I believe good-first-issue should be kept for people who are contributing for the first time to this project.

Since there are not many good-first-issue, I believe such issues should be reserved for new contributors and someone who has already solved one good-first-issue should look for other issues.

Please correct me if I am wrong 😄

@gmlewis
Copy link
Collaborator

gmlewis commented Oct 26, 2021

@amarlearning - I have no problem with any contributor to work on any issue in this repo. We are not reserving any issues for any categories of developers and really enjoy getting down to zero net issues. These labels are an attempt to be helpful but are not strict guidelines.

So please feel free to contribute to any issues that you feel you can resolve.

Thank you!

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