Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
21aff96eee | |||
f4703cdc23 | |||
7980880191 | |||
4efcea62da | |||
580fc69c02 | |||
facb42d776 | |||
37fd4d3558 | |||
bc78d4cf02 | |||
91ff2766bf | |||
c216905beb |
@ -24,7 +24,7 @@ Create one [here](https://github.com/settings/tokens) and pass that as a secret
|
||||
|
||||
```yml
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v1.1.0
|
||||
uses: peter-evans/create-pull-request@v1.1.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
@ -60,7 +60,7 @@ Here is an example that sets all the environment variables.
|
||||
|
||||
```yml
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v1.1.0
|
||||
uses: peter-evans/create-pull-request@v1.1.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||
|
@ -15,6 +15,9 @@ def get_github_event(github_event_path):
|
||||
|
||||
|
||||
def ignore_event(github_event):
|
||||
if 'schedule' in github_event:
|
||||
print("Allow schedule event.")
|
||||
return False
|
||||
# Ignore push events on deleted branches
|
||||
# The event we want to ignore occurs when a PR is created but the repository owner decides
|
||||
# not to commit the changes. They close the PR and delete the branch. This creates a
|
||||
@ -39,8 +42,12 @@ def pr_branch_exists(repo, branch):
|
||||
|
||||
|
||||
def get_head_author(github_event):
|
||||
email = "{head_commit[author][email]}".format(**github_event)
|
||||
name = "{head_commit[author][name]}".format(**github_event)
|
||||
if 'schedule' in github_event:
|
||||
email = os.environ['GITHUB_ACTOR'] + '@users.noreply.github.com'
|
||||
name = os.environ['GITHUB_ACTOR']
|
||||
else:
|
||||
email = "{head_commit[author][email]}".format(**github_event)
|
||||
name = "{head_commit[author][name]}".format(**github_event)
|
||||
return email, name
|
||||
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
GitPython==3.0.0
|
||||
GitPython==3.0.2
|
||||
PyGithub==1.43.8
|
Reference in New Issue
Block a user