Skip to content

Instantly share code, notes, and snippets.

@hyoban
Last active January 30, 2026 16:14
Show Gist options
  • Select an option

  • Save hyoban/3388f2c727126c2ad8cbf1c50e9d044b to your computer and use it in GitHub Desktop.

Select an option

Save hyoban/3388f2c727126c2ad8cbf1c50e9d044b to your computer and use it in GitHub Desktop.
hyoban merged PRs in langgenius/dify

PRs handled by hyoban in langgenius/dify

Last updated: 2026-01-31 00:14:34

2026-01-29

2026-01-27

  • 🟢 #31558: fix: wrap test cleanup in act() to prevent window is not defined error (by @majiayu000)

2026-01-26

  • 🟢 #31117: fix: fix Cannot read properties of null (reading 'credential_form_sch… (by @fatelei)
  • 🔴 #30909: fix: no scrollbar appearing, preventing the selection of the overflow… (by @fatelei)
  • 🟢 #30897: fix: Add vertical scrolling support for floating elements. (by @coopercoder)

2026-01-24

  • 🔴 #31474: refactor: remove tailwind typography plugin and related code (by @mohansinghi)

2026-01-23

2026-01-22

  • 🟢 #31398: fix(web): use Array.from() for FileList to fix tsc type errors (by @majiayu000)
  • 🔴 #31399: fix(web): remove inconsistent bottom border from apps page header (by @nielskaspers)
  • 🟢 #31400: fix(web): disable single tilde strikethrough in markdown rendering (by @majiayu000)
  • 🟢 #31354: fix: fix visibilityState event handle (by @fatelei)

2026-01-21

  • 🟢 #31308: refactor(web): extract useCopyToClipboard hook to reduce duplication (by @SherlockShemol)
  • 🔴 #31345: [WIP] Fix doc links for better clarity (by @copilot-swe-agent)
  • 🟢 #31331: refactor(web): refactor next.config.js to next.config.ts (by @bowenliang123)
  • 🟢 #31334: feat: re organize agent skills and add web design skills for all agents (by @lyzno1)
  • 🟢 #27014: build: bump NextJS from 15 to 16 with turbopack enabled for web production build boost (by @bowenliang123)
  • 🟢 #31321: test: enhance HitTestingPage tests with additional coverage for rendering and state updates (by @CodingOnStar)

2026-01-20

  • 🔴 #28023: chore(deps): bump react-window and @types/react-window in /web (by @dependabot)
  • 🟢 #31186: chore(deps-dev): bump jsdom from 27.3.0 to 27.4.0 in /web (by @dependabot)
  • 🟢 #31262: fix: enforce no-leaked-conditional-rendering as error and fix violations (by @byteforge38)
  • 🟢 #31286: chore(web): remove version prefixes from package.json (by @copilot-swe-agent)
  • 🔴 #31285: fix: i18n placeholder patterns (47/359 fixed) - removed lint-staged for incremental commits (by @copilot-swe-agent)
  • 🟢 #31292: fix(web): disable HTML escaping for form field validation messages (by @lyzno1)
  • 🟢 #31257: chore(web): remove redundant optimizePackageImports config (by @cxhello)
  • 🔴 #31252: chore(web): add packages to optimizePackageImports (by @cxhello)

2026-01-19

  • 🔴 #31164: fix(web): add path '/' to locale cookie for site-wide persistence (by @bitloi)
  • 🟢 #31163: fix(web): Zustand testing best practices and state read optimization (by @lyzno1)
  • 🟢 #31133: feat: add Vercel React Best Practices skill for Claude Code (by @lyzno1)

2026-01-17

  • 🔴 #31159: perf(web): use getState() for Zustand setters in callbacks (by @lyzno1)
  • 🟢 #31110: feat(web): add loading indicators for infinite scroll pagination (by @eureka928)
  • 🟢 #31149: test(web): add global zustand mock for tests (by @lyzno1)

2026-01-16

  • 🟢 #31120: chore: improve accessibility for learn more link (by @khmandarrin)
  • 🟢 #31095: fix(web): replace Response.json with legacy Response constructor for pre-Chrome 105 compatibility(#31091) (by @XiaoBa-Yu)
  • 🟢 #31066: fix(web): use portal for variable picker in code editor (Fixes #31063) (by @Pavior0)

2026-01-15

  • 🔴 #28143: refactor(types): migrate enum to const assertion with type inference (WIP) (by @coding-ice)
  • 🟢 #30999: refactor(contract): restructure console contracts with nested billing module (by @lyzno1)

2026-01-14

  • 🟢 #30980: chore(web): disable Serwist dev logs (by @lyzno1)
  • 🟢 #30971: fix(web): preserve HTTP method in ORPC fetchCompat mode (by @lyzno1)

2026-01-13

2026-01-04

  • 🟢 #30444: chore: integrate @tanstack/eslint-plugin-query and fix service layer lint errors (by @lyzno1)
  • 🟢 #30482: chore: remove redundant web/app/page.module.css (by @lyzno1)

2025-12-30

  • 🟢 #30368: fix(i18n): load server namespaces by kebab-case (by @lyzno1)

2025-12-29

  • 🟢 #30324: chore: i18n namespace refactor in package.json and add missing translations (by @lyzno1)

2025-12-25

  • 🟢 #30126: chore(web): migrate lodash-es to es-toolkit compat (by @lyzno1)

2025-12-23

PRs authored by hyoban in langgenius/dify

Last updated: 2026-01-31 00:14:34

2026-01-30

  • #31754: fix: trigger doc link
  • #31735: chore: update lint config
  • #31733: chore: Revert "refactor: prefer css icon"

2026-01-29

  • #31551: refactor: prefer css icon
  • #31714: docs: relocate frontend docs for agents and human
  • #31696: chore: disable turbopackFileSystemCacheForDev

2026-01-27

  • #31593: chore: update react and next version

2026-01-26

  • #31536: chore: update to story book nextjs-vite
  • #31526: chore: eslint prune-suppressions

2026-01-23

  • #31424: chore: disable serwist in dev

2026-01-22

  • #31395: fix: more doc link fix
  • #31390: fix: following docs link fix

2026-01-21

  • #31355: test: enhance HitTestingPage tests with additional coverage for rende…
  • #31353: chore: revert jsdom update
  • #31350: test: fix test in #30849
  • #30849: fix: check and update doc links
  • #31329: chore: update dev config
  • #31301: chore: lint custom tag in i18n

2026-01-20

  • #31283: fix: lint for i18n place holder
  • #31261: ci: label web changes
  • #31209: chore: init tsslint

2026-01-19

  • #31205: chore: drop slow lint rules
  • #31195: chore: no custom lint cache location
  • #31180: chore: update vite related version

2026-01-17

  • #31157: chore: introduce bulk-suppressions and multithread linting

2026-01-16

  • #31088: chore: lint for state hooks

2026-01-15

  • #31072: ci: disable limit annotation
  • #31056: ci: eslint annotation
  • #31039: refactor: remove manual set query logic
  • #30945: build: require node 24.13.0

2026-01-14

  • #30985: fix: redirect after login

2026-01-13

  • #30885: refactor: init orpc contract

2026-01-12

  • #30848: build: limit esbuild, glob, docker base version to avoid cve
  • #30837: docs(web): add corepack recommendation

2026-01-10

  • #30808: feat(web): migrate PWA to Serwist

2026-01-09

  • #30702: refactor: marketplace state management

2026-01-07

  • #30630: refactor(web): remove useMixedTranslation, better resource loading

2026-01-06

  • #30596: feat: init rsc support for translation

2026-01-05

  • #30571: chore: fix lint in i18n
  • #30491: chore(web): add ESLint rules for i18n JSON validation

2026-01-04

  • #30505: ci: fix translate, allow manual dispatch

2025-12-31

  • #30432: chore: add jotai store
  • #30427: build: bring back babel-loader, add build check
  • #30376: test: unify i18next mocks into centralized helpers
  • #30410: chore: update knip config and include in CI
  • #30417: chore: lint for react compiler

2025-12-30

  • #30366: chore: remove useless __esModule
  • #30336: refactor(i18n): about locales
  • #30353: fix: missing i18n translation for Trans

2025-12-29

  • #30114: refactor(i18n): use JSON with flattened key and namespace
  • #30291: chore(sdk/nodejs): update deps

2025-12-25

  • #30171: fix: load i18n on server

2025-12-24

  • #30101: chore: no template string in translation
  • #30058: chore: fix type check for i18n

2025-12-23

  • #30042: chore: enable ts/no-explicit-any, remove no-unused-vars
  • #30041: chore: lint require and how to import react
  • #30020: chore(web): new lint setup

2025-12-22

  • #29974: refactor(web): migrate to Vitest and esm

2025-12-19

  • #29916: refactor: unified cn utils

2025-12-05

  • #29147: chore: detect rules from .oxlintrc.json

2025-12-01

  • #28937: fix: moving focus after navigations

Issues created by hyoban in langgenius/dify

Last updated: 2026-01-31 00:14:34

Open

  • #31522: [Refactor/Chore] Remove react-papaparse
  • #31491: [Refactor/Chore] Enable no-barrel-import in lint config
  • #31448: [Refactor/Chore] OpenAPI specification -> oRPC contract
  • #31326: [Refactor/Chore] Fix random test fail window is not defined
  • #31306: [Refactor/Chore] Introduce @tanstack/react-virtual, remove react-window
  • #31176: Using two-finger drag should allow for moving the canvas position
  • #31172: [Refactor/Chore] Improve the way we organize our Zustand stores
  • #31171: No global loading when switching tabs in apps
  • #31151: [Refactor/Chore] enable noUncheckedIndexedAccess in tsconfig.json
  • #30988: [Refactor/Chore] Update how we save WebAppAccessToken
  • #30931: [Refactor/Chore] Reduce bundle size
  • #30797: [Refactor/Chore] Introduce CSS icons
  • #30604: [Refactor/Chore] prefer import useTranslation from '#i18n'
  • #30407: [Refactor/Chore] Enforce knip
  • #30406: [Refactor/Chore] Update to Tailwind CSS v4
  • #30351: [Refactor/Chore] Introduce Codecov for test coverage
  • #30165: [Refactor/Chore] Load translation as needed by namespace

2026-01-30

  • #31734: [Refactor/Chore] Update lint config

2026-01-29

  • #31597: [Refactor/Chore] Improve ESLint guide and prefer CONTRIBUTING​.md
  • #31137: UI inconsistency in dark mode
  • #31694: [Refactor/Chore] disable turbopackFileSystemCacheForDev

2026-01-27

  • #31577: [Refactor/Chore] Update React and Next.js for CVE-2026-23864
  • #31299: [Refactor/Chore] Add guide in agent.md about how to lint

2026-01-26

  • #31527: [Refactor/Chore] Update storybook version to support nextjs 16

2026-01-23

  • #31425: [Refactor/Chore] Enable ESLInt autofix in autofix bot
  • #31423: [Refactor/Chore] Disabel SerwistProvider in dev

2026-01-22

  • #31330: [Refactor/Chore] Switch back to tsc in CI
  • #31389: Some doc links fix

2026-01-21

  • #30842: [Refactor/Chore] Update docs link
  • #31327: [Refactor/Chore] fix next dev inspector address already in use
  • #31300: [Refactor/Chore] Lint for custom tag in i18n

2026-01-20

  • #31256: [Refactor/Chore] set react-x/no-leaked-conditional-rendering as error
  • #29902: [Refactor/Chore] make Semantic Pull Request required
  • #31279: [Refactor/Chore] No version prefix in package.json
  • #31260: [Refactor/Chore] label web changes
  • #31255: [Refactor/Chore] Remove useless optimizePackageImports config
  • #31207: [Refactor/Chore] Intergrate tsslint for lint rules require type-checking

2026-01-19

  • #31200: [Refactor/Chore] Remove lint rules are slow and useless
  • #31194: [Refactor/Chore] No custom lint cache location
  • #31179: [Refactor/Chore] Remove locked Vite version

2026-01-17

  • #31154: [Refactor/Chore] try Multithread Linting for ESLint
  • #31153: [Refactor/Chore] bulk suppressions for ESLint
  • #31023: [Refactor/Chore] Displaying loading the next page

2026-01-16

  • #31109: [Refactor/Chore] Improve accessibility
  • #31051: [Refactor/Chore] Catch no-direct-set-state-in-use-effect for useQueryState and other state hooks

2026-01-15

  • #31030: [Refactor/Chore] Always preserve the marketplace search state in the URL.
  • #31070: [Refactor/Chore] Limit ESLint annotation to pull request
  • #31055: [Refactor/Chore] Use annotation for ESLint warn
  • #31031: [Refactor/Chore] Request me as a reviewer for web changes
  • #31037: [Refactor/Chore] Remove manual preserve query state logic

2026-01-14

  • #30111: [Refactor/Chore] improve i18n setup

2026-01-13

  • #30342: [Refactor/Chore] Better service management with RPC contract

2026-01-12

  • #30836: [Refactor/Chore] Recommend corepack in the development process

2026-01-10

  • #30792: [Refactor/Chore] Drop next-pwa

2026-01-09

  • #30699: [Refactor/Chore] Simply data fetching and state management in the marketplace

2026-01-07

  • #30649: [Refactor/Chore] Improve how translation resources are loading
  • #30648: [Refactor/Chore] Remove useMixedTranslation for maintenance

2026-01-06

  • #30593: [Refactor/Chore] RSC support for react-i18next

2025-12-31

  • #30304: [Refactor/Chore] Improve how we mock for i18n in tests
  • #30408: [Refactor/Chore] Enable React Compiler lint rules

2025-12-30

  • #30311: [Refactor/Chore] No refresh when switching language

2025-12-24

  • #30056: [Refactor/Chore] interface over type
  • #30055: [Refactor/Chore] type check for i18n is broken

2025-12-23

  • #29904: [Refactor/Chore] stricter type checking
  • #29903: [Refactor/Chore] better lint setup

2025-12-22

  • #29924: [Refactor/Chore] migrate to esm
  • #29926: [Refactor/Chore] migrate to Vitest

2025-12-19

  • #29910: [Refactor/Chore] improve cn utils

2025-12-05

  • #29037: [Chore/Refactor] react hooks lint rule is not enabled
#!/bin/bash
# List PRs merged/authored by user in a GitHub repo, grouped by day
# Usage: ./list-merged-prs.sh [--force] [pages]
# Parse arguments
FORCE=false
MAX_PAGES=10
for arg in "$@"; do
case $arg in
--force|-f) FORCE=true ;;
[0-9]*) MAX_PAGES=$arg ;;
esac
done
REPO_OWNER="langgenius"
REPO_NAME="dify"
USER="hyoban"
OUTPUT_FILE="1-merged-prs.md"
OUTPUT_FILE_AUTHORED="2-authored-prs.md"
OUTPUT_FILE_ISSUES="3-issues.md"
GIST_ID_FILE=".gist-id"
GIST_DESCRIPTION="$USER's activity in $REPO_OWNER/$REPO_NAME"
# === Utility Functions ===
# Append new results to existing results
append_results() {
local new="$1" existing="$2"
if [ -n "$new" ]; then
if [ -n "$existing" ]; then
echo "$existing"$'\n'"$new"
else
echo "$new"
fi
else
echo "$existing"
fi
}
# Filter results by date, returns "STOP|filtered_results" or "CONTINUE|filtered_results"
filter_by_date() {
local results="$1" last_date="$2"
[ -z "$last_date" ] || [ -z "$results" ] && { echo "CONTINUE|$results"; return; }
local filtered="" line date stopped="CONTINUE"
while IFS= read -r line; do
date="${line%%|*}"
if [ "$date" \< "$last_date" ] || [ "$date" = "$last_date" ]; then
stopped="STOP"
break
fi
filtered=$(append_results "$line" "$filtered")
done <<< "$results"
echo "$stopped|$filtered"
}
# Write handled PR markdown file with state and author
write_handled_pr_file() {
local title="$1" output_file="$2" new_data="$3" old_data="$4"
{
echo "# $title"
echo ""
echo "Last updated: $(date '+%Y-%m-%d %H:%M:%S')"
echo ""
if [ -n "$new_data" ]; then
local current_date="" date datetime pr_num state author item_title url state_icon
while IFS='|' read -r date datetime pr_num state author item_title url; do
if [ "$date" != "$current_date" ]; then
[ -n "$current_date" ] && echo ""
echo "## $date"
echo ""
current_date="$date"
fi
if [ "$state" = "MERGED" ]; then
state_icon="🟢"
else
state_icon="🔴"
fi
echo "- $state_icon [#$pr_num]($url): $item_title (by [@$author](https://github.com/$author))"
done <<< "$new_data"
fi
if [ -n "$old_data" ]; then
echo ""
echo "$old_data"
fi
} > "$output_file"
}
# Write authored PR markdown file with header and grouped by day
write_authored_pr_file() {
local title="$1" output_file="$2" new_data="$3" old_data="$4"
{
echo "# $title"
echo ""
echo "Last updated: $(date '+%Y-%m-%d %H:%M:%S')"
echo ""
if [ -n "$new_data" ]; then
local current_date="" date datetime pr_num item_title url
while IFS='|' read -r date datetime pr_num item_title url; do
if [ "$date" != "$current_date" ]; then
[ -n "$current_date" ] && echo ""
echo "## $date"
echo ""
current_date="$date"
fi
echo "- [#$pr_num]($url): $item_title"
done <<< "$new_data"
fi
if [ -n "$old_data" ]; then
echo ""
echo "$old_data"
fi
} > "$output_file"
}
# Fetch from gist and extract last date
fetch_gist_file() {
local gist_id="$1" filename="$2" output_file="$3"
local content
content=$(gh gist view "$gist_id" --filename "$filename" --raw 2>/dev/null)
if [ -n "$content" ]; then
echo "$content" > "$output_file"
echo "$content" | grep -m1 '^## ' | sed 's/^## //' | grep -v '^Open$'
fi
}
# === Main Script ===
# Read gist ID
GIST_ID=""
[ -f "$GIST_ID_FILE" ] && GIST_ID=$(cat "$GIST_ID_FILE")
# Fetch previous content from gist
LAST_DATE=""
LAST_DATE_AUTHORED=""
if [ -n "$GIST_ID" ] && [ "$FORCE" = false ]; then
echo "Fetching previous data from gist..."
LAST_DATE=$(fetch_gist_file "$GIST_ID" "$OUTPUT_FILE" "$OUTPUT_FILE")
LAST_DATE_AUTHORED=$(fetch_gist_file "$GIST_ID" "$OUTPUT_FILE_AUTHORED" "$OUTPUT_FILE_AUTHORED")
fetch_gist_file "$GIST_ID" "$OUTPUT_FILE_ISSUES" "$OUTPUT_FILE_ISSUES" >/dev/null
[ -n "$LAST_DATE" ] && echo "Last fetched date (merged): $LAST_DATE"
[ -n "$LAST_DATE_AUTHORED" ] && echo "Last fetched date (authored): $LAST_DATE_AUTHORED"
elif [ "$FORCE" = true ]; then
echo "Force mode: ignoring cache..."
fi
echo "Querying PRs by $USER in $REPO_OWNER/$REPO_NAME (max $MAX_PAGES pages)..."
# GraphQL query for PRs (MERGED and CLOSED)
pr_query='
query($owner: String!, $name: String!, $cursor: String) {
repository(owner: $owner, name: $name) {
pullRequests(states: [MERGED, CLOSED], first: 100, after: $cursor, orderBy: {field: UPDATED_AT, direction: DESC}) {
pageInfo { hasNextPage endCursor }
nodes {
number title mergedAt closedAt state url
mergedBy { login }
author { login }
timelineItems(itemTypes: [CLOSED_EVENT], last: 1) {
nodes {
... on ClosedEvent {
actor { login }
}
}
}
}
}
}
}'
# Fetch PRs with pagination
all_merged=""
all_authored=""
cursor=""
page=0
should_stop_merged=false
should_stop_authored=false
while [ $page -lt $MAX_PAGES ]; do
[ "$should_stop_merged" = true ] && [ "$should_stop_authored" = true ] && {
echo -ne "\rReached previously fetched dates, stopping early..."
break
}
page=$((page + 1))
echo -ne "\rFetching page $page..."
response=$(gh api graphql -f query="$pr_query" -F owner="$REPO_OWNER" -F name="$REPO_NAME" -F cursor="$cursor" 2>/dev/null)
# Extract PRs handled by user (merged or closed by user, exclude self-authored)
# Format: date|datetime|number|state|author|title|url
page_merged=$(echo "$response" | jq -r --arg user "$USER" '
.data.repository.pullRequests.nodes[] |
select(.author.login != $user) |
select(
(.state == "MERGED" and .mergedBy.login == $user) or
(.state == "CLOSED" and .timelineItems.nodes[0].actor.login == $user)
) |
(if .state == "MERGED" then .mergedAt else .closedAt end) as $date |
"\($date | split("T")[0])|\($date)|\(.number)|\(.state)|\(.author.login)|\(.title)|\(.url)"
')
# Extract authored PRs (only merged ones)
page_authored=$(echo "$response" | jq -r --arg user "$USER" '
.data.repository.pullRequests.nodes[] |
select(.author.login == $user and .state == "MERGED") |
"\(.mergedAt | split("T")[0])|\(.mergedAt)|\(.number)|\(.title)|\(.url)"
')
# Filter and append merged PRs
filter_result=$(filter_by_date "$page_merged" "$LAST_DATE")
[ "${filter_result%%|*}" = "STOP" ] && should_stop_merged=true
page_merged="${filter_result#*|}"
all_merged=$(append_results "$page_merged" "$all_merged")
# Filter and append authored PRs
filter_result=$(filter_by_date "$page_authored" "$LAST_DATE_AUTHORED")
[ "${filter_result%%|*}" = "STOP" ] && should_stop_authored=true
page_authored="${filter_result#*|}"
all_authored=$(append_results "$page_authored" "$all_authored")
# Check for next page
has_next=$(echo "$response" | jq -r '.data.repository.pullRequests.pageInfo.hasNextPage')
[ "$has_next" != "true" ] && break
cursor=$(echo "$response" | jq -r '.data.repository.pullRequests.pageInfo.endCursor')
done
echo -e "\r "
# Fetch issues
echo "Fetching issues..."
issues_query='
query($owner: String!, $name: String!, $author: String!, $cursor: String) {
repository(owner: $owner, name: $name) {
issues(first: 100, after: $cursor, filterBy: {createdBy: $author}, orderBy: {field: CREATED_AT, direction: DESC}) {
pageInfo { hasNextPage endCursor }
nodes { number title state closedAt url }
}
}
}'
all_issues=""
cursor=""
page=0
while [ $page -lt 5 ]; do
page=$((page + 1))
response=$(gh api graphql -f query="$issues_query" -F owner="$REPO_OWNER" -F name="$REPO_NAME" -F author="$USER" -F cursor="$cursor" 2>/dev/null)
page_issues=$(echo "$response" | jq -r '.data.repository.issues.nodes[] | "\(.state)|\(.closedAt // "")|\(.number)|\(.title)|\(.url)"')
all_issues=$(append_results "$page_issues" "$all_issues")
has_next=$(echo "$response" | jq -r '.data.repository.issues.pageInfo.hasNextPage')
[ "$has_next" != "true" ] && break
cursor=$(echo "$response" | jq -r '.data.repository.issues.pageInfo.endCursor')
done
# Read old content for appending (skip if force mode)
old_merged=""
old_authored=""
if [ "$FORCE" = false ]; then
[ -f "$OUTPUT_FILE" ] && [ -n "$LAST_DATE" ] && old_merged=$(sed -n '/^## /,$p' "$OUTPUT_FILE")
[ -f "$OUTPUT_FILE_AUTHORED" ] && [ -n "$LAST_DATE_AUTHORED" ] && old_authored=$(sed -n '/^## /,$p' "$OUTPUT_FILE_AUTHORED")
fi
# Sort and deduplicate
[ -n "$all_merged" ] && all_merged=$(echo "$all_merged" | sort -t'|' -k2,2r | awk -F'|' '!seen[$3]++')
[ -n "$all_authored" ] && all_authored=$(echo "$all_authored" | sort -t'|' -k2,2r | awk -F'|' '!seen[$3]++')
# Write output files
write_handled_pr_file "PRs handled by $USER in $REPO_OWNER/$REPO_NAME" "$OUTPUT_FILE" "$all_merged" "$old_merged"
write_authored_pr_file "PRs authored by $USER in $REPO_OWNER/$REPO_NAME" "$OUTPUT_FILE_AUTHORED" "$all_authored" "$old_authored"
# Write issues file
{
echo "# Issues created by $USER in $REPO_OWNER/$REPO_NAME"
echo ""
echo "Last updated: $(date '+%Y-%m-%d %H:%M:%S')"
echo ""
if [ -n "$all_issues" ]; then
open_issues=$(echo "$all_issues" | grep '^OPEN|')
closed_issues=$(echo "$all_issues" | grep '^CLOSED|' | sort -t'|' -k2,2r)
if [ -n "$open_issues" ]; then
echo "## Open"
echo ""
while IFS='|' read -r _ _ num title url; do
echo "- [#$num]($url): $title"
done <<< "$open_issues"
echo ""
fi
if [ -n "$closed_issues" ]; then
current_date=""
while IFS='|' read -r _ closed_at num title url; do
date_only=${closed_at%%T*}
if [ "$date_only" != "$current_date" ]; then
[ -n "$current_date" ] && echo ""
echo "## $date_only"
echo ""
current_date="$date_only"
fi
echo "- [#$num]($url): $title"
done <<< "$closed_issues"
fi
fi
} > "$OUTPUT_FILE_ISSUES"
# Statistics
new_count=$([ -n "$all_merged" ] && echo "$all_merged" | wc -l | tr -d ' ' || echo 0)
total_count=$(grep -c '^\- \[#' "$OUTPUT_FILE")
# Upload to gist
SCRIPT_NAME="$(basename "$0")"
echo "Uploading to gist..."
if [ -z "$GIST_ID" ]; then
gist_url=$(gh gist create "$OUTPUT_FILE" "$OUTPUT_FILE_AUTHORED" "$OUTPUT_FILE_ISSUES" "$0" --desc "$GIST_DESCRIPTION" --public 2>&1)
if [ $? -eq 0 ]; then
GIST_ID=$(echo "$gist_url" | grep -oE '[a-f0-9]{32}')
echo "$GIST_ID" > "$GIST_ID_FILE"
echo "Created new gist: $gist_url"
else
echo "Failed to create gist: $gist_url"
fi
else
if gh api --method PATCH "gists/$GIST_ID" \
-f "files[$OUTPUT_FILE][content]=$(<"$OUTPUT_FILE")" \
-f "files[$OUTPUT_FILE_AUTHORED][content]=$(<"$OUTPUT_FILE_AUTHORED")" \
-f "files[$OUTPUT_FILE_ISSUES][content]=$(<"$OUTPUT_FILE_ISSUES")" \
-f "files[$SCRIPT_NAME][content]=$(<"$0")" \
>/dev/null 2>&1; then
echo "Updated gist: https://gist.github.com/$GIST_ID"
else
echo "Failed to update gist"
fi
fi
echo ""
echo "New PRs: $new_count"
echo "Total: $total_count PRs"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment