-
Notifications
You must be signed in to change notification settings - Fork 354
35 lines (30 loc) · 1023 Bytes
/
cleanUpOpenedIssues.yml
File metadata and controls
35 lines (30 loc) · 1023 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Fetch Open Issues
on:
workflow_dispatch:
jobs:
fetch-issues:
runs-on: ubuntu-latest
steps:
- name: Fetch open issues
id: issues
uses: octokit/request-action@v2.x
with:
route: GET /repos/Azure/api-management-developer-portal/issues?state=open
env:
GITHUB_TOKEN: ${{ secrets.GITHUBACTIONS_TOKEN }}
- name: Write issues to file
run: |
echo '${{ steps.issues.outputs.data }}' > issues.json
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Print issue URLs
run: |
const fs = require('fs');
const issues = JSON.parse(fs.readFileSync('issues.json', 'utf8'));
const filteredIssues = issues.filter(issue => issue.body.includes('Is your portal managed or self-hosted?\r\n\r\nManaged'));
for (const issue of filteredIssues) {
console.log(issue.html_url);
}
shell: bash