File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ def get_github_event(github_event_path):
15
15
16
16
17
17
def ignore_event (github_event ):
18
+ if 'schedule' in github_event :
19
+ print ("Allow schedule event." )
20
+ return False
21
+
18
22
# Ignore push events on deleted branches
19
23
# The event we want to ignore occurs when a PR is created but the repository owner decides
20
24
# not to commit the changes. They close the PR and delete the branch. This creates a
@@ -39,8 +43,12 @@ def pr_branch_exists(repo, branch):
39
43
40
44
41
45
def get_head_author (github_event ):
42
- email = "{head_commit[author][email]}" .format (** github_event )
43
- name = "{head_commit[author][name]}" .format (** github_event )
46
+ if 'schedule' in github_event :
47
+ email = os .environ ['GITHUB_ACTOR' ]
48
+ name = os .environ ['GITHUB_ACTOR' ] + '@users.noreply.github.com'
49
+ else
50
+ email = "{head_commit[author][email]}" .format (** github_event )
51
+ name = "{head_commit[author][name]}" .format (** github_event )
44
52
return email , name
45
53
46
54
You can’t perform that action at this time.
0 commit comments