Skip to content

Commit 7d9a063

Browse files
authored
Merge branch 'master' into im/align-tests-with-re
2 parents c715193 + 4708e2a commit 7d9a063

File tree

2 files changed

+82
-9
lines changed

2 files changed

+82
-9
lines changed

.github/workflows/stale.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: "Stale Issue Management"
2+
on:
3+
schedule:
4+
# Run daily at midnight UTC
5+
- cron: "0 0 * * *"
6+
workflow_dispatch: # Allow manual triggering
7+
env:
8+
# Default stale policy timeframes
9+
DAYS_BEFORE_STALE: 365
10+
DAYS_BEFORE_CLOSE: 30
11+
# Accelerated timeline for needs-information issues
12+
NEEDS_INFO_DAYS_BEFORE_STALE: 30
13+
NEEDS_INFO_DAYS_BEFORE_CLOSE: 7
14+
jobs:
15+
stale:
16+
runs-on: ubuntu-latest
17+
steps:
18+
# First step: Handle regular issues (excluding needs-information)
19+
- name: Mark regular issues as stale
20+
uses: actions/stale@v9
21+
with:
22+
repo-token: ${{ secrets.GITHUB_TOKEN }}
23+
# Default stale policy
24+
days-before-stale: ${{ env.DAYS_BEFORE_STALE }}
25+
days-before-close: ${{ env.DAYS_BEFORE_CLOSE }}
26+
# Explicit stale label configuration
27+
stale-issue-label: "stale"
28+
stale-pr-label: "stale"
29+
stale-issue-message: |
30+
This issue has been automatically marked as stale due to inactivity.
31+
It will be closed in 30 days if no further activity occurs.
32+
If you believe this issue is still relevant, please add a comment to keep it open.
33+
close-issue-message: |
34+
This issue has been automatically closed due to inactivity.
35+
If you believe this issue is still relevant, please reopen it or create a new issue with updated information.
36+
# Exclude waiting-for-feedback issues from this step
37+
exempt-issue-labels: 'no-stale,waiting-for-feedback'
38+
# Remove stale label when issue/PR becomes active again
39+
remove-stale-when-updated: true
40+
# Apply to pull requests with same timeline
41+
days-before-pr-stale: ${{ env.DAYS_BEFORE_STALE }}
42+
days-before-pr-close: ${{ env.DAYS_BEFORE_CLOSE }}
43+
stale-pr-message: |
44+
This pull request has been automatically marked as stale due to inactivity.
45+
It will be closed in 30 days if no further activity occurs.
46+
close-pr-message: |
47+
This pull request has been automatically closed due to inactivity.
48+
If you would like to continue this work, please reopen the PR or create a new one.
49+
# Only exclude no-stale PRs (needs-information PRs follow standard timeline)
50+
exempt-pr-labels: 'no-stale'
51+
# Second step: Handle waiting-for-feedback issues with accelerated timeline
52+
- name: Mark waiting-for-feedback issues as stale
53+
uses: actions/stale@v9
54+
with:
55+
repo-token: ${{ secrets.GITHUB_TOKEN }}
56+
# Accelerated timeline for waiting-for-feedback
57+
days-before-stale: ${{ env.NEEDS_INFO_DAYS_BEFORE_STALE }}
58+
days-before-close: ${{ env.NEEDS_INFO_DAYS_BEFORE_CLOSE }}
59+
# Explicit stale label configuration
60+
stale-issue-label: "stale"
61+
# Only target ISSUES with waiting-for-feedback label (not PRs)
62+
only-issue-labels: 'waiting-for-feedback'
63+
stale-issue-message: |
64+
This issue has been marked as stale because it requires additional information
65+
that has not been provided for 30 days. It will be closed in 7 days if the
66+
requested information is not provided.
67+
close-issue-message: |
68+
This issue has been closed because the requested information was not provided within the specified timeframe.
69+
If you can provide the missing information, please reopen this issue or create a new one.
70+
# Disable PR processing for this step
71+
days-before-pr-stale: -1
72+
days-before-pr-close: -1
73+
# Remove stale label when issue becomes active again
74+
remove-stale-when-updated: true

tests/Doc/HomeJsonExample.cs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// EXAMPLE: cs_home_json
2-
2+
// BINDER_ID netsync-cs_home_json
33
// STEP_START import
44
using NRedisStack.RedisStackCommands;
55
using NRedisStack.Search;
@@ -15,7 +15,6 @@ namespace Doc;
1515
[Collection("DocsTests")]
1616
// REMOVE_END
1717

18-
// HIDE_START
1918
public class HomeJsonExample
2019
// REMOVE_START
2120
: AbstractNRedisStackTest, IDisposable
@@ -39,12 +38,10 @@ public void Run()
3938
var db = muxer.GetDatabase();
4039
// STEP_END
4140

42-
//REMOVE_START
43-
// Clear any keys here before using them in tests.
41+
// STEP_START cleanup_json
4442
db.KeyDelete(["user:1", "user:2", "user:3"]);
4543
try { db.FT().DropIndex("idx:users"); } catch { }
46-
//REMOVE_END
47-
// HIDE_END
44+
// STEP_END
4845

4946
// STEP_START create_data
5047
var user1 = new
@@ -171,6 +168,11 @@ public void Run()
171168
Assert.Equal(2, testItem["count"]);
172169
// REMOVE_END
173170

171+
// STEP_START cleanup_hash
172+
db.KeyDelete(["huser:1", "huser:2", "huser:3"]);
173+
try { db.FT().DropIndex("hash-idx:users"); } catch { }
174+
// STEP_END
175+
174176
// STEP_START make_hash_index
175177
var hashSchema = new Schema()
176178
.AddTextField("name")
@@ -235,8 +237,5 @@ public void Run()
235237
$"age: {d["age"]}, city:{d["city"]}"
236238
);
237239
// REMOVE_END
238-
// HIDE_START
239240
}
240241
}
241-
// HIDE_END
242-

0 commit comments

Comments
 (0)