You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-2
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,8 @@ Create a `lock.yml` workflow file in the `.github/workflows` directory,
23
23
use one of the [example workflows](#examples) to get started.
24
24
25
25
### Inputs
26
+
27
+
<!-- prettier-ignore -->
26
28
The action can be configured using [input parameters](https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepswith).
27
29
All parameters are optional, except `github-token`.
28
30
@@ -80,6 +82,7 @@ All parameters are optional, except `github-token`.
80
82
81
83
### Outputs
82
84
85
+
<!-- prettier-ignore -->
83
86
-**`issues`**
84
87
- Issues that have been locked, value is a JSON string in the form
85
88
of `[{"owner": "actions", "repo": "toolkit", "issue_number": 1}]`
@@ -94,15 +97,20 @@ All parameters are optional, except `github-token`.
94
97
The following workflow will search once an hour for closed issues
95
98
and pull requests that can be locked.
96
99
100
+
<!-- prettier-ignore -->
97
101
```yaml
98
102
name: 'Lock Threads'
99
103
100
104
on:
101
105
schedule:
102
106
- cron: '0 * * * *'
103
107
108
+
permissions:
109
+
issues: write
110
+
pull-requests: write
111
+
104
112
jobs:
105
-
lock:
113
+
action:
106
114
runs-on: ubuntu-latest
107
115
steps:
108
116
- uses: dessant/lock-threads@v2
@@ -114,6 +122,7 @@ Edit the workflow after the initial backlog of issues and pull requests
114
122
has been processed to reduce the frequency of scheduled runs.
115
123
Running the workflow only once a day helps reduce resource usage.
116
124
125
+
<!-- prettier-ignore -->
117
126
```yaml
118
127
on:
119
128
schedule:
@@ -126,15 +135,20 @@ This workflow declares all the available input parameters of the action
126
135
and their default values. Any of the parameters can be omitted,
127
136
except `github-token`.
128
137
138
+
<!-- prettier-ignore -->
129
139
```yaml
130
140
name: 'Lock Threads'
131
141
132
142
on:
133
143
schedule:
134
144
- cron: '0 0 * * *'
135
145
146
+
permissions:
147
+
issues: write
148
+
pull-requests: write
149
+
136
150
jobs:
137
-
lock:
151
+
action:
138
152
runs-on: ubuntu-latest
139
153
steps:
140
154
- uses: dessant/lock-threads@v2
@@ -160,6 +174,7 @@ jobs:
160
174
This step will lock only issues, and exclude issues created before 2018,
161
175
or those with the `upstream` or `help-wanted` labels applied.
162
176
177
+
<!-- prettier-ignore -->
163
178
```yaml
164
179
steps:
165
180
- uses: dessant/lock-threads@v2
@@ -173,6 +188,7 @@ or those with the `upstream` or `help-wanted` labels applied.
173
188
This step will lock only pull requests, and exclude those
174
189
with the `wip` label applied.
175
190
191
+
<!-- prettier-ignore -->
176
192
```yaml
177
193
steps:
178
194
- uses: dessant/lock-threads@v2
@@ -187,6 +203,7 @@ with the `wip` label applied.
187
203
This step will post a comment on issues and pull requests before locking them,
0 commit comments