Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Pull Request] Changes about project. #277

Merged
merged 19 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/build-loaders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
dotnet-version: |
6.0.x
7.0.x
include-prerelease: false

- name: Build Loaders
working-directory: "KitX Standard/KitX Loaders"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
dotnet-version: |
6.0.x
7.0.x
include-prerelease: false

- name: Build Plugins
working-directory: "KitX Standard/KitX Plugins"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
dotnet-version: |
6.0.x
7.0.x
include-prerelease: false

- name: Build Contracts
working-directory: "KitX Standard/KitX Contracts"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check Pull Request Title
name: Format Pull Request Title

on:
pull_request:
Expand Down Expand Up @@ -28,7 +28,7 @@ jobs:
run: |
pull_request_number=${{ github.event.pull_request.number }}
current_title="${{ github.event.pull_request.title }}"
updated_title=$(python3 "./ToolKits/Actions/pr_auto_rename.py" "$current_title")
updated_title=$(python3 "./ToolKits/Actions/pr_format.py" "$current_title")

curl -X PATCH \
-H "Authorization: Bearer ${{ secrets.GITHUBTOKEN }}" \
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build-on-ubuntu:
runs-on: ubuntu-latest
environment: Publish Packages
if: "contains(github.event.head_commit.message, '[Publish Packages]')"
if: contains(github.event.head_commit.message, '[Publish Packages]')

steps:
- uses: actions/checkout@v3
Expand All @@ -25,7 +25,6 @@ jobs:
dotnet-version: |
6.0.x
7.0.x
include-prerelease: false

- name: Add to GitHub Repo
run: |
Expand Down
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@

# Ignore for special folders
## Platform Ignore
*.DS_Store

## Ignore for special folders
KitX\ Build/
KitX\ Publish/

# Ignore for IDE settings
## Ignore for IDE settings
.idea/
.vscode/

Expand Down
2 changes: 1 addition & 1 deletion KitX Clients/KitX Dashboard
Submodule KitX Dashboard updated 45 files
+111 −110 .github/workflows/auto-build.yml
+1 −1 KitX Dashboard Assets/KitX.Dashboard.Assets.csproj
+1 −1 KitX Dashboard Core/KitX.Dashboard.Core.csproj
+1 −1 KitX Dashboard Fonts/KitX.Dashboard.Fonts.csproj
+1 −1 KitX Dashboard Repair Tool/KitX.Dashboard.RepairTool.csproj
+1 −1 KitX Dashboard Updater/KitX.Dashboard.Updater.csproj
+0 −15 KitX Dashboard/App.axaml.cs
+0 −6 KitX Dashboard/Converters/WindowAttributesConverter.cs
+1 −49 KitX Dashboard/Data/AppConfig.cs
+1 −1 KitX Dashboard/Data/GlobalInfo.cs
+0 −3 KitX Dashboard/Data/MarketConfig.cs
+0 −26 KitX Dashboard/Helper.cs
+11 −11 KitX Dashboard/KitX.Dashboard.csproj
+0 −9 KitX Dashboard/Managers/ActivityManager.cs
+0 −4 KitX Dashboard/Managers/AnouncementManager.cs
+0 −27 KitX Dashboard/Managers/CacheManager.cs
+0 −32 KitX Dashboard/Managers/FileWatcherManager.cs
+6 −4 KitX Dashboard/Managers/PluginsManager.cs
+0 −12 KitX Dashboard/Managers/TasksManager.cs
+0 −24 KitX Dashboard/Managers/WebManager.cs
+4 −14 KitX Dashboard/Models/Plugin.cs
+23 −41 KitX Dashboard/Network/DevicesDiscoveryServer.cs
+29 −59 KitX Dashboard/Network/DevicesNetwork.cs
+2 −9 KitX Dashboard/Network/DevicesServer.cs
+11 −36 KitX Dashboard/Network/NetworkHelper.cs
+0 −42 KitX Dashboard/Network/NetworkStatus.cs
+5 −25 KitX Dashboard/Network/PluginsNetwork.cs
+0 −7 KitX Dashboard/Network/PluginsServer.cs
+0 −31 KitX Dashboard/Services/DebugService.cs
+7 −18 KitX Dashboard/Services/EventService.cs
+10 −8 KitX Dashboard/ViewModels/Pages/Controls/DeviceCardViewModel.cs
+0 −3 KitX Dashboard/ViewModels/Pages/Controls/Home_RecentUseViewModel.cs
+5 −5 KitX Dashboard/ViewModels/Pages/Controls/PluginBarViewModel.cs
+4 −2 KitX Dashboard/ViewModels/Pages/Controls/PluginCardViewModel.cs
+1 −1 KitX Dashboard/ViewModels/Pages/Controls/Settings_PerformenceViewModel.cs
+4 −2 KitX Dashboard/ViewModels/Pages/Controls/Settings_UpdateViewModel.cs
+0 −6 KitX Dashboard/ViewModels/Pages/LibPageViewModel.cs
+6 −4 KitX Dashboard/ViewModels/Pages/RepoPageViewModel.cs
+9 −12 KitX Dashboard/ViewModels/PluginDetailWindowViewModel.cs
+0 −51 KitX Dashboard/Views/MainWindow.axaml.cs
+3 −1 KitX Dashboard/Views/Pages/Controls/DeviceCard.axaml.cs
+3 −1 KitX Dashboard/Views/Pages/Controls/PluginCard.axaml.cs
+0 −11 KitX Dashboard/Views/Pages/HomePage.axaml.cs
+0 −11 KitX Dashboard/Views/Pages/SettingsPage.axaml.cs
+3 −1 KitX Dashboard/Views/PluginDetailWindow.axaml.cs
2 changes: 1 addition & 1 deletion KitX Clients/KitX Mobile
Submodule KitX Mobile updated 49 files
+3 −0 .gitignore
+10 −0 KitX Mobile.code-workspace
+30 −29 README.md
+0 −0 kitx_mobile/init_packages.sh
+1 −1 kitx_mobile/ios/Flutter/AppFrameworkInfo.plist
+32 −23 kitx_mobile/ios/Podfile.lock
+37 −3 kitx_mobile/ios/Runner.xcodeproj/project.pbxproj
+1 −1 kitx_mobile/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+117 −119 kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-1024.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-38@2x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-38@3x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-64@2x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-64@3x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-68@2x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
+ kitx_mobile/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
+30 −2 kitx_mobile/ios/Runner/Info.plist
+10 −3 kitx_mobile/lib/data/local_network_info.dart
+26 −19 kitx_mobile/lib/data/third_party_licenses_provider.dart
+13 −0 kitx_mobile/lib/instances.dart
+1 −1 kitx_mobile/lib/main.dart
+46 −33 kitx_mobile/lib/services/devices_discovery_service.dart
+1 −30 kitx_mobile/lib/utils/datetime_format.dart
+19 −18 kitx_mobile/pubspec.yaml
+36 −0 kitx_mobile/update-version.py
2 changes: 1 addition & 1 deletion KitX Clients/KitX Website
Submodule KitX Website updated 100 files
2 changes: 1 addition & 1 deletion KitX Docs
2 changes: 1 addition & 1 deletion KitX SDK
Submodule KitX SDK updated 2 files
+3 −0 .gitmodules
+1 −0 Cheese
2 changes: 1 addition & 1 deletion KitX Standard/KitX File Formats
2 changes: 1 addition & 1 deletion KitX Standard/KitX Rules
23 changes: 23 additions & 0 deletions KitX.sln
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KitX.Formats.KXP", "KitX St
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KitX.Dashboard", "KitX Clients\KitX Dashboard\KitX Dashboard\KitX.Dashboard.csproj", "{1DA8715C-E5A1-40CC-9C6C-F39E90A0C3E7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cheese", "KitX SDK\Cheese\Cheese.csproj", "{9663A503-6B07-4F77-A5F5-CF3DC6C682BC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -849,6 +851,26 @@ Global
{1DA8715C-E5A1-40CC-9C6C-F39E90A0C3E7}.Release|x64.Build.0 = Release|Any CPU
{1DA8715C-E5A1-40CC-9C6C-F39E90A0C3E7}.Release|x86.ActiveCfg = Release|Any CPU
{1DA8715C-E5A1-40CC-9C6C-F39E90A0C3E7}.Release|x86.Build.0 = Release|Any CPU
{9663A503-6B07-4F77-A5F5-CF3DC6C682BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9663A503-6B07-4F77-A5F5-CF3DC6C682BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9663A503-6B07-4F77-A5F5-CF3DC6C682BC}.Debug|ARM.ActiveCfg = Debug|Any CPU
{9663A503-6B07-4F77-A5F5-CF3DC6C682BC}.Debug|ARM.Build.0 = Debug|Any CPU
{9663A503-6B07-4F77-A5F5-CF3DC6C682BC}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{9663A503-6B07-4F77-A5F5-CF3DC6C682BC}.Debug|ARM64.Build.0 = Debug|Any CPU
{9663A503-6B07-4F77-A5F5-CF3DC6C682BC}.Debug|x64.ActiveCfg = Debug|Any CPU
{9663A503-6B07-4F77-A5F5-CF3DC6C682BC}.Debug|x64.Build.0 = Debug|Any CPU
{9663A503-6B07-4F77-A5F5-CF3DC6C682BC}.Debug|x86.ActiveCfg = Debug|Any CPU
{9663A503-6B07-4F77-A5F5-CF3DC6C682BC}.Debug|x86.Build.0 = Debug|Any CPU
{9663A503-6B07-4F77-A5F5-CF3DC6C682BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9663A503-6B07-4F77-A5F5-CF3DC6C682BC}.Release|Any CPU.Build.0 = Release|Any CPU
{9663A503-6B07-4F77-A5F5-CF3DC6C682BC}.Release|ARM.ActiveCfg = Release|Any CPU
{9663A503-6B07-4F77-A5F5-CF3DC6C682BC}.Release|ARM.Build.0 = Release|Any CPU
{9663A503-6B07-4F77-A5F5-CF3DC6C682BC}.Release|ARM64.ActiveCfg = Release|Any CPU
{9663A503-6B07-4F77-A5F5-CF3DC6C682BC}.Release|ARM64.Build.0 = Release|Any CPU
{9663A503-6B07-4F77-A5F5-CF3DC6C682BC}.Release|x64.ActiveCfg = Release|Any CPU
{9663A503-6B07-4F77-A5F5-CF3DC6C682BC}.Release|x64.Build.0 = Release|Any CPU
{9663A503-6B07-4F77-A5F5-CF3DC6C682BC}.Release|x86.ActiveCfg = Release|Any CPU
{9663A503-6B07-4F77-A5F5-CF3DC6C682BC}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -902,6 +924,7 @@ Global
{1CA8F49B-F083-47A1-BA93-6C5A4A25938E} = {CC0FBC12-F30C-480E-8FCA-A0382FB4F167}
{778C3C4C-E47A-4178-B6AC-D31657E08E7F} = {F1ED9B93-78A6-451D-A925-0F2BC2967FEF}
{1DA8715C-E5A1-40CC-9C6C-F39E90A0C3E7} = {0194E969-1457-4C16-AFAB-D2753DFA07F0}
{9663A503-6B07-4F77-A5F5-CF3DC6C682BC} = {69E9C41D-1848-4F9F-8C9C-0CAC1C167336}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {09BBC227-F41B-4D10-9E38-0EEE07ED17BC}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<p align="center">
<a href="https://kitx.apps.catrol.cn/" target="_blank" rel="noopener noreferrer">
<img width="128" src="https://img.catrol.cn/icons/projects/kitx/KitX.png" alt="KitX Logo">
<img width="128" src="https://github.com/Crequency/KitX/assets/50760269/d2f5ee3b-5e01-49d7-ae69-19318a74b8c2" alt="KitX Logo">
</a>
</p>

Expand Down
16 changes: 12 additions & 4 deletions ToolKits/Actions/check_new_commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@

print("Time delta: ", time_difference)

has_new_commit = time_difference > timedelta(days=days_deference)
env_to_add = "HAS_NEW_COMMIT="

if time_difference > timedelta(days=days_deference):
print("No new commit found. Check in env var: [HAS_NEW_COMMIT].")
os.putenv("HAS_NEW_COMMIT", "false")
print("No new commit found. Check in env var: [env.HAS_NEW_COMMIT].")
env_to_add = env_to_add + 'false'
else:
print("New commit found. Check in env var: [HAS_NEW_COMMIT].")
os.putenv("HAS_NEW_COMMIT", "true")
print("New commit found. Check in env var: [env.HAS_NEW_COMMIT].")
env_to_add = env_to_add + 'true'

command = "echo \"" + env_to_add + "\" >> $env:GITHUB_ENV"

with open('set_env.ps1', 'w', encoding='utf-8') as file:
file.write(command)
63 changes: 0 additions & 63 deletions ToolKits/Actions/pr_auto_rename.py

This file was deleted.

61 changes: 61 additions & 0 deletions ToolKits/Actions/pr_format.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
"""
Format the pull request title to the standard format.
"""

import sys
import re

# Chinese replacement.
replacemap = {
# Brackets.
"(": "(",
")": ")",
"『": "[",
"』": "]",
"「": "[",
"」": "]",
"【": "[",
"】": "]",
"〔": "{",
"〕": "}",
# Quotation marks.
"‘": "'",
"’": "'",
"“": '"',
"”": '"',
",": ", ",
"。": ". ",
";": "; ",
":": ": ",
"?": "? ",
"!": "! ",
"、": ", ",
"…": "...",
"—": "-",
"·": ".",
"~": "~",
}


HEAD = "[Pull Request]"
FORMAT_REGEX = r"^(\[?[pP][rR]\]?|\[?[pP][uU][lL][lL][- _]?[rR][eE][qQ][uU][eE][sS][tT]\]?|\[?[pP][uU][lL][lL]\]?)([^\n]*)$" # pylint: disable=line-too-long

if __name__ == "__main__":
if len(sys.argv) < 2:
print(f"Usage: python {sys.argv[0]} <title>")
sys.exit(1)
title = sys.argv[1]

# Step 1: Convert Chinese to English.
for key, value in replacemap.items():
title = title.replace(key, value)

# Step 2: Check and update the name of PR.
if not title.startswith(HEAD):
result = re.match(FORMAT_REGEX, title, re.M | re.I)
if result:
title = f"{HEAD} {result.group(2).strip()}"
else:
title = f"{HEAD} {title.strip()}"

print(title)
7 changes: 4 additions & 3 deletions commit.template.txt → commit-template.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@



# <emoji> <types>(<scope>): <subject>
# <emoji>: 💾/🔧/📄/🎇/🧩/✅/❌/📝/📦/🐛
# <types>: Feat/Fix/Docs/Style/Refactor/Test/Test/Chore/Struct/Bug
# demo: 💾 📝 📦 Feat, Chore, Struct(Scope): issue or changelog
# docs: https://docs.catrol.cn/rules/team/git/#%25E6%258F%2590%25E4%25BA%25A4%25E6%25B6%2588%25E6%2581%25AF%25E8%25A7%2584%25E8%258C%2583

# <body>

# <footer> (Breaking Changes)

# Date:
# Author:
# Date:
# Author:
Loading