Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9bd6ae6 commit 7d350c9Copy full SHA for 7d350c9
README.md
@@ -166,16 +166,18 @@ jobs:
166
creator,
167
state: 'all'
168
})
169
- const issues = await github.paginate(opts)
170
-
171
- for (const issue of issues) {
172
- if (issue.number === context.issue.number) {
173
- continue
+
+ const issues = await github.paginate(opts, (response, done) => {
+ const pr = response.data.find((issue) => issue.number !== context.issue.number && issue.pull_request)
+ if (pr) {
174
+ done() // Stop paginating
175
+ return pr
176
}
177
+ })
178
- if (issue.pull_request) {
- return // Creator is already a contributor.
- }
179
+ if (issues.length) {
180
+ return
181
182
183
await github.rest.issues.createComment({
0 commit comments