Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: microsoft/WSL
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2.0.14
Choose a base ref
...
head repository: microsoft/WSL
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
56 changes: 56 additions & 0 deletions .github/actions/triage/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Run automated triage


inputs:
issue:
required: false
type: string
similar_issues_text:
required: false
type: string
comment:
required: false
type: string
token:
required: false
type: string
previous_body:
required: false
type: string

runs:
using: "composite"
steps:
- name: 'Run WTI'
if: ${{ !contains(inputs.similar_issues_text, '''@') }} # Skip this step if the description contains a string that will break the here document
shell: pwsh
env:
previous_body: "${{ inputs.previous_body }}"
run: |
$ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop
$message = @'
${{ inputs.similar_issues_text }}
'@
$maybe_message = @()
if (![string]::IsNullOrEmpty($message))
{
$maybe_message = @("--default-message-stdin")
}
$maybe_comment = @()
if (![string]::IsNullOrEmpty("${{ inputs.comment }}"))
{
$maybe_comment = @("--comment", "${{ inputs.comment }}")
}
$maybe_previous_body = @()
if (![string]::IsNullOrEmpty("$env:previous_body"))
{
$env:previous_body | Out-File -Encoding utf8 "triage\previous_body.txt"
$maybe_previous_body = @("--previous-issue-body", "previous_body.txt")
}
curl.exe -L https://github.com/OneBlue/wti/releases/download/v0.1.12/wti.exe -o triage/wti.exe
cd triage && echo -n $message | .\wti.exe --issue ${{ inputs.issue }} --config config.yml --github-token "${{ inputs.token }}" --ignore-tags @maybe_message @maybe_comment @maybe_previous_body
25 changes: 24 additions & 1 deletion .github/policies/resourceManagement.yml
Original file line number Diff line number Diff line change
@@ -23,7 +23,27 @@ configuration:
- closeIssue
- addReply:
reply: >-
This issue has been automatically closed since it has not had any author activity for the past **7 days**. If you're still experiencing this issue please re-open it.
This issue has been automatically closed since it has not had any author activity for the past **7 days**. If you're still experiencing this issue please re-file it as a new issue.
Thank you!
- description: Close year old issues
frequencies:
- weekday:
day: Thursday
time: 12:00
filters:
- isIssue
- isOpen
- isNotLabeledWith:
label: feature
- noActivitySince:
days: 365
actions:
- closeIssue
- addReply:
reply: >-
This issue has been automatically closed since it has not had any activity for the past **year**. If you're still experiencing this issue please re-file this as a new issue or feature request.
Thank you!
@@ -170,6 +190,9 @@ configuration:
[Click here](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue.
Thank you!
- addLabel:
label: needs-author-feedback
17 changes: 17 additions & 0 deletions .github/workflows/distributions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Validate distributions

on:
pull_request:
paths: ['distributions/**']

jobs:
check:
name: Validate distributions
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Run validation
run: python distributions/validate.py distributions/DistributionInfo.json
shell: bash
57 changes: 0 additions & 57 deletions .github/workflows/gh-sync.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/issue_edited.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Process edited issue

on:
workflow_dispatch:
issues:
types: [edited]

jobs:
getSimilarIssues:
runs-on: ubuntu-latest
outputs:
message: ${{ steps.getBody.outputs.message }}
steps:
- uses: actions/checkout@v2
- id: getBody
uses: craigloewen-msft/GitGudSimilarIssues@main
with:
issueTitle: ${{ github.event.issue.title }}
issueBody: ${{ github.event.issue.body }}
repository: ${{ github.repository }}
similarityTolerance: "0.7"
commentBody: |
# View similar issues
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!
wti:
name: Run wti
needs: getSimilarIssues
runs-on: windows-2022
permissions:
issues: write
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: ./.github/actions/triage
with:
similar_issues_text: "${{ needs.getSimilarIssues.outputs.message }}"
issue: "${{ github.event.issue.number }}"
previous_body: "${{ github.event.changes.body.from }}"
token: ${{ secrets.GITHUB_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/modern-distributions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Validate tar based distributions

on:
pull_request:
paths: ['distributions/**']

jobs:
check:
name: Validate tar based distributions changes
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install pip packages
run: pip install -r distributions/requirements.txt
shell: bash

- name: Run validation
run: |
python distributions/validate-modern.py \
--repo-path . \
--compare-with-branch 'origin/${{ github.base_ref }}' \
--manifest distributions/DistributionInfo.json \
--github-token '${{ secrets.GITHUB_TOKEN }}' \
--github-pr '${{ github.event.pull_request.number }}' \
--github-commit '${{ github.sha }}'
shell: bash
40 changes: 40 additions & 0 deletions .github/workflows/new_issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Process new issue

on:
workflow_dispatch :
issues:
types: [opened]

jobs:
getSimilarIssues:
runs-on: ubuntu-latest
outputs:
message: ${{ steps.getBody.outputs.message }}
steps:
- uses: actions/checkout@v2
- id: getBody
uses: craigloewen-msft/GitGudSimilarIssues@main
with:
issueTitle: ${{ github.event.issue.title }}
issueBody: ${{ github.event.issue.body }}
repository: ${{ github.repository }}
similarityTolerance: "0.7"
commentBody: |
# View similar issues
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!
wti:
name: Run wti
needs: getSimilarIssues
runs-on: windows-2022
if: 'always()' # Run even if getSimilarIssues fails
permissions:
issues: write
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: ./.github/actions/triage
with:
similar_issues_text: "${{ needs.getSimilarIssues.outputs.job_status == 'success' && needs.getSimilarIssues.outputs.message || '' }}"
issue: "${{ github.event.issue.number }}"
token: ${{ secrets.GITHUB_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/new_issue_comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Process new comment on issue

on:
workflow_dispatch :
issue_comment:
types: [created]

jobs:
wti:
name: Run wti
runs-on: windows-2022
permissions:
issues: write
if: ${{ !github.event.issue.pull_request && github.event.issue.user.id == github.event.comment.user.id }}
steps:
- name: Checkout repo
uses: actions/checkout@v4

- uses: ./.github/actions/triage
with:
issue: '${{ github.event.issue.number }}'
comment: '${{ github.event.comment.id }}'
token: ${{ secrets.GITHUB_TOKEN }}
32 changes: 0 additions & 32 deletions .github/workflows/similarissues.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/winget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish to Winget

on:
release:
types: [released]

jobs:
publish:
if: github.event.release.prerelease == false
runs-on: windows-latest # Action can only run on Windows
steps:
- name: Publish WSL
run: |
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$assets = '${{ toJSON(github.event.release.assets) }}' | ConvertFrom-Json
$wingetRelevantAssetx64 = $assets | Where-Object { $_.name -like '*x64.msi' } | Select-Object -First 1
$wingetRelevantAssetARM64 = $assets | Where-Object { $_.name -like '*arm64.msi' } | Select-Object -First 1
$version = "${{ github.event.release.tag_name }}"
$wingetx64URL = $wingetRelevantAssetx64.browser_download_url
$wingetARM64URL = $wingetRelevantAssetARM64.browser_download_url
$wingetPackage = "Microsoft.WSL"
& curl.exe -JLO https://aka.ms/wingetcreate/latest
& .\wingetcreate.exe update $wingetPackage -s -v $version -u "$wingetx64URL|x64" "$wingetARM64URL|arm64" -t "${{ secrets.WINGET_TOKEN }}"
Loading