inspirezonetech / inspirezonetech/TeachMePythonLikeIm5

GitHub action execute-modified-python-file.yml will not run when a new file is created and added to repo

Open
#99 4 comments 0 reactions 0 assignees View on GitHub
bug github-actions hacktoberfest help wanted
Dominant language
Python
Stars
29
Forks
41
PR merge metrics
No merged PRs in 30d

Description

**About Bug or problem**
The GitHub action to execute python file will not run when a file is created rather than modified.
This is because the action is designed only to check files that were **modified** and so will ignore files that are new to the repo.

**Steps to reproduce**
Create a brand new python file and add to the repo. The GitHub action will not see any files as being modified and will print:
```
Run echo "job: running script to execute modified file:"
job: running script to execute modified file:
run-sh: Inside run-modified-python.sh
run-sh: Content of files_modified.json: []
run-sh: After parsing, file to execute:
run-sh: File modified is not a python file! Will not execute
job: Done
```

**Potential fix**
Modify action `execute-modified-python-file.yml` to detect when new files are added to the repo and execute them.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.