mirror of
https://forgejo.stefka.eu/jiriks74/create-pull-request.git
synced 2025-01-18 16:01:06 +01:00
Rename token variable
This commit is contained in:
parent
c3029959a5
commit
964fc3cdf1
2 changed files with 4 additions and 4 deletions
|
@ -70,7 +70,7 @@ def create_pull_request(token, repo, head, base, title, body):
|
|||
|
||||
def process_event(github_event, repo, branch, base):
|
||||
# Fetch required environment variables
|
||||
github_token = os.environ['GITHUB_TOKEN']
|
||||
repo_access_token = os.environ['REPO_ACCESS_TOKEN']
|
||||
github_repository = os.environ['GITHUB_REPOSITORY']
|
||||
# Fetch remaining optional environment variables
|
||||
commit_message = os.getenv(
|
||||
|
@ -88,7 +88,7 @@ def process_event(github_event, repo, branch, base):
|
|||
# Set git configuration
|
||||
set_git_config(repo.git, author_email, author_name)
|
||||
# Update URL for the 'origin' remote
|
||||
set_git_remote_url(repo.git, github_token, github_repository)
|
||||
set_git_remote_url(repo.git, repo_access_token, github_repository)
|
||||
|
||||
# Commit the repository changes
|
||||
print("Committing changes.")
|
||||
|
@ -98,7 +98,7 @@ def process_event(github_event, repo, branch, base):
|
|||
# Create the pull request
|
||||
print("Creating a request to pull %s into %s." % (branch, base))
|
||||
pull_request = create_pull_request(
|
||||
github_token,
|
||||
repo_access_token,
|
||||
github_repository,
|
||||
branch,
|
||||
base,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue