Code Monkey home page Code Monkey logo

Comments (6)

andriyun avatar andriyun commented on August 15, 2024 2

I understand your point now. It makes perfect sense.

I changed the PR in such a way, that it doesn't break the current API.
However, I couldn't run tests locally without fails. The fails I see look not relevant for changes I have added

from go-github.

gmlewis avatar gmlewis commented on August 15, 2024 1

It sounds like we need a new endpoint with an additional private struct which removes the omitempty from the existing CreateOrUpdateCustomRoleOptions struct, but is otherwise identical. We've done things like this in other places.
For example, here:

params := struct {
Properties []*CustomProperty `json:"properties"`
}{
Properties: properties,
}

@andriyun - would you like to make a PR to address this, or shall I open this up to other contributors to this repo?

from go-github.

andriyun avatar andriyun commented on August 15, 2024 1

I'll be glad to submit PR with changes to fix it :)

from go-github.

gmlewis avatar gmlewis commented on August 15, 2024

Thank you, @andriyun ! It's yours.

from go-github.

andriyun avatar andriyun commented on August 15, 2024

Hey @gmlewis
Sorry for late question. I didn't get your idea about creating new endpoint. I could neither find other cases you are referring too.
It's true at there are some similar constructions there with CreateOrUpdate****Options
However there are not used separate Create Update` methods.

I've added PR with changes #3235
Please take a look

from go-github.

gmlewis avatar gmlewis commented on August 15, 2024

So I was thinking that this could be achieved without breaking the current API by adding separate endpoint(s) that specifically handle the NoPermissions case, and internally uses modified structs where the omitempty has been removed from the permissions field.

Does that make sense?

I've looked at #3235 but was hoping to not break the current API, which that PR does.

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.