Rename token variable
This commit is contained in:
parent
c3029959a5
commit
964fc3cdf1
2 changed files with 4 additions and 4 deletions
2
.github/workflows/push.yml
vendored
2
.github/workflows/push.yml
vendored
|
@ -13,7 +13,7 @@ jobs:
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: ./
|
uses: ./
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
|
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||||
COMMIT_MESSAGE: Add report file
|
COMMIT_MESSAGE: Add report file
|
||||||
PULL_REQUEST_BODY: This PR is auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request).
|
PULL_REQUEST_BODY: This PR is auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request).
|
||||||
PULL_REQUEST_BRANCH: test-patches
|
PULL_REQUEST_BRANCH: test-patches
|
||||||
|
|
|
@ -70,7 +70,7 @@ def create_pull_request(token, repo, head, base, title, body):
|
||||||
|
|
||||||
def process_event(github_event, repo, branch, base):
|
def process_event(github_event, repo, branch, base):
|
||||||
# Fetch required environment variables
|
# Fetch required environment variables
|
||||||
github_token = os.environ['GITHUB_TOKEN']
|
repo_access_token = os.environ['REPO_ACCESS_TOKEN']
|
||||||
github_repository = os.environ['GITHUB_REPOSITORY']
|
github_repository = os.environ['GITHUB_REPOSITORY']
|
||||||
# Fetch remaining optional environment variables
|
# Fetch remaining optional environment variables
|
||||||
commit_message = os.getenv(
|
commit_message = os.getenv(
|
||||||
|
@ -88,7 +88,7 @@ def process_event(github_event, repo, branch, base):
|
||||||
# Set git configuration
|
# Set git configuration
|
||||||
set_git_config(repo.git, author_email, author_name)
|
set_git_config(repo.git, author_email, author_name)
|
||||||
# Update URL for the 'origin' remote
|
# 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
|
# Commit the repository changes
|
||||||
print("Committing changes.")
|
print("Committing changes.")
|
||||||
|
@ -98,7 +98,7 @@ def process_event(github_event, repo, branch, base):
|
||||||
# Create the pull request
|
# Create the pull request
|
||||||
print("Creating a request to pull %s into %s." % (branch, base))
|
print("Creating a request to pull %s into %s." % (branch, base))
|
||||||
pull_request = create_pull_request(
|
pull_request = create_pull_request(
|
||||||
github_token,
|
repo_access_token,
|
||||||
github_repository,
|
github_repository,
|
||||||
branch,
|
branch,
|
||||||
base,
|
base,
|
||||||
|
|
Loading…
Reference in a new issue