File tree Expand file tree Collapse file tree 6 files changed +204
-0
lines changed Expand file tree Collapse file tree 6 files changed +204
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " Labeler: Build Predictor App"
2+
3+ on :
4+ # Allow dispatching the workflow via the Actions UI
5+ workflow_dispatch :
6+ inputs :
7+ rebuild :
8+ description : " Force a rebuild of the app"
9+ type : boolean
10+
11+ jobs :
12+ build-predictor :
13+ permissions :
14+ actions : write
15+ uses : dotnet/issue-labeler/.github/workflows/build-predictor.yml@3fe21fbd027653d2263d259333b154d33c157572 # v1.0.0
16+ with :
17+ rebuild : ${{ inputs.rebuild }}
Original file line number Diff line number Diff line change 1+ name : " Labeler: Cache Retention"
2+
3+ on :
4+ schedule :
5+ - cron : " 6 3 * * *" # 3:06 every day (arbitrary time daily)
6+
7+ workflow_dispatch :
8+
9+ jobs :
10+ cache-retention :
11+ # Do not run the workflow on forks outside the 'dotnet' org
12+ if : ${{ github.repository_owner == 'dotnet' }}
13+ uses : dotnet/issue-labeler/.github/workflows/cache-retention.yml@3fe21fbd027653d2263d259333b154d33c157572 # v1.0.0
Original file line number Diff line number Diff line change 1+ name : " Labeler: Predict Issue Labels"
2+
3+ on :
4+ # Only automatically predict area labels when issues are originally opened
5+ issues :
6+ types : opened
7+
8+ # Allow dispatching the workflow via the Actions UI, specifying ranges of numbers
9+ workflow_dispatch :
10+ inputs :
11+ issue_numbers :
12+ description : " Issue Numbers (comma-separated list of ranges)"
13+ type : string
14+ model_cache_key :
15+ description : " The cache key suffix to use for loading the model"
16+ type : string
17+ required : true
18+ default : " LIVE"
19+
20+ jobs :
21+ predict-issues :
22+ # Do not run the workflow on forks outside the 'dotnet' org
23+ if : ${{ github.repository_owner == 'dotnet' && (inputs.issue_numbers || github.event.issue.number) }}
24+ permissions :
25+ issues : write
26+ uses : dotnet/issue-labeler/.github/workflows/predict-issues.yml@3fe21fbd027653d2263d259333b154d33c157572 # v1.0.0
27+ with :
28+ model_cache_key : ${{ inputs.model_cache_key }}
29+ issue_numbers : ${{ inputs.issue_numbers || github.event.issue.number }}
30+ label_prefix : " area-"
31+ threshold : 0.40
32+ default_label : " needs-area-label"
Original file line number Diff line number Diff line change 1+ name : " Labeler: Predict Pull Labels"
2+
3+ on :
4+ # Per to the following documentation:
5+ # https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request_target
6+ #
7+ # The `pull_request_target` event runs in the context of the base of the pull request, rather
8+ # than in the context of the merge commit, as the `pull_request` event does. This prevents
9+ # execution of unsafe code from the head of the pull request that could alter the repository
10+ # or steal any secrets you use in your workflow. This event allows your workflow to do things
11+ # like label or comment on pull requests from forks.
12+ #
13+ # Only automatically predict area labels when pull requests are first opened
14+ pull_request_target :
15+ types : opened
16+
17+ # Allow dispatching the workflow via the Actions UI, specifying ranges of numbers
18+ workflow_dispatch :
19+ inputs :
20+ pull_numbers :
21+ description : " Pull Numbers (comma-separated list of ranges)"
22+ type : string
23+ model_cache_key :
24+ description : " The cache key suffix to use for loading the model"
25+ type : string
26+ required : true
27+ default : " LIVE"
28+
29+ jobs :
30+ predict-pulls :
31+ # Do not run the workflow on forks outside the 'dotnet' org
32+ if : ${{ github.repository_owner == 'dotnet' && (inputs.pull_numbers || github.event.number) }}
33+ permissions :
34+ pull-requests : write
35+ uses : dotnet/issue-labeler/.github/workflows/predict-pulls.yml@3fe21fbd027653d2263d259333b154d33c157572 # v1.0.0
36+ with :
37+ model_cache_key : ${{ inputs.model_cache_key }}
38+ pull_numbers : ${{ inputs.pull_numbers || github.event.number }}
39+ label_prefix : " area-"
40+ threshold : 0.40
Original file line number Diff line number Diff line change 1+ name : " Labeler: Promote Models"
2+
3+ on :
4+ # Dispatched via the Actions UI, promotes the staged models from
5+ # a staging slot into the prediction environment
6+ workflow_dispatch :
7+ inputs :
8+ promote_issues :
9+ description : " Issues: Promote Model"
10+ type : boolean
11+ required : true
12+ promote_pulls :
13+ description : " Pulls: Promote Model"
14+ type : boolean
15+ required : true
16+ model_cache_key :
17+ description : " The cache key suffix to promote into the 'LIVE' cache"
18+ type : string
19+ required : true
20+ default : " staging"
21+ backup_cache_key :
22+ description : " The cache key suffix to use for backing up the currently promoted model"
23+ type : string
24+ default : " backup"
25+
26+ permissions :
27+ actions : write
28+
29+ jobs :
30+ labeler-promote-issues :
31+ if : ${{ inputs.promote_issues }}
32+ uses : dotnet/issue-labeler/.github/workflows/promote-issues.yml@3fe21fbd027653d2263d259333b154d33c157572 # v1.0.0
33+ with :
34+ model_cache_key : ${{ inputs.model_cache_key }}
35+ backup_cache_key : ${{ inputs.backup_cache_key }}
36+
37+ labeler-promote-pulls :
38+ if : ${{ inputs.promote_pulls }}
39+ uses : dotnet/issue-labeler/.github/workflows/promote-pulls.yml@3fe21fbd027653d2263d259333b154d33c157572 # v1.0.0
40+ with :
41+ model_cache_key : ${{ inputs.model_cache_key }}
42+ backup_cache_key : ${{ inputs.backup_cache_key }}
Original file line number Diff line number Diff line change 1+ name : " Labeler: Train Models"
2+
3+ on :
4+ # Dispatched via the Actions UI, stages new models for promotion consideration
5+ # Each step of the workflow can be run independently: Download, Train, and Test
6+ workflow_dispatch :
7+ inputs :
8+ download_issues :
9+ description : " Issues: Download Data"
10+ type : boolean
11+ default : true
12+ train_issues :
13+ description : " Issues: Train Model"
14+ type : boolean
15+ default : true
16+ test_issues :
17+ description : " Issues: Test Model"
18+ type : boolean
19+ default : true
20+ download_pulls :
21+ description : " Pulls: Download Data"
22+ type : boolean
23+ default : true
24+ train_pulls :
25+ description : " Pulls: Train Model"
26+ type : boolean
27+ default : true
28+ test_pulls :
29+ description : " Pulls: Test Model"
30+ type : boolean
31+ default : true
32+
33+ data_limit :
34+ description : " Max number of items to include in the model"
35+ type : number
36+
37+ cache_key_suffix :
38+ description : " The cache key suffix to use for staging data/models (use 'LIVE' to bypass staging)"
39+ type : string
40+ required : true
41+ default : " staging"
42+
43+ jobs :
44+ labeler-train :
45+ permissions :
46+ issues : read
47+ pull-requests : read
48+ actions : write
49+ uses : dotnet/issue-labeler/.github/workflows/train.yml@3fe21fbd027653d2263d259333b154d33c157572 # v1.0.0
50+ with :
51+ download_issues : ${{ inputs.download_issues }}
52+ train_issues : ${{ inputs.train_issues }}
53+ test_issues : ${{ inputs.test_issues }}
54+ download_pulls : ${{ inputs.download_pulls }}
55+ train_pulls : ${{ inputs.train_pulls }}
56+ test_pulls : ${{ inputs.test_pulls }}
57+ data_limit : ${{ inputs.data_limit && fromJSON(inputs.data_limit) || 0 }}
58+ cache_key_suffix : ${{ inputs.cache_key_suffix }}
59+ label_prefix : " area-"
60+ threshold : 0.40
You can’t perform that action at this time.
0 commit comments