Skip to content

Commit

Permalink
changes from cr
Browse files Browse the repository at this point in the history
Co-authored-by: AndreiLobanovich <andreilobanovich@github.com>
  • Loading branch information
Gornoka and AndreiLobanovich committed Jun 28, 2023
1 parent 9a97d5a commit cc660a6
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/labeler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,12 @@ async function getLabelGlobs(
let configurationContent: string;
try {
configurationContent = await fetchContent(client, configurationPath);
} catch (e) {
console.error(e + ' with type ' + typeof e);
// ignoring error type as I can not import it without changing dependencies
// all HTTP errors thrown should have the property "name"
// @ts-ignore
} catch (e: any) {
if (e.name == 'HttpError' || e.name == 'NotFound') {
console.error(
'config not found at ' +
configurationPath +
' make sure it exists and that this action has the correct access rights'
core.warning(
`The config file was not found at ${configurationPath}. Make sure it exists and that this action has the correct access rights.`
);
}

throw e;
}

Expand Down

0 comments on commit cc660a6

Please sign in to comment.