File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ lockComment: >
4040# - no-locking
4141# Limit to only `issues` or `pulls`
4242# only: issues
43+ # Add a label when locking. Set to `false` to disable
44+ # lockLabel: 'outdated'
4345```
4446
4547## How are issues and pull requests determined to be inactive?
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ module.exports = class Lock {
99
1010 async lock ( ) {
1111 const { owner, repo} = this . context . repo ( ) ;
12- const { lockComment} = this . config ;
12+ const { lockComment, lockLabel } = this . config ;
1313
1414 const issues = await this . getLockableIssues ( ) ;
1515 for ( const issue of issues ) {
@@ -23,6 +23,16 @@ module.exports = class Lock {
2323 body : lockComment
2424 } ) ;
2525 }
26+
27+ if ( lockLabel ) {
28+ this . logger . info ( `[${ issueUrl } ] Labeling` ) ;
29+ await this . context . github . issues . addLabels ( {
30+ owner,
31+ repo,
32+ number : issue . number ,
33+ labels : [ lockLabel ]
34+ } ) ;
35+ }
2636
2737 this . logger . info ( `[${ issueUrl } ] Locking` ) ;
2838 await this . context . github . issues . lock ( {
You can’t perform that action at this time.
0 commit comments