Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nock for probot config requires extra mocks for 404s #68

Closed
chingor13 opened this issue Sep 13, 2019 · 2 comments
Closed

nock for probot config requires extra mocks for 404s #68

chingor13 opened this issue Sep 13, 2019 · 2 comments
Assignees
Labels
type: cleanup An internal cleanup or hygiene concern.

Comments

@chingor13
Copy link
Contributor

When mocking a 404 for context.config('filename'), we need to do something like:

      const requests = nock('https://api.github.com')
        .get(
          '/repos/<owner>/<repo>/contents/.github/release-please.yml'
        )
        .reply(404)
        .get(
          // why is this necessary?
          '/repos/<owner>/.github/contents/.github/release-please.yml'
        )
        .reply(404);
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Sep 14, 2019
@bcoe bcoe added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. needs work This is a pull request that needs a little love. and removed triage me I really want to be triaged. labels Sep 16, 2019
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. and removed 🚨 This issue needs some love. labels Mar 5, 2020
@bcoe
Copy link
Contributor

bcoe commented Mar 10, 2020

👋 I ultimately figured out why this is, it's actually probot behaving as expected.

It checks a .github folder in your existing repository, and if not found, checks for a .github repository in your organization (which can be used to store central config for a bot).

@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Mar 11, 2020
@JustinBeckwith JustinBeckwith added type: cleanup An internal cleanup or hygiene concern. and removed 🚨 This issue needs some love. needs work This is a pull request that needs a little love. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Mar 11, 2020
@bcoe
Copy link
Contributor

bcoe commented Mar 11, 2020

I'm actually going to go ahead and close this, as I think that it's behaving as expected (it just took us a while to notice that probot checks two repos for config).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

4 participants