Couldn't retrieve the config file specified - HttpError: Not Found
EliasSalom opened this issue · comments
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/pr-title-checker@v1.3.4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: false
configuration_path: "./pr-title-checker-config.json"
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.
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
Are you sure you're using configuration_path: ".github/workflows/pr-title-checker-config.json"
? Is this a public repository you're working on?
Thanks, please check your pr-title-checker.yml file. Update it to contain configuration_path: ".github/workflows/pr-title-checker-config.json"
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.
you check the develop, please check the PR
https://github.com/Fullstack-Alfanar/github-action-test/blob/feat/new-feat/.github/workflows/pr-title-checker.yml
this one
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 :)
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"
So we need to merge the json
file before we can run the CI? So we cannot test before merge the json, correct?
Thanks!