Compare commits

...

10 Commits

Author SHA1 Message Date
21aff96eee Fix author email and name for scheduled jobs 2019-09-12 16:03:46 +09:00
f4703cdc23 Update README 2019-09-10 18:06:54 +09:00
7980880191 Fix missing colon 2019-09-10 17:58:01 +09:00
4efcea62da Merge pull request #30 from stefanbuck/fix-29-scheduled-jobs
Do not break Action when using schedule jobs
2019-09-10 17:50:03 +09:00
580fc69c02 Fix scheduled events issue 2019-09-10 09:14:39 +02:00
facb42d776 Merge pull request #26 from peter-evans/renovate/gitpython-3.x
Update dependency GitPython to v3.0.2
2019-08-22 13:50:04 +09:00
37fd4d3558 Update dependency GitPython to v3.0.2 2019-08-22 04:38:51 +00:00
bc78d4cf02 Merge pull request #23 from peter-evans/renovate/gitpython-3.x
Update dependency GitPython to v3.0.1
2019-08-15 12:41:54 +09:00
91ff2766bf Update dependency GitPython to v3.0.1 2019-08-15 03:27:28 +00:00
c216905beb Update README 2019-08-13 19:07:24 +09:00
3 changed files with 12 additions and 5 deletions

View File

@ -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 }}

View File

@ -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

View File

@ -1,2 +1,2 @@
GitPython==3.0.0
GitPython==3.0.2
PyGithub==1.43.8