chore: import upstream snapshot with attribution
Harness Compat / harness compat (push) Failing after 0s
CI / test on 3.12 (standard) (push) Has been cancelled
CI / test on 3.13 (standard) (push) Has been cancelled
CI / test on 3.14 (standard) (push) Has been cancelled
CI / test on 3.10 (all-extras) (push) Has been cancelled
CI / test on 3.11 (all-extras) (push) Has been cancelled
CI / test on 3.12 (all-extras) (push) Has been cancelled
CI / test on 3.14 (pydantic-ai-slim) (push) Has been cancelled
CI / test on 3.10 (pydantic-evals) (push) Has been cancelled
CI / test on 3.11 (pydantic-evals) (push) Has been cancelled
CI / test on 3.12 (pydantic-evals) (push) Has been cancelled
CI / deploy-docs-preview (push) Has been cancelled
CI / build release artifacts (push) Has been cancelled
CI / publish to PyPI (push) Has been cancelled
CI / Send tweet (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / mypy (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / test on 3.10 (standard) (push) Has been cancelled
CI / test on 3.11 (standard) (push) Has been cancelled
CI / test on 3.13 (all-extras) (push) Has been cancelled
CI / test on 3.14 (all-extras) (push) Has been cancelled
CI / test on 3.10 (pydantic-ai-slim) (push) Has been cancelled
CI / test on 3.11 (pydantic-ai-slim) (push) Has been cancelled
CI / test on 3.12 (pydantic-ai-slim) (push) Has been cancelled
CI / test on 3.13 (pydantic-ai-slim) (push) Has been cancelled
CI / test on 3.13 (pydantic-evals) (push) Has been cancelled
CI / test on 3.14 (pydantic-evals) (push) Has been cancelled
CI / test on 3.10 (lowest-versions) (push) Has been cancelled
CI / test on 3.11 (lowest-versions) (push) Has been cancelled
CI / test on 3.12 (lowest-versions) (push) Has been cancelled
CI / test on 3.13 (lowest-versions) (push) Has been cancelled
CI / test on 3.14 (lowest-versions) (push) Has been cancelled
CI / test examples on 3.11 (push) Has been cancelled
CI / test examples on 3.12 (push) Has been cancelled
CI / test examples on 3.13 (push) Has been cancelled
CI / test examples on 3.14 (push) Has been cancelled
CI / coverage (push) Has been cancelled
CI / check (push) Has been cancelled
CI / deploy-docs (push) Has been cancelled
Harness Compat / harness compat (push) Failing after 0s
CI / test on 3.12 (standard) (push) Has been cancelled
CI / test on 3.13 (standard) (push) Has been cancelled
CI / test on 3.14 (standard) (push) Has been cancelled
CI / test on 3.10 (all-extras) (push) Has been cancelled
CI / test on 3.11 (all-extras) (push) Has been cancelled
CI / test on 3.12 (all-extras) (push) Has been cancelled
CI / test on 3.14 (pydantic-ai-slim) (push) Has been cancelled
CI / test on 3.10 (pydantic-evals) (push) Has been cancelled
CI / test on 3.11 (pydantic-evals) (push) Has been cancelled
CI / test on 3.12 (pydantic-evals) (push) Has been cancelled
CI / deploy-docs-preview (push) Has been cancelled
CI / build release artifacts (push) Has been cancelled
CI / publish to PyPI (push) Has been cancelled
CI / Send tweet (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / mypy (push) Has been cancelled
CI / docs (push) Has been cancelled
CI / test on 3.10 (standard) (push) Has been cancelled
CI / test on 3.11 (standard) (push) Has been cancelled
CI / test on 3.13 (all-extras) (push) Has been cancelled
CI / test on 3.14 (all-extras) (push) Has been cancelled
CI / test on 3.10 (pydantic-ai-slim) (push) Has been cancelled
CI / test on 3.11 (pydantic-ai-slim) (push) Has been cancelled
CI / test on 3.12 (pydantic-ai-slim) (push) Has been cancelled
CI / test on 3.13 (pydantic-ai-slim) (push) Has been cancelled
CI / test on 3.13 (pydantic-evals) (push) Has been cancelled
CI / test on 3.14 (pydantic-evals) (push) Has been cancelled
CI / test on 3.10 (lowest-versions) (push) Has been cancelled
CI / test on 3.11 (lowest-versions) (push) Has been cancelled
CI / test on 3.12 (lowest-versions) (push) Has been cancelled
CI / test on 3.13 (lowest-versions) (push) Has been cancelled
CI / test on 3.14 (lowest-versions) (push) Has been cancelled
CI / test examples on 3.11 (push) Has been cancelled
CI / test examples on 3.12 (push) Has been cancelled
CI / test examples on 3.13 (push) Has been cancelled
CI / test examples on 3.14 (push) Has been cancelled
CI / coverage (push) Has been cancelled
CI / check (push) Has been cancelled
CI / deploy-docs (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
repo="${GITHUB_REPOSITORY:?GITHUB_REPOSITORY is required}"
|
||||
out_root="/tmp/gh-aw/agent"
|
||||
issues_root="${out_root}/issues"
|
||||
all_dir="${issues_root}/all"
|
||||
batches_dir="${issues_root}/batches"
|
||||
index_file="${out_root}/open-issues.tsv"
|
||||
manifest_file="${issues_root}/batch-manifest.tsv"
|
||||
raw_file="${issues_root}/open-issues.raw.json"
|
||||
|
||||
batch_size="${BATCH_SIZE:-25}"
|
||||
issue_limit="${ISSUE_LIMIT:-1000}"
|
||||
|
||||
rm -rf "${issues_root}"
|
||||
mkdir -p "${all_dir}" "${batches_dir}"
|
||||
|
||||
printf "number\ttitle\tupdated_at\tcreated_at\tlabel_names\n" > "${index_file}"
|
||||
printf "batch\tissue_number\tupdated_at\tlabel_names\n" > "${manifest_file}"
|
||||
|
||||
# Fetch all open issues sorted by oldest update time first.
|
||||
gh issue list \
|
||||
--repo "${repo}" \
|
||||
--state open \
|
||||
--limit "${issue_limit}" \
|
||||
--search "sort:updated-asc" \
|
||||
--json number,title,body,updatedAt,createdAt,url,labels,author,assignees \
|
||||
> "${raw_file}"
|
||||
|
||||
issue_count="$(jq 'length' "${raw_file}")"
|
||||
if [[ "${issue_count}" == "0" ]]; then
|
||||
echo "No open issues found."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
count=0
|
||||
while IFS= read -r issue_json; do
|
||||
count=$((count + 1))
|
||||
|
||||
number="$(jq -r '.number' <<< "${issue_json}")"
|
||||
updated_at="$(jq -r '.updatedAt' <<< "${issue_json}")"
|
||||
created_at="$(jq -r '.createdAt' <<< "${issue_json}")"
|
||||
title="$(jq -r '.title' <<< "${issue_json}" | tr '\t\n' ' ' | sed 's/ */ /g')"
|
||||
labels="$(jq -r '[.labels[].name] | join(",")' <<< "${issue_json}")"
|
||||
|
||||
printf '%s\n' "${issue_json}" > "${all_dir}/${number}.json"
|
||||
printf "%s\t%s\t%s\t%s\t%s\n" "${number}" "${title}" "${updated_at}" "${created_at}" "${labels}" >> "${index_file}"
|
||||
|
||||
batch_index=$(((count - 1) / batch_size + 1))
|
||||
batch_name="$(printf 'batch-%03d' "${batch_index}")"
|
||||
batch_path="${batches_dir}/${batch_name}"
|
||||
mkdir -p "${batch_path}"
|
||||
cp "${all_dir}/${number}.json" "${batch_path}/${number}.json"
|
||||
|
||||
printf "%s\t%s\t%s\t%s\n" "${batch_name}" "${number}" "${updated_at}" "${labels}" >> "${manifest_file}"
|
||||
done < <(jq -c '.[]' "${raw_file}")
|
||||
|
||||
batch_count="$(find "${batches_dir}" -mindepth 1 -maxdepth 1 -type d | wc -l | tr -d ' ')"
|
||||
|
||||
echo "Prescanned ${count} open issues into ${all_dir}"
|
||||
echo "Created ${batch_count} batch folder(s) in ${batches_dir} (batch size: ${batch_size})"
|
||||
echo "Index file: ${index_file}"
|
||||
echo "Batch manifest: ${manifest_file}"
|
||||
Reference in New Issue
Block a user