← 返回首页
docs(notes): clarify editor mode selector location (#805) · massCodeIO/massCode@fa22097 · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Issue Close Require #1493

Workflow file

Issue Close Require

Issue Close Require #1493

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
name: Issue Close Require
on:
schedule:
- cron: '0 0 * * *'
permissions:
contents: read
issues: write
jobs:
close-issues:
runs-on: ubuntu-latest
steps:
- name: need reproduction
env:
GH_TOKEN: ${{ github.token }}
INACTIVE_DAYS: 3
LABEL: need reproduction
REPO: ${{ github.repository }}
run: |
set -o pipefail
cutoff="$(date -u -d "$INACTIVE_DAYS days ago" +%s)"
gh issue list \
--repo "$REPO" \
--state open \
--label "$LABEL" \
--limit 1000 \
--json number,updatedAt \
--jq '.[] | [.number, .updatedAt] | @tsv' \
| while IFS=$'\t' read -r number updated_at; do
updated_at_epoch="$(date -u -d "$updated_at" +%s)"
if [ "$updated_at_epoch" -le "$cutoff" ]; then
gh issue close "$number" --repo "$REPO"
fi
done