File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -41,14 +41,18 @@ jobs:
4141 return;
4242 }
4343
44- await github.request('GET /repos/{owner}/{repo}/code-scanning/alerts', {
45- ...context.repo,
46- }).catch(error => {
47- if (error.status === 403) {
48- throw new Error('Advanced Security needs to be enabled on this repository.');
49- }
50- });
51- core.info('Advanced Security is enabled on this repository.');
44+ try {
45+ await github.request('GET /repos/{owner}/{repo}/code-scanning/alerts', {
46+ ...context.repo,
47+ }).catch(err => {
48+ if (err.status === 403) {
49+ throw new Error('Advanced Security needs to be enabled on this repository.');
50+ }
51+ });
52+ core.info('Advanced Security is enabled on this repository.');
53+ } catch (err) {
54+ core.setFailed(err.message);
55+ }
5256 -
5357 name : Setup uv
5458 if : ${{ env.HAS_WORKFLOWS }}
You can’t perform that action at this time.
0 commit comments