File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -25,19 +25,19 @@ def main():
25
25
issue_number = int (re .findall (r'#(\d{1,5})' , pull_request_body )[0 ])
26
26
issue = repo .get_issue (issue_number )
27
27
issue_labels = issue .labels
28
- docathon_label_present = any (label .name == 'docathon-h2-2023 ' for label in issue_labels )
28
+ docathon_label_present = any (label .name == 'docathon-h1-2024 ' for label in issue_labels )
29
29
30
30
# if the issue has a docathon label, add all labels from the issue to the PR.
31
31
if not docathon_label_present :
32
- print ("The 'docathon-h2-2023 ' label is not present in the issue." )
32
+ print ("The 'docathon-h1-2024 ' label is not present in the issue." )
33
33
return
34
34
pull_request_labels = pull_request .get_labels ()
35
35
issue_label_names = [label .name for label in issue_labels ]
36
36
labels_to_add = [label for label in issue_label_names if label not in pull_request_labels ]
37
37
if not labels_to_add :
38
38
print ("The pull request already has the same labels." )
39
39
return
40
- pull_request .set_labels (* labels_to_add )
40
+ pull_request .add_to_labels (* labels_to_add )
41
41
print ("Labels added to the pull request!" )
42
42
43
43
Original file line number Diff line number Diff line change 7
7
jobs :
8
8
check-labels :
9
9
runs-on : ubuntu-latest
10
-
10
+ permissions :
11
+ issues : write
12
+ pull-requests : write
11
13
steps :
12
14
- name : Check if PR mentions an issue and get labels
13
15
uses : actions/checkout@v2
14
16
with :
15
- fetch-depth : 0
17
+ fetch-depth : 1
16
18
- name : Set up Python
17
19
uses : actions/setup-python@v2
18
20
with :
You can’t perform that action at this time.
0 commit comments