diff --git a/.github/workflows/close-old-issues.yaml b/.github/workflows/close-old-issues.yaml new file mode 100644 index 0000000000..a37180c572 --- /dev/null +++ b/.github/workflows/close-old-issues.yaml @@ -0,0 +1,94 @@ +name: Close Inactive Issues + +on: + schedule: + - cron: '0 0 * * *' # Run daily + workflow_dispatch: # This line enables manual triggering +jobs: + close-issues: + runs-on: ubuntu-latest + permissions: + issues: write # Ensure necessary permissions for issues + + steps: + - name: Close inactive issues + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const octokit = github; + + // Get the repository owner and name + const { owner, repo } = context.repo; + + // Define the inactivity period (14 days) + const inactivityPeriod = new Date(); + inactivityPeriod.setDate(inactivityPeriod.getDate() - 14); + + const labelKeepIssue = 'Keep Issue Open'; + + try { + // Get all open issues with pagination + for await (const response of octokit.paginate.iterator(octokit.rest.issues.listForRepo, { + owner, + repo, + state: 'open', + })) { + const issues = response.data; + + // Close issues inactive for more than the inactivity period + for (const issue of issues) { + let closeIssue = true; + + // Get all Labels of issue, and compared each label with the labelKeepIssue const variable + try { + const respondIssueLabels = await octokit.request("GET /repos/{owner}/{repo}/issues/{issue_number}/labels", { + owner: owner, + repo: repo, + issue_number: issue.number + }); + const labels = respondIssueLabels.data; + + for (let i = 0; i < labels.length; i++) { + const label = labels[i] + if (label.name === labelKeepIssue) { + console.log(`Issue #${issue.number} will not be closed`); + closeIssue = false; + break; // Break from the loop, no need to check the remaining Labels. + } + } + } catch (error) { + console.error(`Error while Fetching Labels for Issue #${issue.number}, Error: ${error}`); + } + + if (!closeIssue) { + continue; // Skip the next bit of code + } + + const lastCommentDate = issue.updated_at; + if (new Date(lastCommentDate) < inactivityPeriod) { + try { + // Close the issue + await octokit.rest.issues.update({ + owner, + repo, + issue_number: issue.number, + state: 'closed', + }); + + // Add a comment + await octokit.rest.issues.createComment({ + owner, + repo, + issue_number: issue.number, + body: 'Closed due to inactivity', + }); + } catch (error) { + console.error(`Error updating or commenting on issue #${issue.number}: ${error}`); + } + } + } + } + } catch (error) { + console.error(`Error fetching issues: ${error}`); + } diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index cb18457296..7ee8ff8dfb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,12 +10,15 @@ jobs: build-runspace: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} - - name: Create local changes + - name: Compile project + shell: pwsh run: | - powershell.exe -f Compile.ps1 - - uses: stefanzweifel/git-auto-commit-action@v4.16.0 + Set-ExecutionPolicy Bypass -Scope Process -Force; ./Compile.ps1 + continue-on-error: false # Directly fail the job on error, removing the need for a separate check + - uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: Compile Winutil + if: success() \ No newline at end of file diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 6e64cdf2c9..a83604d444 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -27,13 +27,13 @@ jobs: - name: Install Pester run: | Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process - Install-Module -Name Pester -Force -AllowClobber + Install-Module -Name Pester -Force -SkipPublisherCheck -AllowClobber shell: pwsh - name: Run Pester tests run: | Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process - Invoke-Pester -Path 'pester/*.Tests.ps1' -EnableExit + Invoke-Pester -Path 'pester/*.Tests.ps1' -Output Detailed shell: pwsh env: diff --git a/config/applications.json b/config/applications.json old mode 100755 new mode 100644 diff --git a/screen-install.png b/screen-install.png old mode 100755 new mode 100644 diff --git a/xaml/inputApp.xaml b/xaml/inputApp.xaml new file mode 100644 index 0000000000..69a1dbe760 --- /dev/null +++ b/xaml/inputApp.xaml @@ -0,0 +1,1014 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xaml/inputFeatures.xaml b/xaml/inputFeatures.xaml new file mode 100644 index 0000000000..c57704c695 --- /dev/null +++ b/xaml/inputFeatures.xaml @@ -0,0 +1,43 @@ + + + + + + +