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

Couldn't retrieve the config file specified - HttpError: Not Found #26

Closed
EliasSalom opened this issue Jul 13, 2022 · 12 comments
Closed

Comments

@EliasSalom
Copy link

i have been trying to use this tool but I receive this issue all the time
this is my JSON file

{
    "LABEL": {
      "name": "title needs formatting",
      "color": "EEEEEE"
    },
    "CHECKS": {
      "prefixes": ["fix: ", "feat: ", "docs: ", "chore: ", "style: ", "refactor: ", "perf: ", "test: ", "revert: "],
      "regexp": "docs\\(v[0-9]\\): ",
      "regexpFlags": "i",
      "ignoreLabels" : ["dont-check-PRs-with-this-label", "meta"]
    },
    "MESSAGES": {
      "success": "All OK",
      "failure": "Please fix the following issues:",
      "notice": ""
    }
  }

and this is my yml file

name: "PR Title Checker"
on:
  pull_request_target:
    types:
      - opened
      - edited
      - synchronize
      - labeled
      - unlabeled

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: thehanimo/[email protected]
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          pass_on_octokit_error: false
          configuration_path: "./pr-title-checker-config.json"
@thehanimo
Copy link
Owner

Can you try using the absolute path? Something like .github/pr-title-checker-config.json assuming the json file is stored in the .github folder of your repo.

@EliasSalom
Copy link
Author

EliasSalom commented Jul 13, 2022

my root is like that's, .github/workflows/pr-title-checker-config.json

and I have tried like your example and I get the same result

@EliasSalom
Copy link
Author

Screen Shot 2022-07-13 at 6 23 13 PM

@thehanimo
Copy link
Owner

Are you sure you're using configuration_path: ".github/workflows/pr-title-checker-config.json"? Is this a public repository you're working on?

@EliasSalom
Copy link
Author

@thehanimo
Copy link
Owner

Thanks, please check your pr-title-checker.yml file. Update it to contain configuration_path: ".github/workflows/pr-title-checker-config.json"

@thehanimo
Copy link
Owner

thehanimo commented Jul 13, 2022

Although you have updated it in your non-default branches, the yml file for the workflow is taken from your default branch, which still contains the old configuration path. You'll have to update this field in your default branch.

@EliasSalom
Copy link
Author

@thehanimo
Copy link
Owner

Although you have updated it in your non-default branches, the yml file for the workflow is taken from your default branch, which still contains the old configuration path. You'll have to update this field in your default branch.

Hope this helps :)

@EliasSalom
Copy link
Author

yes sir it's work now, please mention this on the README
I think there are a lot of developers who will fall in this!
and also put they need to put all the following root-like configuration_path: ".github/workflows/pr-title-checker-config.json"

@Canato
Copy link

Canato commented Aug 22, 2022

So we need to merge the json file before we can run the CI? So we cannot test before merge the json, correct?

Thanks!

@thehanimo
Copy link
Owner

That is correct yes.

Also, you might wanna look at #28. Once we get url support, you could always update the file at the given url and not worry about merging branches and stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants