-
Notifications
You must be signed in to change notification settings - Fork 430
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
HttpError: Not Found when run with new yml config #6
Comments
I also face the same issue. Here is the workflow where labeler fails: name: Foo workflow
on:
pull_request:
branches:
- master
paths:
- environments/dev/*
- modules/*
jobs:
pr_labeler:
name: PR Labeler
runs-on: ubuntu-18.04
steps:
- name: Set PR label
if: github.event.action == 'opened' || github.event.action == 'synchronize'
uses: actions/labeler@v2.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }} Bellow are the job logs:
|
It does resolve to |
Fixes actions#6 When fetching the configuration content from the file specified by `configuration-path`, we should load the content from the ref of the PR. By default, `repos.getContents` will [use the repository's default branch][1] if no `ref` is specified. When first configuring this action, assuming the configuration file is added in the same PR as the action, the configuration file will not exist on the default branch. This causes an `HttpError: Not Found` to occur when attempting to load the configuration from the default branch. This commit updates the call to `getContents` to add the `ref` parameter, set to the `GITHUB_SHA` value from the context. This will cause the action to load the contents of the configuration file from the ref of the PR, rather than the default branch. --- This PR also updates the packages to use version 1.0.0 of all the toolkit action packages, as they were using local files before. I noticed that `src/main.ts` is not formatted according to the prettier rules. I'm happy to open another PR that applies prettier to the current source. I had to disable prettier during implementation of this commit in order to keep the changes relevant to this PR. [1]: https://developer.github.com/v3/repos/contents/#get-contents
I'm encountering this issue too; I've validated the |
* Fetch configuration content from PR ref Fixes #6 When fetching the configuration content from the file specified by `configuration-path`, we should load the content from the ref of the PR. By default, `repos.getContents` will [use the repository's default branch][1] if no `ref` is specified. When first configuring this action, assuming the configuration file is added in the same PR as the action, the configuration file will not exist on the default branch. This causes an `HttpError: Not Found` to occur when attempting to load the configuration from the default branch. This commit updates the call to `getContents` to add the `ref` parameter, set to the `GITHUB_SHA` value from the context. This will cause the action to load the contents of the configuration file from the ref of the PR, rather than the default branch. --- This PR also updates the packages to use version 1.0.0 of all the toolkit action packages, as they were using local files before. I noticed that `src/main.ts` is not formatted according to the prettier rules. I'm happy to open another PR that applies prettier to the current source. I had to disable prettier during implementation of this commit in order to keep the changes relevant to this PR. [1]: https://developer.github.com/v3/repos/contents/#get-contents * Remove exec, io, tool-cache
I also continue to get this issue using the default configuration
|
Check the usage here - https://github.com/actions/labeler#usage. Basically, you need to have the file |
My issue was that I wrote |
I tried to use the labeler with the new YML syntax and it seems there is an issue on how the labeler is published. I always get the following msg.
I tested the
v2
andv2.0.0
releasesThe text was updated successfully, but these errors were encountered: