File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,13 @@ export async function run() {
22
22
console . log ( "Could not get pull request number from context, exiting" ) ;
23
23
return ;
24
24
}
25
+ const actor = getActor ( ) ;
25
26
/* TODO
26
27
*
27
28
* [Assigns labels based on branch names](https://github.com/actions/labeler/pull/203/files)
28
29
* [Assign label based on status](https://github.com/actions/labeler/pull/79/files)
29
30
*
30
- * - [ ] if list is nonempty, get actor https://github.com/actions/toolkit/blob/main/packages/github/src/context.ts#L17
31
+ * - [x] get actor https://github.com/actions/toolkit/blob/main/packages/github/src/context.ts#L17
31
32
* - [ ] find actor in list of provided actors
32
33
* - [ ] if found, add label(s)
33
34
* - [ ] if not found, do nothing
@@ -81,6 +82,15 @@ function getPrNumber(): number | undefined {
81
82
return pullRequest . number ;
82
83
}
83
84
85
+ function getActor ( ) : string [ ] {
86
+ const actor = github . context . actor ;
87
+ if ( ! actor ) {
88
+ return undefined ;
89
+ }
90
+
91
+ return actor ;
92
+ }
93
+
84
94
async function getChangedFiles (
85
95
client : ClientType ,
86
96
prNumber : number
You can’t perform that action at this time.
0 commit comments