mirror of
https://github.com/MaxenceG2M/github-release-notifier.git
synced 2025-12-08 22:03:24 +00:00
Fix: don't send mail if no news [task 2, status:done]
This commit is contained in:
@@ -37,6 +37,9 @@ I wrote this script really quickly, certainly faster than this README. So I alre
|
|||||||
* The script sends mail even if no new projets or release has been detected
|
* The script sends mail even if no new projets or release has been detected
|
||||||
* The biggest, you have to edit script to specify absolute path...
|
* The biggest, you have to edit script to specify absolute path...
|
||||||
* A lot of other little problems, like the code that's disgusting and so on.
|
* A lot of other little problems, like the code that's disgusting and so on.
|
||||||
|
|
||||||
|
For who's asking: yes, it's normal that I have put all code in one main function [like a blind gunner.](https://media.giphy.com/media/1yMexL5rkwYhuiVEmZ/giphy.gif). Really quickly I said!
|
||||||
|
|
||||||
But overall, the script works and sends mail!
|
But overall, the script works and sends mail!
|
||||||
|
|
||||||
Hey boy, what is the `pit.db` file?
|
Hey boy, what is the `pit.db` file?
|
||||||
|
|||||||
@@ -42,6 +42,10 @@ def main():
|
|||||||
new_releases.append(last_release)
|
new_releases.append(last_release)
|
||||||
parser.set('release', project, last_release['release_tag'])
|
parser.set('release', project, last_release['release_tag'])
|
||||||
|
|
||||||
|
if not new_releases and not new_projects:
|
||||||
|
print('No new projets or new release detected. Bye!')
|
||||||
|
return
|
||||||
|
|
||||||
content = ""
|
content = ""
|
||||||
|
|
||||||
for new_r in new_releases:
|
for new_r in new_releases:
|
||||||
|
|||||||
Reference in New Issue
Block a user