Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
221 commits
Select commit Hold shift + click to select a range
2a3ca24
Do not parse URIs during LSP serialization/deserialization
dibarbet Jan 9, 2025
5472092
Review feedback
dibarbet Jan 14, 2025
6ca67b9
additional feedback
dibarbet Jan 15, 2025
eb8358a
Merge remote-tracking branch 'upstream/main' into uri_crash
dibarbet Feb 13, 2025
6762ba4
respond to latest main changes
dibarbet Feb 13, 2025
64fa2b9
Merge remote-tracking branch 'upstream/main' into uri_crash
dibarbet Feb 13, 2025
fe4b438
Initial stubs
CyrusNajmabadi Apr 12, 2025
7a532e5
listener code
CyrusNajmabadi Apr 12, 2025
9bd71da
change to overlap
CyrusNajmabadi Apr 12, 2025
105d4da
In progress
CyrusNajmabadi Apr 12, 2025
458123e
Merge remote-tracking branch 'upstream/main' into copilotAnalysis
CyrusNajmabadi Apr 12, 2025
259d595
in progress
CyrusNajmabadi Apr 12, 2025
f21c533
Merge branch 'genericKeyValueMessage' into copilotAnalysis
CyrusNajmabadi Apr 12, 2025
524b86d
Merge branch 'genericKeyValueMessage' into copilotAnalysis
CyrusNajmabadi Apr 12, 2025
4c940b1
Add code
CyrusNajmabadi Apr 12, 2025
9e4af22
Add code
CyrusNajmabadi Apr 12, 2025
d4fdbd4
Add remote side
CyrusNajmabadi Apr 12, 2025
b04a2a4
Add remote service
CyrusNajmabadi Apr 12, 2025
3f9aa92
Merge branch 'genericKeyValueMessage' into copilotAnalysis
CyrusNajmabadi Apr 12, 2025
b9ef6aa
Update
CyrusNajmabadi Apr 12, 2025
af307f2
In progress
CyrusNajmabadi Apr 12, 2025
f75e9dc
Merge branch 'moveServiceDown' into copilotAnalysis
CyrusNajmabadi Apr 12, 2025
4e422b6
in progress
CyrusNajmabadi Apr 12, 2025
b8d96b4
Merge branch 'removeExtension' into copilotAnalysis
CyrusNajmabadi Apr 12, 2025
ed673f6
Code fixes
CyrusNajmabadi Apr 12, 2025
1e6458d
Fixed
CyrusNajmabadi Apr 12, 2025
9f7b76a
Data
CyrusNajmabadi Apr 12, 2025
f7bf6f1
reporting
CyrusNajmabadi Apr 12, 2025
670d703
Merge remote-tracking branch 'upstream/main' into copilotAnalysis
CyrusNajmabadi Apr 13, 2025
a1989b5
Merge branch 'moveServiceDown' into copilotAnalysis
CyrusNajmabadi Apr 13, 2025
ec701dc
Merge remote-tracking branch 'upstream/main' into copilotAnalysis
CyrusNajmabadi Apr 14, 2025
89df1bf
Merge remote-tracking branch 'upstream/main' into uri_crash
dibarbet Apr 14, 2025
3a7ff00
Merge remote-tracking branch 'upstream/main' into uri_crash
dibarbet Apr 14, 2025
9ffb219
Respond to additional main changes
dibarbet Apr 14, 2025
bb63a79
Make TextDocumentIdentifier changes backwards compatible
dibarbet Apr 14, 2025
8842f8c
Add backwards compatible properties for Uris used by Xaml/Razor
dibarbet Apr 14, 2025
89c8c54
Fix issues from merge
dibarbet Apr 15, 2025
5c675a8
Merge branch 'copilotChangeAnalysis2' into copilotAnalysis
CyrusNajmabadi Apr 15, 2025
af09933
Update `AbstractImplementAbstractClassCodeFixProvider.cs` source
emmanuel-ferdman Apr 18, 2025
9433cca
Merge remote-tracking branch 'upstream/main' into copilotAnalysis
CyrusNajmabadi Apr 28, 2025
730a3c4
Revert
CyrusNajmabadi Apr 28, 2025
c1320d6
Revert
CyrusNajmabadi Apr 28, 2025
4c5abfd
Merge remote-tracking branch 'upstream/main' into copilotAnalysis
CyrusNajmabadi Apr 28, 2025
4fdbee6
Merge remote-tracking branch 'upstream/main' into copilotAnalysis
CyrusNajmabadi Apr 29, 2025
817ec2e
Merge remote-tracking branch 'upstream/main' into copilotAnalysis
CyrusNajmabadi Apr 29, 2025
29d31e8
Add data
CyrusNajmabadi Apr 29, 2025
2942ee7
Move
CyrusNajmabadi Apr 29, 2025
4a77242
Fix and report more data
CyrusNajmabadi Apr 29, 2025
aead21b
Fix and report more data
CyrusNajmabadi Apr 29, 2025
68c533b
Report telemetry
CyrusNajmabadi Apr 29, 2025
906af19
Lint
CyrusNajmabadi Apr 29, 2025
e51c7de
Add tests
CyrusNajmabadi Apr 29, 2025
fb6e26c
Update src/Features/Core/Portable/Copilot/ICopilotChangeAnalysisServi…
CyrusNajmabadi Apr 30, 2025
3eaa22f
Update src/Features/Core/Portable/Copilot/ICopilotChangeAnalysisServi…
CyrusNajmabadi Apr 30, 2025
64b5b8a
Apply suggestions from code review
CyrusNajmabadi Apr 30, 2025
1d48c98
Keep track of accepted vs rejected
CyrusNajmabadi May 1, 2025
782e090
Merge remote-tracking branch 'upstream/main' into copilotAnalysis
CyrusNajmabadi May 1, 2025
495d40a
Add option to disable
CyrusNajmabadi May 1, 2025
8aba25c
Move around
CyrusNajmabadi May 1, 2025
d97d22c
Add logging support
CyrusNajmabadi May 1, 2025
efa67f2
Import v2.0.0 dotnet/issue-labeler default workflows
jeffhandley May 3, 2025
93aa970
issue-labeler workflow customization for dotnet/roslyn
jeffhandley May 3, 2025
8fa55c0
Merge remote-tracking branch 'upstream/main' into uri_crash
dibarbet May 5, 2025
782a12b
Add logging
CyrusNajmabadi May 5, 2025
9fd10b7
Merge remote-tracking branch 'upstream/main' into copilotAnalysis
CyrusNajmabadi May 5, 2025
b6fab9e
react to main changes
dibarbet May 5, 2025
3c435a0
Collapse to single string
CyrusNajmabadi May 5, 2025
73d3db4
Invariant formatting
CyrusNajmabadi May 5, 2025
4fc9a6c
Merge remote-tracking branch 'upstream/main' into uri_crash
dibarbet May 5, 2025
f5ee880
Fix issue buffering results
CyrusNajmabadi May 5, 2025
2320ce6
Add copilot tests IVT to ExternalAccess.Copilot
genlu May 6, 2025
4c071b6
Remove yield
CyrusNajmabadi May 6, 2025
4796e92
Do not parse URIs during LSP serialization/deserialization (#76691)
dibarbet May 6, 2025
de87379
Add copilot tests IVT to ExternalAccess.Copilot (#78455)
genlu May 6, 2025
2be1e63
Avoid buffering and dispatching all ProducerConsumer items in one go …
CyrusNajmabadi May 6, 2025
243a5c3
pass total milliseconds along
CyrusNajmabadi May 6, 2025
4018b29
Stringify
CyrusNajmabadi May 6, 2025
3adaec9
Update to platform background work pattern to make porting to their i…
CyrusNajmabadi May 6, 2025
79e6fc8
Add impl
CyrusNajmabadi May 6, 2025
88ec60f
REmove default impl of BackgroundWorkIndicator
CyrusNajmabadi May 6, 2025
4d80dc6
Merge branch 'removeDefaultBWI' into bwiWork
CyrusNajmabadi May 6, 2025
6b0115c
Update dependencies from https://github.com/dotnet/arcade build 20250…
dotnet-maestro[bot] May 6, 2025
a403994
Remove default impl of BackgroundWorkIndicator (#78470)
CyrusNajmabadi May 6, 2025
fc6d789
Merge branch 'main' into bwiWork
CyrusNajmabadi May 6, 2025
c7e986b
[main] Update dependencies from dotnet/arcade (#78471)
JoeRobich May 6, 2025
0c003e9
Update Language Feature Status.md and Update Compiler Test Plan.md fo…
AlekseyTs May 6, 2025
c53bdd8
Update to platform background work pattern to make porting to their i…
CyrusNajmabadi May 6, 2025
f64a80d
Make compiler detection more resilient (#78402)
jaredpar May 7, 2025
0ee3dc1
Extensions: resolve some follow-up comments on signature conflicts an…
jcouv May 7, 2025
28d61ae
Add comments and doc for the issue-labeler workflows
jeffhandley May 7, 2025
fdbbf6b
Fix razor redirect (#78448)
chsienki May 7, 2025
4a7d532
Merge remote-tracking branch 'upstream/main' into copilotAnalysis
CyrusNajmabadi May 7, 2025
23543a3
Add directory targets from Rainer
CyrusNajmabadi May 7, 2025
9682f48
Merge EditorFeatures.Wpf entirely into EditorFeatures
CyrusNajmabadi May 7, 2025
dc23a90
Update Roslyn.sln
CyrusNajmabadi May 7, 2025
516ad84
Reduce allocations during SourceGeneration (#78403)
ToddGrun May 7, 2025
53a5332
Remove now unused methods from IWorkspaceProjectContext (#78479)
ToddGrun May 7, 2025
a2cacd0
Delay loading of CodeRefactoringProvider's till absolutely needed
etvorun May 7, 2025
51ab35b
Make internal
CyrusNajmabadi May 7, 2025
1036939
Merge branch 'removeEditorFeaturesWPF' of https://github.com/CyrusNaj…
CyrusNajmabadi May 7, 2025
ea17ac7
Update eng/config/PublishData.json
CyrusNajmabadi May 7, 2025
c2dd8bc
Merge branch 'directoryTargets' into copilotAnalysis
CyrusNajmabadi May 7, 2025
a991bbb
Add directory targets from Rainer (#78493)
CyrusNajmabadi May 7, 2025
7066f9d
Merge branch 'main' into removeEditorFeaturesWPF
CyrusNajmabadi May 7, 2025
24fa8b7
Fix check
CyrusNajmabadi May 7, 2025
406526b
Merge remote-tracking branch 'upstream/main' into copilotAnalysis
CyrusNajmabadi May 7, 2025
e0a7ed0
Remove using
CyrusNajmabadi May 7, 2025
75627d6
Remove unused field
CyrusNajmabadi May 7, 2025
1e842e6
CR feedback and tests.
etvorun May 7, 2025
69f6101
Remove unused field
CyrusNajmabadi May 7, 2025
204bae8
Fix comment
etvorun May 7, 2025
f1ada62
Rectify status of dictionary expressions (#78497)
jcouv May 7, 2025
ae6d690
Add code for analzying copilot changes. (#78353)
CyrusNajmabadi May 7, 2025
1773df2
Remove unused field (#78496)
CyrusNajmabadi May 7, 2025
5106510
Use a project reference for M.CA.AnalyzerUtilities
JoeRobich May 8, 2025
86aecfd
Unlist M.CA.AnalyzerUtilities as an expected DevDivInsertion dependency
JoeRobich May 8, 2025
b5a5840
CR feedback
etvorun May 8, 2025
438f1ef
Fix source-build by renaming Assets folder to assets
JoeRobich May 8, 2025
89753f8
Update RoslynAnalyzers to use Roslyns version
JoeRobich May 8, 2025
944db55
Merge remote-tracking branch 'upstream/main' into removeEditorFeature…
CyrusNajmabadi May 8, 2025
312a1dc
Use a project reference for M.CA.AnalyzerUtilities (#78500)
JoeRobich May 8, 2025
bbde146
Merge EditorFeatures.Wpf entirely into EditorFeatures (#78494)
CyrusNajmabadi May 8, 2025
d35aabd
Fix unexpected conditional state in nullable analysis of conditional …
jjonescz May 8, 2025
d7903f9
Add syntax highlighting of ignored directives (#78458)
jjonescz May 8, 2025
542958b
Fix crash in 'introduce variable' on top-level statements
victor-pogor May 8, 2025
f9203dd
Exclude VS.ExternalAPIs.Roslyn.Package from source-build
JoeRobich May 8, 2025
c87e204
Targeted perf changes to CommandLineParser (#78446)
ToddGrun May 8, 2025
5e99a9f
Use lazy initialization for members in CodeFixService (#78484)
ToddGrun May 8, 2025
2edc01d
Onboard the GitHub Action based Issue-Labeler (#78426)
arunchndr May 8, 2025
92a7523
CR feedback
etvorun May 8, 2025
48b3103
Seal certain types in LSP layer
CyrusNajmabadi May 8, 2025
d25361c
Seal certain types in LSP layer
CyrusNajmabadi May 8, 2025
c1b5cf1
Exclude VS.ExternalAPIs.Roslyn.Package from source-build (#78509)
JoeRobich May 8, 2025
1f3a0d0
Publish PR validation to internal feeds
dibarbet Feb 6, 2025
0b13d4c
Publish symbols manually to internal feeds for PR validation (#77088)
dibarbet May 8, 2025
1b379e0
PooledObjects cleanup (#78382)
tmat May 8, 2025
b422f78
Delay loading of CodeRefactoringProvider's till absolutely needed (#7…
jasonmalinowski May 8, 2025
2c15a9f
moved condition above top-level statements
victor-pogor May 8, 2025
96986b0
Merge remote-tracking branch 'upstream/main' into sealLSP
CyrusNajmabadi May 8, 2025
9e1a7d0
REvert
CyrusNajmabadi May 8, 2025
f59a146
Seal
CyrusNajmabadi May 8, 2025
7f34740
Gracefully handle span mapping failing
May 8, 2025
6304674
Fix information logs getting logged as debug in VSCode
dibarbet May 8, 2025
537b86f
Don't unnecessarily create a document when only the document state is…
ToddGrun May 9, 2025
0c0a805
Ensure loghub collects the now verbose level logs
dibarbet May 9, 2025
ef70b9e
Adjust some more logging messages
dibarbet May 9, 2025
2855dc2
Cancel running requests when the connection terminates
dibarbet May 9, 2025
4e1be21
Shorten log category name
dibarbet May 9, 2025
6ecc256
Extensions: handle extensions in VB SymbolDisplay (#78512)
jcouv May 9, 2025
abcb9ba
Switch to non-scouting queue to unblock CI (#78521)
dibarbet May 9, 2025
b430311
Merge branch 'main' into sealLSP
CyrusNajmabadi May 9, 2025
9386147
Switch to simple primary constructors for several DI types. (#78513)
CyrusNajmabadi May 9, 2025
b610c62
Shorten log category name (#78526)
dibarbet May 9, 2025
13f74f7
Fix test helper message to avoid NRE (#78532)
tmat May 9, 2025
0c46ddf
Collect data about which code fixes end up making changes that confli…
CyrusNajmabadi May 9, 2025
159b10a
docs
CyrusNajmabadi May 9, 2025
04c7361
Revert
CyrusNajmabadi May 9, 2025
0899e12
Source package fixes (#78534)
tmat May 9, 2025
7496b67
Fix information logs getting logged as debug in VSCode (#78522)
dibarbet May 9, 2025
64093a7
Extract helper to make it easier for other features to request copilo…
CyrusNajmabadi May 9, 2025
b1ed094
lint
CyrusNajmabadi May 9, 2025
5e4eb70
lint
CyrusNajmabadi May 9, 2025
0a040c0
Extract helper to make it easier for other features to request copilo…
CyrusNajmabadi May 9, 2025
ef9f946
Collect data about which code fixes end up making changes that confli…
CyrusNajmabadi May 9, 2025
31ada44
Extensions: only count extensions for determining identifier (#78523)
jcouv May 9, 2025
29c99a3
Cache extension method import info per project ID
CyrusNajmabadi May 9, 2025
d273005
Merge branch 'main' into fix/78204-global-statement-introduce-variable
victor-pogor May 9, 2025
2f191a2
Fix crash in 'introduce variable' on top-level statements (#78507)
CyrusNajmabadi May 10, 2025
fc4cf1b
Remove telemetry
CyrusNajmabadi May 10, 2025
d0e9b44
Use pattern matching
CyrusNajmabadi May 10, 2025
ab431e8
Cache extension method import info per project ID (#78542)
CyrusNajmabadi May 10, 2025
c8ff575
Cancel running requests when the connection terminates (#78525)
dibarbet May 10, 2025
137b597
Lint
CyrusNajmabadi May 10, 2025
85706b9
Use pattern matching (#78545)
CyrusNajmabadi May 10, 2025
df41241
Add VB ref assembly to semantic search (#78537)
tmat May 10, 2025
7c62502
Add support for FieldRva to EnC delta (#78033)
tmat May 10, 2025
69728a3
[main] Source code updates from dotnet/dotnet (#78527)
dotnet-maestro[bot] May 12, 2025
07b88d3
Update `AbstractImplementAbstractClassCodeFixProvider.cs` source (#78…
JoeRobich May 12, 2025
0927e41
Introduce -productBuild and -sourceBuild switches (#78519)
ellahathaway May 12, 2025
bdf23fd
Document more steps in our C# release process (#78539)
jcouv May 12, 2025
362b715
Extensions: analyzer actions (#78319)
jcouv May 12, 2025
9eb1da4
Update XAML EA to use DocumentUri instead of System.Uri
dibarbet May 12, 2025
299955a
Update field value for NavBar Integration Tests (#78553)
akhera99 May 12, 2025
d4aab64
Update GetFirstRelatedDocumentId to not return documents with the sam…
ToddGrun May 13, 2025
2892b8b
Gracefully handle span mapping failing (#78520)
May 13, 2025
7446302
Implement PDG.WithProjectsRemoved (#78428)
ToddGrun May 13, 2025
4215d71
Selectively persist the commandline to temporary storage (#78441)
ToddGrun May 13, 2025
98d30b2
File based programs IDE support (#78488)
RikkiGibson May 13, 2025
de444b5
Update dependencies from https://github.com/dotnet/arcade build 20250…
dotnet-maestro[bot] May 14, 2025
f95c92c
Extensions: pattern-based constructs (#78480)
jcouv May 14, 2025
7e19b0f
Unset CompilerType from Csc (#78483)
jjonescz May 14, 2025
f4e6964
Add Microsoft.CodeAnalysis.Extensions package (#78388)
tmat May 14, 2025
2611c9a
Update XAML EA to use DocumentUri instead of System.Uri (#78555)
dibarbet May 14, 2025
986c13b
Update dependencies from https://github.com/dotnet/arcade build 20250…
akhera99 May 14, 2025
561bb89
Fix MoveType to create debuggable documents (#78554)
tmat May 14, 2025
4358d12
Move SpecializedCollections to Microsoft.CodeAnalysis.Collections nam…
tmat May 14, 2025
edcf817
Add a reference to the tracking bug for a workaround
jasonmalinowski May 14, 2025
8b7a926
Fix embedded language classification inside multi-line string
dibarbet May 15, 2025
c6ecc0d
Remove localized strings from Collections source package (#78576)
tmat May 15, 2025
79c2be6
Revert "Update XAML EA to use DocumentUri instead of System.Uri (#785…
dibarbet May 15, 2025
0eb510a
Fix embedded language classification inside multi-line string (#78588)
dibarbet May 15, 2025
533b425
Merge 'main' into 'extensions'
AlekseyTs May 15, 2025
3f63dd1
Revert "Update XAML EA to use DocumentUri instead of System.Uri (#785…
dibarbet May 15, 2025
ae499de
Add a reference to the tracking bug for a workaround (#78582)
jasonmalinowski May 15, 2025
6ca368c
Rename LSP messages for VisualStudio.Extensibility integration (#78598)
matteo-prosperi May 15, 2025
015a854
More improvements to source packages (#78587)
tmat May 15, 2025
bf171a6
Ensure we pass unique binlog paths to each BuildHost
jasonmalinowski May 15, 2025
12369bc
Clean up our SpellingExclusions
jasonmalinowski May 15, 2025
0d6bd9d
Ensure we pass unique binlog paths to each BuildHost (#78599)
jasonmalinowski May 16, 2025
7fa23f4
Track used assemblies of data section string literals (#78552)
jjonescz May 16, 2025
fb1d930
Support local functions in breadcrumbs
dibarbet May 16, 2025
a1b9c9b
hotfix to fix restore and stop including bin/obj artifacts in directo…
RikkiGibson May 16, 2025
4bd8e3b
Fix angle brackets in generics in hover
dibarbet May 16, 2025
f9f7546
more directly walk the tree for local functions and add tests
dibarbet May 17, 2025
74a8a6f
Give .NET Framework build task in sdk different identity (#78584)
jaredpar May 17, 2025
c3c7ad6
Fix angle brackets in generics in hover (#78621)
dibarbet May 17, 2025
26a9f7b
review feedback
dibarbet May 19, 2025
873ad37
Support local functions in outline/breadcrumbs (#78605)
dibarbet May 19, 2025
fcb913e
LSP: Fix batch builds for file-based programs and fix `"dotnet.projec…
RikkiGibson May 19, 2025
d219c4f
Convert operand of `true`/`false` operator invoked as part of `&&`/`|…
AlekseyTs May 19, 2025
42223e0
Merge 'main' into 'extensions'
AlekseyTs May 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
40 changes: 40 additions & 0 deletions .github/workflows/labeler-cache-retention.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Workflow template imported and updated from:
# https://github.com/dotnet/issue-labeler/wiki/Onboarding
#
# See labeler.md for more information
#
# Regularly restore the prediction models from cache to prevent cache eviction
name: "Labeler: Cache Retention"

# For more information about GitHub's action cache limits and eviction policy, see:
# https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy

on:
schedule:
- cron: "24 19 * * *" # 19:24 every day (arbitrary time daily)

workflow_dispatch:
inputs:
cache_key:
description: "The cache key suffix to use for restoring the model from cache. Defaults to 'ACTIVE'."
required: true
default: "ACTIVE"

env:
CACHE_KEY: ${{ inputs.cache_key || 'ACTIVE' }}

jobs:
restore-cache:
# Do not automatically run the workflow on forks outside the 'dotnet' org
if: ${{ github.event_name == 'workflow_dispatch' || github.repository_owner == 'dotnet' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
type: ["issues", "pulls"]
steps:
- uses: dotnet/issue-labeler/restore@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
with:
type: ${{ matrix.type }}
cache_key: ${{ env.CACHE_KEY }}
fail-on-cache-miss: true
58 changes: 58 additions & 0 deletions .github/workflows/labeler-predict-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Workflow template imported and updated from:
# https://github.com/dotnet/issue-labeler/wiki/Onboarding
#
# See labeler.md for more information
#
# Predict labels for Issues using a trained model
name: "Labeler: Predict (Issues)"

on:
# Only automatically predict area labels when issues are first opened
issues:
types: opened

# Allow dispatching the workflow via the Actions UI, specifying ranges of numbers
workflow_dispatch:
inputs:
issues:
description: "Issue Numbers (comma-separated list of ranges)."
required: true
cache_key:
description: "The cache key suffix to use for restoring the model. Defaults to 'ACTIVE'."
required: true
default: "ACTIVE"

env:
# Do not allow failure for jobs triggered automatically (as this causes red noise on the workflows list)
ALLOW_FAILURE: ${{ github.event_name == 'workflow_dispatch' }}

LABEL_PREFIX: "Area-"
THRESHOLD: 0.40

jobs:
predict-issue-label:
# Do not automatically run the workflow on forks outside the 'dotnet' org
if: ${{ github.event_name == 'workflow_dispatch' || github.repository_owner == 'dotnet' }}
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: "Restore issues model from cache"
id: restore-model
uses: dotnet/issue-labeler/restore@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
with:
type: issues
fail-on-cache-miss: ${{ env.ALLOW_FAILURE }}
quiet: true

- name: "Predict issue labels"
id: prediction
if: ${{ steps.restore-model.outputs.cache-hit == 'true' }}
uses: dotnet/issue-labeler/predict@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
with:
issues: ${{ inputs.issues || github.event.issue.number }}
label_prefix: ${{ env.LABEL_PREFIX }}
threshold: ${{ env.THRESHOLD }}
env:
GITHUB_TOKEN: ${{ github.token }}
continue-on-error: ${{ !env.ALLOW_FAILURE }}
71 changes: 71 additions & 0 deletions .github/workflows/labeler-predict-pulls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Workflow template imported and updated from:
# https://github.com/dotnet/issue-labeler/wiki/Onboarding
#
# See labeler.md for more information
#
# Predict labels for Pull Requests using a trained model
name: "Labeler: Predict (Pulls)"

on:
# Per to the following documentation:
# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request_target
#
# The `pull_request_target` event runs in the context of the base of the pull request, rather
# than in the context of the merge commit, as the `pull_request` event does. This prevents
# execution of unsafe code from the head of the pull request that could alter the repository
# or steal any secrets you use in your workflow. This event allows your workflow to do things
# like label or comment on pull requests from forks.
#
# Only automatically predict area labels when pull requests are first opened
pull_request_target:
types: opened

# Configure the branches that need to have PRs labeled
branches:
- main

# Allow dispatching the workflow via the Actions UI, specifying ranges of numbers
workflow_dispatch:
inputs:
pulls:
description: "Pull Request Numbers (comma-separated list of ranges)."
required: true
cache_key:
description: "The cache key suffix to use for restoring the model. Defaults to 'ACTIVE'."
required: true
default: "ACTIVE"

env:
# Do not allow failure for jobs triggered automatically (this can block PR merge)
ALLOW_FAILURE: ${{ github.event_name == 'workflow_dispatch' }}

LABEL_PREFIX: "Area-"
THRESHOLD: 0.40

jobs:
predict-pull-label:
# Do not automatically run the workflow on forks outside the 'dotnet' org
if: ${{ github.event_name == 'workflow_dispatch' || github.repository_owner == 'dotnet' }}
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: "Restore pulls model from cache"
id: restore-model
uses: dotnet/issue-labeler/restore@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
with:
type: pulls
fail-on-cache-miss: ${{ env.ALLOW_FAILURE }}
quiet: true

- name: "Predict pull labels"
id: prediction
if: ${{ steps.restore-model.outputs.cache-hit == 'true' }}
uses: dotnet/issue-labeler/predict@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
with:
pulls: ${{ inputs.pulls || github.event.number }}
label_prefix: ${{ env.LABEL_PREFIX }}
threshold: ${{ env.THRESHOLD }}
env:
GITHUB_TOKEN: ${{ github.token }}
continue-on-error: ${{ !env.ALLOW_FAILURE }}
54 changes: 54 additions & 0 deletions .github/workflows/labeler-promote.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Workflow template imported and updated from:
# https://github.com/dotnet/issue-labeler/wiki/Onboarding
#
# See labeler.md for more information
#
# Promote a model from staging to 'ACTIVE', backing up the currently 'ACTIVE' model
name: "Labeler: Promotion"

on:
# Dispatched via the Actions UI, promotes the staged models from
# a staged slot into the prediction environment
workflow_dispatch:
inputs:
issues:
description: "Issues: Promote Model"
type: boolean
required: true
pulls:
description: "Pulls: Promote Model"
type: boolean
required: true
staged_key:
description: "The cache key suffix to use for promoting a staged model to 'ACTIVE'. Defaults to 'staged'."
required: true
default: "staged"
backup_key:
description: "The cache key suffix to use for backing up the currently active model. Defaults to 'backup'."
default: "backup"

permissions:
actions: write

jobs:
promote-issues:
if: ${{ inputs.issues }}
runs-on: ubuntu-latest
steps:
- name: "Promote Model for Issues"
uses: dotnet/issue-labeler/promote@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
with:
type: "issues"
staged_key: ${{ inputs.staged_key }}
backup_key: ${{ inputs.backup_key }}

promote-pulls:
if: ${{ inputs.pulls }}
runs-on: ubuntu-latest
steps:
- name: "Promote Model for Pull Requests"
uses: dotnet/issue-labeler/promote@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
with:
type: "pulls"
staged_key: ${{ inputs.staged_key }}
backup_key: ${{ inputs.backup_key }}
161 changes: 161 additions & 0 deletions .github/workflows/labeler-train.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
# Workflow template imported and updated from:
# https://github.com/dotnet/issue-labeler/wiki/Onboarding
#
# See labeler.md for more information
#
# Train the Issues and Pull Requests models for label prediction
name: "Labeler: Training"

on:
workflow_dispatch:
inputs:
type:
description: "Issues or Pull Requests"
type: choice
required: true
default: "Both"
options:
- "Both"
- "Issues"
- "Pull Requests"

steps:
description: "Training Steps"
type: choice
required: true
default: "All"
options:
- "All"
- "Download Data"
- "Train Model"
- "Test Model"

limit:
description: "Max number of items to download for training/testing the model (newest items are used). Defaults to the max number of pages times the page size."
type: number
page_size:
description: "Number of items per page in GitHub API requests. Defaults to 100 for issues, 25 for pull requests."
type: number
page_limit:
description: "Maximum number of pages to download for training/testing the model. Defaults to 1000 for issues, 4000 for pull requests."
type: number
cache_key_suffix:
description: "The cache key suffix to use for staged data/models (use 'ACTIVE' to bypass staging). Defaults to 'staged'."
required: true
default: "staged"

env:
CACHE_KEY: ${{ inputs.cache_key_suffix }}
REPOSITORY: ${{ github.repository }}
LABEL_PREFIX: "Area-"
THRESHOLD: "0.40"
LIMIT: ${{ inputs.limit }}
PAGE_SIZE: ${{ inputs.page_size }}
PAGE_LIMIT: ${{ inputs.page_limit }}

jobs:
download-issues:
if: ${{ contains(fromJSON('["Both", "Issues"]'), inputs.type) && contains(fromJSON('["All", "Download Data"]'), inputs.steps) }}
runs-on: ubuntu-latest
permissions:
issues: read
steps:
- name: "Download Issues"
uses: dotnet/issue-labeler/download@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
with:
type: "issues"
cache_key: ${{ env.CACHE_KEY }}
repository: ${{ env.REPOSITORY }}
label_prefix: ${{ env.LABEL_PREFIX }}
limit: ${{ env.LIMIT }}
page_size: ${{ env.PAGE_SIZE }}
page_limit: ${{ env.PAGE_LIMIT }}
env:
GITHUB_TOKEN: ${{ github.token }}

download-pulls:
if: ${{ contains(fromJSON('["Both", "Pull Requests"]'), inputs.type) && contains(fromJSON('["All", "Download Data"]'), inputs.steps) }}
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- name: "Download Pull Requests"
uses: dotnet/issue-labeler/download@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
with:
type: "pulls"
cache_key: ${{ env.CACHE_KEY }}
repository: ${{ env.REPOSITORY }}
label_prefix: ${{ env.LABEL_PREFIX }}
limit: ${{ env.LIMIT }}
page_size: ${{ env.PAGE_SIZE }}
page_limit: ${{ env.PAGE_LIMIT }}
env:
GITHUB_TOKEN: ${{ github.token }}

train-issues:
if: ${{ always() && contains(fromJSON('["Both", "Issues"]'), inputs.type) && contains(fromJSON('["All", "Train Model"]'), inputs.steps) && contains(fromJSON('["success", "skipped"]'), needs.download-issues.result) }}
runs-on: ubuntu-latest
permissions: {}
needs: download-issues
steps:
- name: "Train Model for Issues"
uses: dotnet/issue-labeler/train@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
with:
type: "issues"
data_cache_key: ${{ env.CACHE_KEY }}
model_cache_key: ${{ env.CACHE_KEY }}

train-pulls:
if: ${{ always() && contains(fromJSON('["Both", "Pull Requests"]'), inputs.type) && contains(fromJSON('["All", "Train Model"]'), inputs.steps) && contains(fromJSON('["success", "skipped"]'), needs.download-pulls.result) }}
runs-on: ubuntu-latest
permissions: {}
needs: download-pulls
steps:
- name: "Train Model for Pull Requests"
uses: dotnet/issue-labeler/train@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
with:
type: "pulls"
data_cache_key: ${{ env.CACHE_KEY }}
model_cache_key: ${{ env.CACHE_KEY }}

test-issues:
if: ${{ always() && contains(fromJSON('["Both", "Issues"]'), inputs.type) && contains(fromJSON('["All", "Test Model"]'), inputs.steps) && contains(fromJSON('["success", "skipped"]'), needs.train-issues.result) }}
runs-on: ubuntu-latest
permissions:
issues: read
needs: train-issues
steps:
- name: "Test Model for Issues"
uses: dotnet/issue-labeler/test@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
with:
type: "issues"
cache_key: ${{ env.CACHE_KEY }}
repository: ${{ env.REPOSITORY }}
label_prefix: ${{ env.LABEL_PREFIX }}
threshold: ${{ env.THRESHOLD }}
limit: ${{ env.LIMIT }}
page_size: ${{ env.PAGE_SIZE }}
page_limit: ${{ env.PAGE_LIMIT }}
env:
GITHUB_TOKEN: ${{ github.token }}

test-pulls:
if: ${{ always() && contains(fromJSON('["Both", "Pull Requests"]'), inputs.type) && contains(fromJSON('["All", "Test Model"]'), inputs.steps) && contains(fromJSON('["success", "skipped"]'), needs.train-pulls.result) }}
runs-on: ubuntu-latest
permissions:
pull-requests: read
needs: train-pulls
steps:
- name: "Test Model for Pull Requests"
uses: dotnet/issue-labeler/test@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
with:
type: "pulls"
cache_key: ${{ env.CACHE_KEY }}
repository: ${{ env.REPOSITORY }}
label_prefix: ${{ env.LABEL_PREFIX }}
threshold: ${{ env.THRESHOLD }}
limit: ${{ env.LIMIT }}
page_size: ${{ env.PAGE_SIZE }}
page_limit: ${{ env.PAGE_LIMIT }}
env:
GITHUB_TOKEN: ${{ github.token }}
Loading