Skip to content

Commit 55c3807

Browse files
committed
Add workflow for stale v2 issues
1 parent 9b4137f commit 55c3807

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

.github/workflows/close-v2-issues.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: 🚪 Close v2 Issues
2+
3+
on:
4+
workflow_dispatch:
5+
6+
concurrency: ${{ github.workflow }}-${{ github.ref }}
7+
8+
jobs:
9+
experimental:
10+
name: 🚪 Close v2 Issues
11+
if: github.repository == 'remix-run/remix'
12+
runs-on: ubuntu-latest
13+
env:
14+
GH_TOKEN: ${{ github.token }}
15+
steps:
16+
- name: ⬇️ Checkout repo
17+
uses: actions/checkout@v4
18+
19+
- name: 📦 Setup pnpm
20+
uses: pnpm/[email protected]
21+
22+
- name: ⎔ Setup node
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version-file: ".nvmrc"
26+
cache: "pnpm"
27+
28+
- name: 📥 Install deps
29+
run: pnpm install --frozen-lockfile
30+
31+
- name: 🚪 Close Issues
32+
run: |
33+
node -e "console.log('GH_TOKEN defined?', process.env.GH_TOKEN != null)"
34+
node ./scripts/close-v2-issues.mjs

scripts/close-v2-issues.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { execSync } from "node:child_process";
2+
3+
let getIssuesCmd = (q) => `gh issue list --search "${q}" --json number`;
4+
let issueCmd = getIssuesCmd("is:issue state:open updated:<2024-06-30");
5+
console.log(`Executing command: ${issueCmd}`);
6+
let result = execSync(issueCmd).toString();
7+
8+
console.log(`Result: ${result}`);

0 commit comments

Comments
 (0)