Skip to content

Commit fec618e

Browse files
authored
Merge branch 'main' into prevent-number-drifts
2 parents e6285c9 + f2f689f commit fec618e

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

.github/workflows/check-models.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,25 @@ jobs:
114114
echo "No changes detected in model data files"
115115
echo "changed=false" >> $GITHUB_OUTPUT
116116
else
117+
# Check if the only change is the lastUpdated date in modelPricing.json
118+
DIFF_OUTPUT=$(git diff src/modelPricing.json)
119+
120+
# Count the number of changed lines (lines starting with +/- but not +++ or ---)
121+
CHANGED_LINES=$(echo "$DIFF_OUTPUT" | grep -E '^[+-][^+-]' | wc -l)
122+
123+
# Check if only 2 lines changed (one deletion, one addition) and both contain "lastUpdated"
124+
if [ "$CHANGED_LINES" -eq 2 ]; then
125+
# Check if all changed lines contain "lastUpdated"
126+
if echo "$DIFF_OUTPUT" | grep -E '^[+-][^+-]' | grep -v '"lastUpdated"' | wc -l | grep -q '^0$'; then
127+
# Verify no changes to tokenEstimators.json
128+
if git diff --quiet src/tokenEstimators.json; then
129+
echo "Only lastUpdated date changed - skipping PR creation"
130+
echo "changed=false" >> $GITHUB_OUTPUT
131+
exit 0
132+
fi
133+
fi
134+
fi
135+
117136
echo "Changes detected in model data files"
118137
echo "changed=true" >> $GITHUB_OUTPUT
119138
fi
@@ -148,6 +167,10 @@ jobs:
148167
149168
The changes were automatically generated using Copilot CLI to fetch and parse
150169
the upstream documentation and update the configuration files.
170+
171+
---
172+
173+
**Workflow Run:** ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
151174
labels: |
152175
autogenerated
153176
maintenance

.github/workflows/copilot-setup-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ jobs:
133133
if: ${{ vars.COPILOT_STORAGE_ACCOUNT != '' }}
134134
run: |
135135
cd .github/skills/azure-storage-loader
136-
npm install --production
136+
npm ci --production
137137
138138
- name: Download aggregated usage data from Azure Table Storage
139139
if: ${{ vars.COPILOT_STORAGE_ACCOUNT != '' }}

.github/workflows/prompts/sync-models-prompt.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ For missing models in modelPricing.json:
5050

5151
## Metadata Updates
5252

53-
- Update `lastUpdated` field in `src/modelPricing.json` to today's date (YYYY-MM-DD format)
53+
- **ONLY** update `lastUpdated` field in `src/modelPricing.json` to today's date (YYYY-MM-DD format) **if you added new models to the pricing file**
54+
- If no models were added, do NOT update the `lastUpdated` field
5455
- Do NOT modify the `sources` section unless you have specific pricing data
5556

5657
## Output Format

0 commit comments

Comments
 (0)