Skip to content

Commit

Permalink
Verificação de permissão de acesso às secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
afsmaira authored Apr 3, 2024
1 parent a5391db commit 45ff257
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/grade.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ def main():
print('Variable PROF_GITHUB not defined')
return

if '***' in URL:
print('The grader has no permition to see your secrets')
return

URI = URL.replace('https://github.com/', '')
CONTENTS = f"https://api.github.com/repos/{URI}/contents/"

Expand All @@ -51,7 +55,7 @@ def main():
js = requests.get(CONTENTS).json()
if isinstance(js, (str, bytes)):
return

PROF_TASKS = [f['name'] for f in js if f['type'] == 'dir']
COMMIT_TASKS = [file.split('/')[0] for file in COMMIT_FILES]
if len(PROF_TASKS) == 0:
Expand Down

0 comments on commit 45ff257

Please sign in to comment.