Skip to content

Conversation

@ajmalab
Copy link
Contributor

@ajmalab ajmalab commented May 8, 2024

Adding support for the /repos/{owner}/{repo}/dispatches endpoint that allows us to dispatch custom webhook events from repositories to trigger workflows. See more here: https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#create-a-repository-dispatch-event

ajmalab added 10 commits May 9, 2024 00:43
Signed-off-by: Ajmal Kottilingal <ajmal.kottilingal@transferwise.com>
Signed-off-by: Ajmal Kottilingal <ajmal.kottilingal@transferwise.com>
Signed-off-by: Ajmal Kottilingal <ajmal.kottilingal@transferwise.com>
Signed-off-by: Ajmal Kottilingal <ajmal.kottilingal@transferwise.com>
Signed-off-by: Ajmal Kottilingal <ajmal.kottilingal@transferwise.com>
Signed-off-by: Ajmal Kottilingal <ajmal.kottilingal@transferwise.com>
Signed-off-by: Ajmal Kottilingal <ajmal.kottilingal@transferwise.com>
Signed-off-by: Ajmal Kottilingal <ajmal.kottilingal@transferwise.com>
Signed-off-by: Ajmal Kottilingal <ajmal.kottilingal@transferwise.com>
Signed-off-by: Ajmal Kottilingal <ajmal.kottilingal@transferwise.com>
@ajmalab ajmalab marked this pull request as draft May 9, 2024 12:48
@ajmalab ajmalab marked this pull request as ready for review May 9, 2024 12:48
@ajmalab
Copy link
Contributor Author

ajmalab commented May 9, 2024

@felix-seifert or @Abhi347 perhaps for a review? 😄

Copy link
Contributor

@ebk45 ebk45 left a comment

Choose a reason for hiding this comment

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

Thanks for contributing! Code changes look good but we'd appreciate if any new endpoints have tests written for them where possible.

Copy link
Contributor

@Abhi347 Abhi347 left a comment

Choose a reason for hiding this comment

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

Same as @ebk45 mentioned! This needs tests

@ajmalab
Copy link
Contributor Author

ajmalab commented May 9, 2024

I did consider tests, but the response for that endpoint is always a 204 with no body (similar to the editComment and deleteComment methods). Unsure what I'd be testing (perhaps I can simply check for a 204 no body response?). Happy to take suggestions.

@ebk45
Copy link
Contributor

ebk45 commented May 10, 2024

I did consider tests, but the response for that endpoint is always a 204 with no body (similar to the editComment and deleteComment methods). Unsure what I'd be testing (perhaps I can simply check for a 204 no body response?). Happy to take suggestions.

Hi @ajmalab, yeah exactly. It's mostly for safety in case this code where to change. Even testing something as simple as a 204 response is still valuable. You'll see similar tests in RepositoryClientTest.java.

ajmalab added 2 commits May 10, 2024 14:53
Signed-off-by: Ajmal Kottilingal <ajmal.kottilingal@transferwise.com>
Signed-off-by: Ajmal Kottilingal <ajmal.kottilingal@transferwise.com>
@ajmalab
Copy link
Contributor Author

ajmalab commented May 10, 2024

@ebk45 @Abhi347 Added a test, please do let me know if you require further changes 😄

@ajmalab
Copy link
Contributor Author

ajmalab commented May 16, 2024

Could I get a review please 🙏 @ebk45 or @Abhi347 perhaps?

@ebk45 ebk45 merged commit 8a0fa55 into spotify:master Jun 13, 2024
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.

3 participants