GithubHelp home page GithubHelp logo

Comments (5)

gmlewis avatar gmlewis commented on June 2, 2024 1

Hmmm... excellent point. From the official docs, I don't see any reason why we shouldn't switch Config over to *HookConfig and have a breaking API change.

You might also want to provide a godoc comment for the InsecureSSL field since the warnings in the official docs look pretty serious.

Would you like to make a PR, @himazawa, or shall I open this issue up to other contributors?

from go-github.

gmlewis avatar gmlewis commented on June 2, 2024 1

Looking now at your six links, no, we will not be aggregating all the functions into one, as that goes against the overall philosophy of this repo. This repo provides methods for each endpoint, and each of those links have different endpoints and/or HTTP methods, so they are all unique and will remain distinct. Thanks for asking.

Sorry for not looking at your links before responding earlier - that was my bad.

from go-github.

himazawa avatar himazawa commented on June 2, 2024

On it.

I also noticed that:

https://github.com/google/go-github/blob/master/github/apps_hooks.go#L18
https://github.com/google/go-github/blob/master/github/orgs_hooks_configuration.go#L18
https://github.com/google/go-github/blob/master/github/repos_hooks_configuration.go#L18

and

https://github.com/google/go-github/blob/master/github/apps_hooks.go#L39
https://github.com/google/go-github/blob/master/github/orgs_hooks_configuration.go#L39
https://github.com/google/go-github/blob/master/github/repos_hooks_configuration.go#L39

are basically the same code. Do you want to create two generic function for them?

from go-github.

gmlewis avatar gmlewis commented on June 2, 2024

Do you want to create two generic function for them?

I'm this repo, we have consciously tried to always support the most recent two minor versions of the Go compiler, and now with the release of Go 1.22.0 I think it is now safe to say that Go generics are a welcome addition!

Later tonight I will try to update the maintenance scripts and GitHub Action workflow scripts to support versions 1.21.x and 1.22.x of the Go compiler.
After that gets merged, we should be able to accept PRs with generics.

🎉

from go-github.

himazawa avatar himazawa commented on June 2, 2024

Wait, I was not talking about "generic" in that way. There is no need for them in this specific case, but we can use a a common function for all of them.
The real question is: is it ok if we aggregate this 3 functions into one?

from go-github.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.