ci: update git notification scripts with email credentials
Some checks failed
Deploy RIT Freshers Hub to VPS / Deploy to Live VPS (push) Has been cancelled
Some checks failed
Deploy RIT Freshers Hub to VPS / Deploy to Live VPS (push) Has been cancelled
This commit is contained in:
@@ -1,9 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Configuration (or set in environment variables on VPS)
|
export SENDER_EMAIL="krishnaowoxd@gmail.com"
|
||||||
export SENDER_EMAIL="your-gmail-id@gmail.com"
|
export SENDER_PASSWORD="qkwy lwtc snlr pree"
|
||||||
export SENDER_PASSWORD="your-16-digit-app-password"
|
export RECIPIENT_EMAIL="krishnaowoxd@gmail.com"
|
||||||
export RECIPIENT_EMAIL="your-recipient-email@gmail.com"
|
|
||||||
|
|
||||||
while read oldrev newrev refname
|
while read oldrev newrev refname
|
||||||
do
|
do
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ from email.mime.multipart import MIMEMultipart
|
|||||||
# Load configuration from environment or fallback defaults
|
# Load configuration from environment or fallback defaults
|
||||||
SMTP_SERVER = os.environ.get("SMTP_SERVER", "smtp.gmail.com")
|
SMTP_SERVER = os.environ.get("SMTP_SERVER", "smtp.gmail.com")
|
||||||
SMTP_PORT = int(os.environ.get("SMTP_PORT", 587))
|
SMTP_PORT = int(os.environ.get("SMTP_PORT", 587))
|
||||||
SENDER_EMAIL = os.environ.get("SENDER_EMAIL", "YOUR_EMAIL@gmail.com")
|
SENDER_EMAIL = os.environ.get("SENDER_EMAIL", "krishnaowoxd@gmail.com")
|
||||||
SENDER_PASSWORD = os.environ.get("SENDER_PASSWORD", "YOUR_GMAIL_APP_PASSWORD")
|
SENDER_PASSWORD = os.environ.get("SENDER_PASSWORD", "qkwy lwtc snlr pree")
|
||||||
RECIPIENT_EMAIL = os.environ.get("RECIPIENT_EMAIL", "YOUR_EMAIL@gmail.com")
|
RECIPIENT_EMAIL = os.environ.get("RECIPIENT_EMAIL", "krishnaowoxd@gmail.com")
|
||||||
|
|
||||||
if len(sys.argv) < 7:
|
if len(sys.argv) < 7:
|
||||||
print("Usage: python send_git_email.py <branch> <author> <commit_hash> <timestamp> <message> <changed_files>")
|
print("Usage: python send_git_email.py <branch> <author> <commit_hash> <timestamp> <message> <changed_files>")
|
||||||
|
|||||||
Reference in New Issue
Block a user