Skip to content
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
19 changes: 19 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Summary

<!-- What changed and why? -->

## Validation

- [ ] `dotnet format AutoPowerMode.sln --verify-no-changes`
- [ ] Logic tests passed
- [ ] Windows Settings UI smoke test passed, or the limitation is explained below

## Checklist

- [ ] The change is focused and documented where needed.
- [ ] No generated build output, PDB files, local configuration, logs, or secrets are included.
- [ ] User-facing behavior changes are reflected in the relevant README or `CHANGELOG.md`.

## Notes

<!-- Mention Windows-only checks, compatibility concerns, or follow-up work. -->
45 changes: 45 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Contributing to AutoPowerMode

Thanks for helping improve AutoPowerMode. Contributions are welcome through
GitHub issues and pull requests.

## Before you start

- Search existing issues and pull requests before opening a new one.
- Do not report security vulnerabilities in a public issue. Follow
[SECURITY.md](SECURITY.md) instead.
- Remove personal paths, logs, configuration files, and other sensitive data
from diagnostic output before sharing it.

## Development environment

- .NET 8 SDK
- Windows 10 or later for running the application and the Windows UI smoke
test
- A non-Windows development machine can build the Windows-targeted solution
and run the logic tests, but cannot run the Windows UI smoke test locally.

Useful commands from the repository root:

```bash
dotnet restore AutoPowerMode.sln
dotnet format AutoPowerMode.sln --verify-no-changes
dotnet build AutoPowerMode.sln --configuration Release
dotnet run --project tests/AutoPowerMode.Tests/AutoPowerMode.Tests.csproj --configuration Release
# Windows only:
dotnet run --project tests/AutoPowerMode.WindowsUi.Tests/AutoPowerMode.WindowsUi.Tests.csproj --configuration Release
```

## Pull requests

- Keep each pull request focused on one coherent change.
- Add or update tests for behavior changes.
- Update `README.md`, `README.zh-CN.md`, or `CHANGELOG.md` when user-facing
behavior changes.
- Explain the validation you ran and call out any Windows-only validation you
could not perform.
- Do not commit `bin/`, `obj/`, `release/`, `publish/`, `dist/`, PDB files,
logs, local configuration, or secrets.

GitHub Actions runs formatting, logic tests, and the Windows Settings UI smoke
test for pull requests.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 VailElla

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,11 @@ dotnet run --project tests/AutoPowerMode.WindowsUi.Tests/AutoPowerMode.WindowsUi
```

The logic tests cover configuration migration, independently configurable dual-rate monitoring, idle protections, language selection and persistence, power-plan parsing, switch policies, notifications, DPI layout, log rotation and path sanitization, startup registration, and external override protection. The Windows-only smoke test opens the localized Settings form and exercises both wide and compact layouts.

## License and contributing

AutoPowerMode is open source software released under the [MIT License](LICENSE).
Contributions, bug reports, and focused pull requests are welcome. See
[CONTRIBUTING.md](CONTRIBUTING.md) for the development and validation workflow.
For security vulnerabilities, follow [SECURITY.md](SECURITY.md) instead of
opening a public issue.
7 changes: 7 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,10 @@ dotnet run --project tests/AutoPowerMode.WindowsUi.Tests/AutoPowerMode.WindowsUi
```

逻辑测试覆盖配置迁移、可独立配置的双频检测策略、空闲误触保护、语言选择与持久化、电源计划解析、切换策略、通知、DPI 布局、日志轮转与路径脱敏、开机自启和外部覆盖保护。Windows 专用冒烟测试会实际打开中英文设置窗口并验证宽窄布局切换。

## 开源协议与参与贡献

AutoPowerMode 是采用 [MIT 许可证](LICENSE) 发布的开源软件。欢迎提交
问题反馈和聚焦明确的 Pull Request;开发环境与验证流程请参阅
[CONTRIBUTING.md](CONTRIBUTING.md)。安全漏洞请按照 [SECURITY.md](SECURITY.md)
中的方式私下报告,不要直接创建公开 issue。
25 changes: 25 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Security Policy

## Supported versions

| Version | Supported |
| --- | --- |
| `main` | Yes |
| Latest release | Yes |
| Older releases | No |

## Reporting a vulnerability

Please do not report security vulnerabilities in public issues or pull
requests. Use GitHub's private vulnerability reporting feature for this
repository when it is available.

If private vulnerability reporting is unavailable, contact the maintainer
through the [VailElla GitHub profile](https://github.com/VailElla) and include:

- a description of the vulnerability and its potential impact;
- clear reproduction steps or a minimal proof of concept; and
- any suggested mitigation, if available.

Please avoid including passwords, access tokens, private user data, or other
secrets in a report.