Skip to content

Commit

Permalink
url with token
Browse files Browse the repository at this point in the history
  • Loading branch information
EvaMart committed Sep 10, 2024
1 parent 83813e5 commit 5ac8e70
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,11 @@ def webhooks(
'''
if payload.state == 'updated':
# Pull changes from the remote repository
GITHUB_TOKEN=os.getenv("GITHUB_TOKEN")
url_with_token = f'https://{GITHUB_TOKEN}@github.com/your-username/your-repo.git'
repo = Repo("./")
origin = repo.remotes.origin
origin.set_url(url_with_token)
origin.pull('main')

# Update the database
Expand Down

0 comments on commit 5ac8e70

Please sign in to comment.