Skip to content

Commit bdc5b86

Browse files
authored
Run analyze-missing-reverts-from-branch on daily basis (#6841)
Run analyze-missing-reverts-from-branch Refactor code of github-analytics-daily.yml
1 parent 9665a59 commit bdc5b86

File tree

1 file changed

+33
-30
lines changed

1 file changed

+33
-30
lines changed

.github/workflows/github-analytics-daily.yml

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,30 @@ on:
88
schedule:
99
# Run daily at 2 AM UTC
1010
- cron: '0 2 * * *'
11+
workflow_call:
12+
inputs:
13+
branch:
14+
description: "PyTorch release branch. e.g. release/2.7"
15+
default: "release/2.8"
16+
required: false
17+
type: string
18+
milestone-id:
19+
description: 'Release milestone ID. e.g. 54'
20+
default: 53
21+
required: false
22+
type: string
1123
workflow_dispatch:
1224
inputs:
1325
branch:
1426
description: "PyTorch release branch. e.g. release/2.7"
15-
default: "release/2.7"
27+
default: "release/2.8"
28+
required: false
29+
type: string
1630
milestone-id:
1731
description: 'Release milestone ID. e.g. 54'
18-
default: 54
19-
repo-path:
20-
description: "Path to the repository to analyze"
21-
default: "./pytorch"
22-
remote:
23-
description: "Remote name to use for the repository"
24-
default: "origin"
25-
missing-in-branch:
26-
description: 'bool to flag if commits are missing in the branch'
27-
type: boolean
28-
default: true
29-
30-
32+
default: 53
33+
required: false
34+
type: string
3135

3236
jobs:
3337
github-analyze:
@@ -55,25 +59,24 @@ jobs:
5559
python3 -m pip install --upgrade pip
5660
python3 -m pip install requests==2.31.0 tqdm==4.64.1
5761
58-
- name: Run GitHub Analytics
62+
- name: Show missing reverts
5963
env:
60-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
BRANCH: ${{ inputs.branch }}
6165
run: |
6266
python3 tools/analytics/github_analyze.py \
6367
--repo-path ./pytorch \
6468
--remote origin \
65-
--branch release/2.7 \
66-
--milestone-id 54 \
67-
--missing-in-branch
69+
--branch "${BRANCH:-release/2.8}" \
70+
--analyze-missing-reverts-from-branch
6871
69-
70-
- name: Upload analytics results
71-
uses: actions/upload-artifact@v4
72-
if: always()
73-
with:
74-
name: github-analytics-results-${{ github.run_id }}
75-
path: |
76-
*.json
77-
*.csv
78-
*.log
79-
retention-days: 30
72+
- name: Show outstanding milestone issues
73+
env:
74+
BRANCH: ${{ inputs.branch }}
75+
MILESTONE: ${{ inputs.milestone-id }}
76+
run: |
77+
python3 tools/analytics/github_analyze.py \
78+
--repo-path ./pytorch \
79+
--remote origin \
80+
--branch "${BRANCH:-release/2.8}" \
81+
--milestone-id "${MILESTONE:-53}" \
82+
--missing-in-branch

0 commit comments

Comments
 (0)