Skip to content

Commit 998f2d3

Browse files
committed
STUFF
1 parent c3bee67 commit 998f2d3

13 files changed

Lines changed: 572 additions & 30 deletions

File tree

gh/gh-discussions-count.sh

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
#!/bin/bash
2+
3+
# Script to count discussions user stianst has been involved with in keycloak/keycloak
4+
5+
USER="stianst"
6+
REPO_OWNER="keycloak"
7+
REPO_NAME="keycloak"
8+
9+
echo "Fetching discussions for user $USER in $REPO_OWNER/$REPO_NAME..."
10+
echo ""
11+
12+
# Calculate date 6 months ago
13+
SIX_MONTHS_AGO=$(date -d "6 months ago" +%Y-%m-%d)
14+
echo "Filtering discussions created after: $SIX_MONTHS_AGO"
15+
echo ""
16+
17+
# Function to fetch discussions with pagination
18+
fetch_discussions() {
19+
local query_type=$1
20+
local cursor=${2:-null}
21+
local has_next=true
22+
local total=0
23+
local discussions=()
24+
25+
while [ "$has_next" = "true" ]; do
26+
if [ "$cursor" = "null" ]; then
27+
cursor_param="null"
28+
else
29+
cursor_param="\"$cursor\""
30+
fi
31+
32+
# GraphQL query to search discussions
33+
result=$(gh api graphql -f query="
34+
query {
35+
search(query: \"repo:$REPO_OWNER/$REPO_NAME is:discussion $query_type:$USER created:>$SIX_MONTHS_AGO\", type: DISCUSSION, first: 100, after: $cursor_param) {
36+
discussionCount
37+
pageInfo {
38+
hasNextPage
39+
endCursor
40+
}
41+
edges {
42+
node {
43+
... on Discussion {
44+
number
45+
title
46+
url
47+
createdAt
48+
}
49+
}
50+
}
51+
}
52+
}
53+
")
54+
55+
# Extract values
56+
local count=$(echo "$result" | jq -r '.data.search.discussionCount')
57+
has_next=$(echo "$result" | jq -r '.data.search.pageInfo.hasNextPage')
58+
cursor=$(echo "$result" | jq -r '.data.search.pageInfo.endCursor')
59+
60+
# Get discussions from this page
61+
local page_discussions=$(echo "$result" | jq -r '.data.search.edges[].node | "\(.number)|\(.title)|\(.url)"')
62+
63+
if [ ! -z "$page_discussions" ]; then
64+
discussions+=("$page_discussions")
65+
fi
66+
67+
if [ "$has_next" = "false" ]; then
68+
total=$count
69+
break
70+
fi
71+
done
72+
73+
echo "$total"
74+
printf '%s\n' "${discussions[@]}"
75+
}
76+
77+
# Get discussions where user is the author
78+
echo "=== Discussions authored by $USER ==="
79+
authored_output=$(fetch_discussions "author")
80+
authored_count=$(echo "$authored_output" | head -n1)
81+
echo "Total: $authored_count"
82+
echo ""
83+
84+
# Get discussions where user is involved (commented, etc.)
85+
echo "=== Discussions involving $USER (includes authored + participated) ==="
86+
involved_output=$(fetch_discussions "involves")
87+
involved_count=$(echo "$involved_output" | head -n1)
88+
echo "Total: $involved_count"
89+
echo ""
90+
91+
# Show some recent discussions
92+
echo "=== Recent discussions involving $USER (showing up to 10) ==="
93+
echo "$involved_output" | tail -n +2 | head -n10 | while IFS='|' read -r number title url; do
94+
echo " #$number: $title"
95+
echo " $url"
96+
echo ""
97+
done
98+
99+
echo "Summary:"
100+
echo " Authored: $authored_count"
101+
echo " Total involved: $involved_count"

gh/gh-stats-stianst-2026-04-08.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# User: stianst
2+
From 2025-10-08 to 2026-04-08
3+
## Statistics
4+
| Stat | # |
5+
| ---- | - |
6+
| PRs - Created | 101 |
7+
| PRs - Reviewed | 172 |
8+
| Issues - Created | 248 |
9+
| Issues - Involved | 411 |
10+
| Issues - Closed | 226 |
11+
| Bugs - Involved | 72 |
12+
| Bugs - Closed | 10 |
13+
| Discussions - Created | 1 |
14+
| Discussions - Involved | 10 |
15+
## PRs
16+
| # | Title |
17+
| ---- | - |
18+
| [47831](https://github.com/keycloak/keycloak/pull/47831) | Pin Azure CLI to 2.82.0 to fix JSON parsing error (#47828) |
19+
| [47803](https://github.com/keycloak/keycloak/pull/47803) | Prevent creating policies if they don't reference only the owner resource (#496) |
20+
| [47522](https://github.com/keycloak/keycloak/pull/47522) | Fix build issues in OID4VCTestContext |
21+
| [47521](https://github.com/keycloak/keycloak/pull/47521) | Test migration util - Add support for legacy configuration of test realms |
22+
| [47438](https://github.com/keycloak/keycloak/pull/47438) | Verify resource indicator syntax in authz and token endpoint |
23+
| [47422](https://github.com/keycloak/keycloak/pull/47422) | Fix link to Facebook docs |
24+
| [47403](https://github.com/keycloak/keycloak/pull/47403) | Migrate events package to test framework |
25+
| [47389](https://github.com/keycloak/keycloak/pull/47389) | Delete tests checking feature availability |
26+
| [47325](https://github.com/keycloak/keycloak/pull/47325) | Delete runonserver package from legacy testsuite |
27+
| [47323](https://github.com/keycloak/keycloak/pull/47323) | Increase timeout for Store IT and Store Model tests as these timeout … |
28+
| [47322](https://github.com/keycloak/keycloak/pull/47322) | Change links from issues.redhat.com to redhat.atlassian.net (#47181) |
29+
| [47308](https://github.com/keycloak/keycloak/pull/47308) | Introduce new mechanism for selecting tests for database testsuite |
30+
| [47265](https://github.com/keycloak/keycloak/pull/47265) | Add missing packages to base testsuite |
31+
| [47258](https://github.com/keycloak/keycloak/pull/47258) | Check refresh request resource param matches original resource param. |
32+
| [47206](https://github.com/keycloak/keycloak/pull/47206) | Migrate LoginTimeoutValidationTest |
33+
| [47184](https://github.com/keycloak/keycloak/pull/47184) | Promote federated client authentication, including OIDC and Kube to fully supported |
34+
| [47012](https://github.com/keycloak/keycloak/pull/47012) | Add debug helper utility to the test framework |
35+
| [46807](https://github.com/keycloak/keycloak/pull/46807) | Fix testsuite deprecation check script |
36+
| [46763](https://github.com/keycloak/keycloak/pull/46763) | Initial experimental support for Resource Indicators |
37+
| [46635](https://github.com/keycloak/keycloak/pull/46635) | Increase allowed additions to legacy testsuite to 100 lines |
38+
| [46621](https://github.com/keycloak/keycloak/pull/46621) | Add a script to list all tests for a legacy testsuite |
39+
| [46584](https://github.com/keycloak/keycloak/pull/46584) | Fix testsuite deprecation check when event is not pull_request |
40+
| [46404](https://github.com/keycloak/keycloak/pull/46404) | Add JavaDoc for most important parts of the new test framework |
41+
| [46371](https://github.com/keycloak/keycloak/pull/46371) | Fix NPE with GitHubActionReport if running test on actions without git checkout |
42+
| [46176](https://github.com/keycloak/keycloak/pull/46176) | Follow-up update to test framework docs |
43+
| [46169](https://github.com/keycloak/keycloak/pull/46169) | Add support for detecting slow test classes |
44+
| [46163](https://github.com/keycloak/keycloak/pull/46163) | Fix NPE in test framework registry |
45+
| [46129](https://github.com/keycloak/keycloak/pull/46129) | Support injection in realm, client and user configurations |
46+
| [46112](https://github.com/keycloak/keycloak/pull/46112) | Distribution server sometimes uses wrong pid for started Keycloak server. |
47+
| [46072](https://github.com/keycloak/keycloak/pull/46072) | Add support for setup and cleanup for a test |
48+
| [46047](https://github.com/keycloak/keycloak/pull/46047) | Add GitHub Action summary support to new test framework |
49+
| [45974](https://github.com/keycloak/keycloak/pull/45974) | Review realm cleanup in test framework |
50+
| [45967](https://github.com/keycloak/keycloak/pull/45967) | Add sanity check for test framework with embedded server |
51+
| [45927](https://github.com/keycloak/keycloak/pull/45927) | Update test framework docs |
52+
| [45819](https://github.com/keycloak/keycloak/pull/45819) | Fix https://azure.microsoft.com/en-us link in docs |
53+
| [45813](https://github.com/keycloak/keycloak/pull/45813) | added ability to refresh token when within time |
54+
| [45754](https://github.com/keycloak/keycloak/pull/45754) | Test framework doesn't stop running Keycloak instance if reuse is turned off |
55+
| [45670](https://github.com/keycloak/keycloak/pull/45670) | Unable to resolve current project as a dependency to test framework server config |
56+
| [45605](https://github.com/keycloak/keycloak/pull/45605) | Fix embedded server for new test framework |
57+
| [45592](https://github.com/keycloak/keycloak/pull/45592) | Updates testframework to JUnit 6 and Test Containers 2.x. Removed transitive dependencies from keycloak-junit5 |
58+
| [45416](https://github.com/keycloak/keycloak/pull/45416) | Allow absolute path for cache-config-file |
59+
| [45389](https://github.com/keycloak/keycloak/pull/45389) | Allow re-using server when running tests with the new framework |
60+
| [45346](https://github.com/keycloak/keycloak/pull/45346) | Fix no error throw if Keycloak is configured wrongly, and add support to setting timeout from testsuite |
61+
| [45262](https://github.com/keycloak/keycloak/pull/45262) | Add default surefire args for tests using new testframework |
62+
| [45253](https://github.com/keycloak/keycloak/pull/45253) | Make environment variables override values from .env.test |
63+
| [45165](https://github.com/keycloak/keycloak/pull/45165) | Rename `team/continuous-testing` to `team/continuous-delivery` |
64+
| [45144](https://github.com/keycloak/keycloak/pull/45144) | Add Steven Hawkins as a maintainer |
65+
| [45136](https://github.com/keycloak/keycloak/pull/45136) | Group only minor/patch updates |
66+
| [45129](https://github.com/keycloak/keycloak/pull/45129) | Fix typo `JDNI` in release notes |
67+
| [45024](https://github.com/keycloak/keycloak/pull/45024) | Migrate parts of model package to new test framework |
68+
| [44988](https://github.com/keycloak/keycloak/pull/44988) | Migrate parts of model package to new test framework |
69+
| [44974](https://github.com/keycloak/keycloak/pull/44974) | Update testframework registry to explicitly declare dependencies in all suppliers |
70+
| [44941](https://github.com/keycloak/keycloak/pull/44941) | Fix NPE in JWT authenticators |
71+
| [44937](https://github.com/keycloak/keycloak/pull/44937) | Support running test methods on the server side |
72+
| [44909](https://github.com/keycloak/keycloak/pull/44909) | Clear classes loaded on the server side for run-on-server when a new execution happens |
73+
| [44901](https://github.com/keycloak/keycloak/pull/44901) | Remove legacy/jakarta Undertow as we only need one, and upgrade to the latest to fix CVEs |
74+
| [44848](https://github.com/keycloak/keycloak/pull/44848) | Move workflow tests out of admin package |
75+
| [44845](https://github.com/keycloak/keycloak/pull/44845) | Remove Log4j from parent pom |
76+
| [44837](https://github.com/keycloak/keycloak/pull/44837) | Disable TiDB testing in GitHub Actions |
77+
| [44830](https://github.com/keycloak/keycloak/pull/44830) | Disable TiDB testing in GitHub Actions |
78+
| [44827](https://github.com/keycloak/keycloak/pull/44827) | Remove log4j 1.x from Arquillian testsuite |
79+
| [44826](https://github.com/keycloak/keycloak/pull/44826) | Apply Spotless to docs, distribution, and operator |
80+
| [44816](https://github.com/keycloak/keycloak/pull/44816) | Remove log4j 1.x from testsuite/utils |
81+
| [44813](https://github.com/keycloak/keycloak/pull/44813) | Remove jpa-performance |
82+
| [44809](https://github.com/keycloak/keycloak/pull/44809) | Remove log4j 1.x from testsuite/model |
83+
| [44806](https://github.com/keycloak/keycloak/pull/44806) | Remove log4j 1.x from util/embedded-ldap |
84+
| [44804](https://github.com/keycloak/keycloak/pull/44804) | Fix Chrome and Firefox in new test framework on GitHub Actions |
85+
| [44521](https://github.com/keycloak/keycloak/pull/44521) | Migrate i18n package to new testsuite |
86+
| [44484](https://github.com/keycloak/keycloak/pull/44484) | Introduces a ManagedWebDriver to provide a single entry point for utilities around WebDriver. |
87+
| [44461](https://github.com/keycloak/keycloak/pull/44461) | Migrate transactions package to new testsuite |
88+
| [44452](https://github.com/keycloak/keycloak/pull/44452) | Delete MetricsRestServiceTest |
89+
| [44448](https://github.com/keycloak/keycloak/pull/44448) | Stop looking up client in ClientAssertionState to prevent lookup by clientId in federated client authentication |
90+
| [44381](https://github.com/keycloak/keycloak/pull/44381) | Schedule nightly runs to after nightly release |
91+
| [44325](https://github.com/keycloak/keycloak/pull/44325) | Refactoring around federated client authenticator to better handling lookup of IdPs and clients. Also, introducing updates to documentation. |
92+
| [44322](https://github.com/keycloak/keycloak/pull/44322) | Restore KeycloakServerConfigBuilder to use single --features and --features-disabled arguments |
93+
| [44313](https://github.com/keycloak/keycloak/pull/44313) | Add support to use kcw with remote test server |
94+
| [44224](https://github.com/keycloak/keycloak/pull/44224) | Rename ApiUtil to AdminApiUtil |
95+
| [44223](https://github.com/keycloak/keycloak/pull/44223) | Merge GenerateKeystoreForTestUtil with CryptoKeyStore |
96+
| [44215](https://github.com/keycloak/keycloak/pull/44215) | Avoid downloading spotless dependencies every time |
97+
| [44212](https://github.com/keycloak/keycloak/pull/44212) | Add permisions to stability-* workflows |
98+
| [44203](https://github.com/keycloak/keycloak/pull/44203) | Add support for AKP JWK parsing building |
99+
| [44151](https://github.com/keycloak/keycloak/pull/44151) | Use http for the DockerClientTest to avoid certificate issues Closes #44117 |
100+
| [44130](https://github.com/keycloak/keycloak/pull/44130) | Migrate keys package to new test framework |
101+
| [44103](https://github.com/keycloak/keycloak/pull/44103) | Remove PostgreSQL 13.x support |
102+
| [44096](https://github.com/keycloak/keycloak/pull/44096) | Split new base tests into multiple jobs |
103+
| [44060](https://github.com/keycloak/keycloak/pull/44060) | Remove wildcard imports |
104+
| [43967](https://github.com/keycloak/keycloak/pull/43967) | Refactor KubernetesIdentityProvider |
105+
| [43963](https://github.com/keycloak/keycloak/pull/43963) | Allow identity provider configuration without defaults for user authentication |
106+
| [43831](https://github.com/keycloak/keycloak/pull/43831) | Add ppc64le to Operator CSV metadata |
107+
| [43798](https://github.com/keycloak/keycloak/pull/43798) | Filter out non-user authentication IdPs from account and login |
108+
| [43767](https://github.com/keycloak/keycloak/pull/43767) | Allow CORS Access-Control-Allow-Headers customization |
109+
| [43656](https://github.com/keycloak/keycloak/pull/43656) | SPIFFE should support OIDC JWK endpoint (#43651) |
110+
| [43651](https://github.com/keycloak/keycloak/pull/43651) | SPIFFE should support OIDC JWK endpoint |
111+
| [43625](https://github.com/keycloak/keycloak/pull/43625) | Add CORS support to OIDC dynamic client registration endpoints |
112+
| [43535](https://github.com/keycloak/keycloak/pull/43535) | Extract related methods from IdentityProvider to UserIdentityProvider |
113+
| [43485](https://github.com/keycloak/keycloak/pull/43485) | Update enhancement issue template |
114+
| [43441](https://github.com/keycloak/keycloak/pull/43441) | Fix SPIFFE client authentication when iss claim is included (#43428) |
115+
| [43432](https://github.com/keycloak/keycloak/pull/43432) | Proposed import order |
116+
| [43430](https://github.com/keycloak/keycloak/pull/43430) | Cleanup changes made to JWTClientValidator after refactoring |
117+
| [43428](https://github.com/keycloak/keycloak/pull/43428) | Fix SPIFFE client authentication when iss claim is included |
118+
| [43413](https://github.com/keycloak/keycloak/pull/43413) | Fix schedule-nightly workflow |

gh/gh-user-stats.sh

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
#!/bin/bash -e
2+
3+
USER=$1
4+
CURRENT_DATE=$(date +%F)
5+
FROM_DATE=$(date -d "6 months ago" +%F)
6+
LIMIT=1000
7+
REPO="keycloak/keycloak"
8+
9+
FILE="gh-stats-$USER-$CURRENT_DATE.md"
10+
rm $FILE
11+
12+
print() {
13+
echo "$1" | tee -a $FILE
14+
}
15+
16+
print_header() {
17+
echo "| $1 | $2 |" | tee -a $FILE
18+
echo "| ---- | - |" | tee -a $FILE
19+
}
20+
21+
print_row() {
22+
echo "| $1 | $2 |" | tee -a $FILE
23+
}
24+
25+
fetch_discussions() {
26+
local query_type=$1
27+
local cursor=${2:-null}
28+
local has_next=true
29+
local total=0
30+
local discussions=()
31+
32+
while [ "$has_next" = "true" ]; do
33+
if [ "$cursor" = "null" ]; then
34+
cursor_param="null"
35+
else
36+
cursor_param="\"$cursor\""
37+
fi
38+
39+
# GraphQL query to search discussions
40+
result=$(gh api graphql -f query="
41+
query {
42+
search(query: \"repo:$REPO is:discussion $query_type:$USER created:>=$FROM_DATE\", type: DISCUSSION, first: 100, after: $cursor_param) {
43+
discussionCount
44+
pageInfo {
45+
hasNextPage
46+
endCursor
47+
}
48+
edges {
49+
node {
50+
... on Discussion {
51+
number
52+
title
53+
url
54+
createdAt
55+
}
56+
}
57+
}
58+
}
59+
}
60+
")
61+
62+
# Extract values
63+
local count=$(echo "$result" | jq -r '.data.search.discussionCount')
64+
has_next=$(echo "$result" | jq -r '.data.search.pageInfo.hasNextPage')
65+
cursor=$(echo "$result" | jq -r '.data.search.pageInfo.endCursor')
66+
67+
# Get discussions from this page
68+
local page_discussions=$(echo "$result" | jq -r '.data.search.edges[].node | "\(.number)|\(.title)|\(.url)"')
69+
70+
if [ ! -z "$page_discussions" ]; then
71+
discussions+=("$page_discussions")
72+
fi
73+
74+
if [ "$has_next" = "false" ]; then
75+
total=$count
76+
break
77+
fi
78+
done
79+
80+
echo "$total"
81+
}
82+
83+
print "# User: $USER"
84+
print "From $FROM_DATE to $CURRENT_DATE"
85+
86+
print "## Statistics"
87+
88+
print_header "Stat" "#"
89+
90+
PRS_CREATED=$(gh search prs --author $USER --created ">=$FROM_DATE" --limit "$LIMIT" --repo "$REPO" --merged --json id --jq 'length')
91+
print_row "PRs - Created" "$PRS_CREATED"
92+
93+
PRS_REVIEWED=$(gh search prs --reviewed-by $USER --created ">=$FROM_DATE" --limit "$LIMIT" --repo "$REPO" --merged --json id --jq 'length')
94+
print_row "PRs - Reviewed" "$PRS_REVIEWED"
95+
96+
ISSUES_CREATED=$(gh search issues --author $USER --updated ">=$FROM_DATE" --limit "$LIMIT" --repo "$REPO" --json id --jq 'length')
97+
print_row "Issues - Created" "$ISSUES_CREATED"
98+
99+
ISSUES_INVOLVED=$(gh search issues --involves $USER --updated ">=$FROM_DATE" --limit "$LIMIT" --repo "$REPO" --json id --jq 'length')
100+
print_row "Issues - Involved" "$ISSUES_INVOLVED"
101+
102+
ISSUES_CLOSED=$(gh search issues --involves $USER --closed ">=$FROM_DATE" --limit "$LIMIT" --repo "$REPO" --json id --jq 'length')
103+
print_row "Issues - Closed" "$ISSUES_CLOSED"
104+
105+
BUGS_INVOLVED=$(gh search issues --involves $USER --label "kind/bug" --updated ">=$FROM_DATE" --limit "$LIMIT" --repo "$REPO" --json id --jq 'length')
106+
print_row "Bugs - Involved" "$BUGS_INVOLVED"
107+
108+
BUGS_CLOSED=$(gh search issues --assignee $USER --label "kind/bug" --closed ">=$FROM_DATE" --limit "$LIMIT" --repo "$REPO" --json id --jq 'length')
109+
print_row "Bugs - Closed" "$BUGS_CLOSED"
110+
111+
DISCUSSIONS_CREATED=$(fetch_discussions "author")
112+
print_row "Discussions - Created" "$DISCUSSIONS_CREATED"
113+
114+
DISCUSSIONS_INVOLVED=$(fetch_discussions "involves")
115+
print_row "Discussions - Involved" "$DISCUSSIONS_INVOLVED"
116+
117+
print "## PRs"
118+
119+
print_header "#" "Title"
120+
gh pr list -R $REPO --search "author:$USER created:>=2025-10-08 state:merged" --limit "$LIMIT" --json number,title,url | jq -r '.[] | "| [\(.number)](\(.url)) | \(.title) |"' | tee -a $FILE
121+
122+
glow $FILE
123+
124+
echo $FILE
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package io.github.stianst.gh;
2+
3+
import io.github.stianst.gh.utils.Client;
4+
import org.jboss.logging.Logger;
5+
import org.kohsuke.github.GHIssue;
6+
import org.kohsuke.github.GHLabel;
7+
import org.kohsuke.github.GHRepository;
8+
import org.kohsuke.github.GitHub;
9+
10+
import java.io.IOException;
11+
import java.util.LinkedList;
12+
import java.util.List;
13+
import java.util.stream.Collectors;
14+
15+
public class GhTests {
16+
17+
private static final Logger LOG = Logger.getLogger(GhTests.class);
18+
19+
public static void main(String[] args) throws IOException {
20+
GitHub gitHub = Client.getInstance().gitHub();
21+
GHRepository repository = gitHub.getRepository("keycloak/keycloak");
22+
23+
GHIssue issue = repository.getIssue(49442);
24+
25+
gitHub.
26+
27+
28+
}
29+
30+
}

0 commit comments

Comments
 (0)