Git Product home page Git Product logo

Comments (6)

czechboy0 avatar czechboy0 commented on June 2, 2024

Good point, right now Builda verifies access to the repository just by trying to read Pull Requests, which probably succeeded in your case. I guess I could try all the rights needed, by trying to create/delete a commit status and adding/deleting a comment on a PR. Or maybe there's a GitHub API call to verify rights of a token?

from buildasaur.

mdio avatar mdio commented on June 2, 2024

A few tests with the repos GET endpoint make me confident that the part with permissions is the key here. push (write) and pull (read) must be true in order to do everything Buildasaur does. Of course the requests need to be done with the token to reflect the permissions of the user which the token belongs to (but Buildasaur does that anyway).

"permissions": {
      "admin": false,
      "push": true,
      "pull": true
    }

from buildasaur.

czechboy0 avatar czechboy0 commented on June 2, 2024

@mdio 👍 Yeah that's it exactly. Feel free to send a pull request with the change if you want, it'd mean adding a method to GitHubServer called getRepository, creating a new entity Repository and then just changing the verification call in checkAvailabilityOfGitHubWithCurrentSettingsOfProject to use the permissions metadata to return whether Buildasaur has all the rights required. If not I'll tackle it in the next couple of days.

Thanks for taking the time to look up the API call!

from buildasaur.

mdio avatar mdio commented on June 2, 2024

I'm afraid that I won't be able to implement that today and due to tomorrow being a public holiday I won't start before monday.
Also I'm just learning Swift but thanks to your detailed idea it looks doable.

from buildasaur.

czechboy0 avatar czechboy0 commented on June 2, 2024

No problem, I'll take a look at it over the weekend.

from buildasaur.

czechboy0 avatar czechboy0 commented on June 2, 2024

Fixed in 6642a08. Let me know if this works for you, @mdio!

from buildasaur.

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.