-
Notifications
You must be signed in to change notification settings - Fork 5
update notes on script update with timestamp #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
2ad35a6
6437188
1f01ac6
c8d154b
93c3cba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| action/test | ||
| .env | ||
| .DS_Store | ||
| *.code-workspace | ||
| *.code-workspace | ||
| __pycache__ |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -7,6 +7,7 @@ | |||||||||||||||||||||||||||||||||
| import jmespath | ||||||||||||||||||||||||||||||||||
| import hashlib | ||||||||||||||||||||||||||||||||||
| import sys | ||||||||||||||||||||||||||||||||||
| from datetime import datetime | ||||||||||||||||||||||||||||||||||
| from loguru import logger | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| logger.remove() | ||||||||||||||||||||||||||||||||||
|
|
@@ -207,6 +208,59 @@ def compare_scripts(new, old): | |||||||||||||||||||||||||||||||||
| return False | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| #function to create a creation note with timestamp | ||||||||||||||||||||||||||||||||||
| @logger.catch | ||||||||||||||||||||||||||||||||||
| def create_creation_note(): | ||||||||||||||||||||||||||||||||||
| timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S UTC") | ||||||||||||||||||||||||||||||||||
| return f"created via github action on {timestamp}" | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| #function to create or update notes with proper timestamping | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
| #function to create or update notes with proper timestamping | |
| # Function to create or update notes with proper timestamping. |
Copilot
AI
Jul 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The timestamp format includes 'UTC' but datetime.now() returns local time, not UTC time. Use datetime.now(timezone.utc) or datetime.utcnow() to get actual UTC time.
| timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S UTC") | |
| return f"created via github action on {timestamp}" | |
| #function to create or update notes with proper timestamping | |
| @logger.catch | |
| def update_script_notes(existing_notes, action_type="updated"): | |
| timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S UTC") | |
| timestamp = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M:%S UTC") | |
| return f"created via github action on {timestamp}" | |
| #function to create or update notes with proper timestamping | |
| @logger.catch | |
| def update_script_notes(existing_notes, action_type="updated"): | |
| timestamp = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M:%S UTC") |
Copilot
AI
Jul 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment should start with a capital letter and end with a period: 'Retrieves list of files given a folder path and the list of valid file extensions to look for.'
| #retrieves list of files given a folder path and the list of valid file extensions to look for | |
| # Retrieves list of files given a folder path and the list of valid file extensions to look for. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment should start with a capital letter and end with a period: 'Function to create a creation note with timestamp.'