Giter VIP home page Giter VIP logo

Comments (11)

gr2m avatar gr2m commented on August 29, 2024 1

Just to add some additional context: the original motivation for this repository was to create universal fixtures for GitHub SDKs, a shared resources that official and community maintainers wouldn't need to maintain on themselves.

I also thought it would be great to have community contributions/collaboration, but it didn't pan out. My idea was that as GitHub, we can record scenarios across different GitHub versions, like GHEC and GHES, which integrators don't have easy access to.

Longer term I was thinking we could make share fixture recording infrastructure to record scenarios specific to your app or action, including a way to keep these fixtures up-to-date with latest changes from GitHub's API. Because the biggest problem with fixtures is that they get out of date, that's the problem I was trying to solve.

Once we have that recording infrastructure and integrators start using it, we could also invite them to their scenarios with our central repository, at least for common scenarios, that would help us to make sure that our SDKs don't break if future API changes occur.

from fixtures.

github-actions avatar github-actions commented on August 29, 2024

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

from fixtures.

wolfy1339 avatar wolfy1339 commented on August 29, 2024

The recording script, should be run from the CLI.

The fixtures themselves, they can be used and imported from your code

from fixtures.

oliversalzburg avatar oliversalzburg commented on August 29, 2024

That doesn't clarify anything 😄

The scenarios in this repository do not cover all cases that I might need to cover. So that leads me to believe that I should author my own scenarios. But I don't see how that would be possible with this module.

from fixtures.

wolfy1339 avatar wolfy1339 commented on August 29, 2024

The bin/ directory is meant for dev environments.

You clone the repo to add scenarios. You don't need it in your monorepo.

To use the scenarios, you simply require the package from npm

from fixtures.

oliversalzburg avatar oliversalzburg commented on August 29, 2024

I can see that this is going nowhere. Thanks for trying.

from fixtures.

wolfy1339 avatar wolfy1339 commented on August 29, 2024

Is it possible for you to share how you would like to consume the package?

What changes would be made?
Maybe if you could try to prepare a proof of concept of the changes that you would like to see, we can see about making the changes here. Any features/fixes are welcome

I've been describing how this package works, I'm not trying to be dismissive of your needs

from fixtures.

oliversalzburg avatar oliversalzburg commented on August 29, 2024

I got you, I just felt like I'm definitely on the wrong track.

Regardless, I assumed this module should help people with developing GitHub Actions. I assumed that you would import it in your project and then build scenarios based on the use case of your action.

I feel like this is also exactly what this module is intended to do, just only for a specific set of scenarios. I assume this set of scenarios is the one that is used by official GitHub published Actions. When third-parties, like myself, try to use this module to author their own scenarios, to cover test cases of their actions, it's not really clear how to accomplish that, if it is even intended/supported.

Sorry if I'm missing a bigger picture here, but I still think my solution might lie elsewhere 😄

from fixtures.

wolfy1339 avatar wolfy1339 commented on August 29, 2024

This is for recording requests/responses for the GitHub REST API, it could help with Actions, though I am not sure

from fixtures.

oliversalzburg avatar oliversalzburg commented on August 29, 2024

I understand that this goes further than just GitHub Actions, but it could certainly be one use case.

In general, if you want to write tests for GitHub API interactions, you're usually left with mocking the GitHub API with nock or something similar yourself. When I found this package, it seemed like a much more convenient alternative to rolling your own mocks. However, it seems unclear on how to use this package in your own project and extend it with your own scenarios.

It seemed like this package could be imported in your own code, and be used to record your own API interactions, so that you can utilize the resulting mocks to test your code.

from fixtures.

nathanielks avatar nathanielks commented on August 29, 2024

Echoing @oliversalzburg here: when I first saw this package and was reading through it, I thought it was for users to be able to mock their interactions with GitHub. Big +1 here if y'all decide to pursue that functionality further!

from fixtures.

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.