-
Notifications
You must be signed in to change notification settings - Fork 340
Token optimization: scope glossary-maintainer toolsets and pre-fetch git history #25228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -9,7 +9,6 @@ on: | |||||
|
|
||||||
| permissions: | ||||||
| contents: read | ||||||
| issues: read | ||||||
| pull-requests: read | ||||||
| actions: read | ||||||
|
|
||||||
|
|
@@ -41,12 +40,46 @@ tools: | |||||
| wiki: true | ||||||
| description: "Project glossary and terminology reference" | ||||||
| github: | ||||||
| toolsets: [default] | ||||||
| toolsets: [repos, pull_requests] # scoped to avoid search_repositories (in default); repos covers commits/files, pull_requests covers PRs | ||||||
| edit: | ||||||
| bash: true | ||||||
|
|
||||||
| timeout-minutes: 20 | ||||||
|
|
||||||
| checkout: | ||||||
| fetch-depth: 0 # full history required so git log --since works across all commits | ||||||
|
|
||||||
| steps: | ||||||
| - name: Fetch recent changes | ||||||
| run: | | ||||||
| set -euo pipefail | ||||||
| mkdir -p /tmp/gh-aw/agent | ||||||
|
|
||||||
| # Determine scan scope: Monday = full weekly scan, other weekdays = daily | ||||||
| DAY=$(date +%u) | ||||||
| if [ "$DAY" -eq 1 ]; then | ||||||
| SINCE="7 days ago" | ||||||
| SCOPE="weekly" | ||||||
| else | ||||||
| SINCE="24 hours ago" | ||||||
| SCOPE="daily" | ||||||
| fi | ||||||
|
|
||||||
| echo "Scan scope: $SCOPE (since: $SINCE)" | ||||||
|
|
||||||
| # Fetch recent commits (all files) — includes file names for context | ||||||
| git log --since="$SINCE" --oneline --name-only \ | ||||||
|
||||||
| git log --since="$SINCE" --oneline --name-only \ | |
| git log --since="$SINCE" --max-count=20 --format="%H %s" --name-only \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot use the checkout feature to get a non-sparse checkout of the repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
checkout: fetch-depth: 0to the frontmatter in 4e0511b. This configures a full (non-sparse) checkout with complete git history, ensuringgit log --since='24 hours ago'and--since='7 days ago'in the pre-step can see all commits rather than just the shallow single-commit default.