Skip to content

Commit

Permalink
issue #26: pass username has a env var
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasCardin committed Nov 1, 2024
1 parent c13b214 commit 89c06f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
install_requires=[
'requests'
'requests',
'jinja2',
'PyGithub',
'python-dotenv'
],
)
10 changes: 1 addition & 9 deletions webtop-template/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,11 @@ def create_github_pr(username, gh_access_token):

print(f"Pull request created: {pr.html_url}")

def send_email(username, email, password):

print(f"Email sent successfully to: {email}")


if __name__ == '__main__':
load_dotenv()

gh_access_token = os.getenv("GITHUB_ACCESS_TOKEN")
username = os.getenv("USERNAME")
email = os.getenv("EMAIL")
password = os.getenv("PASSWORD")

render_template(username)
create_github_pr(username, gh_access_token)
send_email(username, email, password)
create_github_pr(username, gh_access_token)

0 comments on commit 89c06f2

Please sign in to comment.