diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..360d640 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,34 @@ +--- +name: Bug Report +about: Create a report to help us improve +title: "[BUG] A brief description of the bug" +labels: 'bug' +assignees: '' +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots or Screencasts** +If applicable, add screenshots or a short screen recording (GIF) to help explain your problem. + +**Environment (please complete the following information):** + - Operating System: [e.g. Windows 10, macOS Sonoma, Ubuntu 22.04] + - Obsidian Version: [e.g. 1.5.8] + - Checkbox Sync Plugin Version: [e.g. 1.1.0] + +**Additional context** +Add any other context about the problem here. For example: +- Does the issue happen with specific file content or structure? +- Does it happen with default plugin settings? +- Check the developer console (Ctrl+Shift+I or Cmd+Option+I), are there any errors related to 'checkbox-sync'? (Paste relevant errors here within code blocks ```like this```) \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..a6ace5e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature Request +about: Suggest an idea for this project +title: "[FEAT] A brief description of the feature" +labels: 'enhancement' +assignees: '' +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. How should the new feature work? + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context, mockups, or screenshots about the feature request here. Why would this feature be useful to other users? \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..bb6002c --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,57 @@ + + +**Type of Change** + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] Refactoring (internal code improvements, no user-facing changes) +- [ ] Documentation update +- [ ] Other (please describe): + +**Related Issue(s)** + + + + +- Fixes # +- Related to # + +**Proposed Changes** + + + +- +- +- + +**Testing Steps** + + + + + + + +1. +2. +3. + +**Checklist** + + +- [ ] My code follows the style guidelines of this project (if any). +- [ ] I have performed a self-review of my own code. +- [ ] I have commented my code where necessary, particularly in hard-to-understand areas. +- [ ] I have made corresponding changes to the documentation (in the `/docs` folder). +- [ ] My changes generate no new warnings. +- [ ] I have added tests that prove my fix is effective or that my feature works (if applicable). +- [ ] New and existing unit tests pass locally with my changes (if applicable). +- [ ] Any dependent changes have been merged and published in downstream modules. + +**Additional Information** + + \ No newline at end of file diff --git a/.github/workflows/tg_notify.yml b/.github/workflows/tg_notify.yml index aef7ec0..314d9b0 100644 --- a/.github/workflows/tg_notify.yml +++ b/.github/workflows/tg_notify.yml @@ -11,19 +11,57 @@ on: types: [submitted] jobs: - build: - name: Build + notify_telegram: # Переименовал job для ясности + name: Notify Telegram runs-on: ubuntu-latest steps: - - name: send telegram message on push + - name: Prepare notification message + id: prepare_message # Добавляем ID шагу, чтобы ссылаться на его output + run: | + TITLE="${{ github.event.issue.title || github.event.pull_request.title || 'Комментарий' }}" + BODY="${{ github.event.issue.body || github.event.comment.body || github.event.review.body || '' }}" # Добавил github.event.review.body для pull_request_review + URL="${{ github.event.issue.html_url || github.event.pull_request.html_url || github.event.comment.html_url || github.event.review.html_url }}" + + # Формируем полное сообщение + FULL_MESSAGE="Репозиторий: ${{ github.repository }} + Тип: ${{ github.event_name }} + Действие: ${{ github.event.action }} + Заголовок: ${TITLE} + ${BODY} + Подробнее: ${URL}" + + # Формируем короткое сообщение + SHORT_MESSAGE="Репозиторий: ${{ github.repository }} + Тип: ${{ github.event_name }} + Действие: ${{ github.event.action }} + Заголовок: ${TITLE} + Произошло обновление. Подробнее: ${URL}" + + # Проверяем длину полного сообщения (приблизительно, т.к. точный лимит зависит от кодировки и спецсимволов, но 3800 должно быть безопасно) + # Лимит Telegram 4096. Оставляем запас. + MAX_LENGTH=3800 + + if [ ${#FULL_MESSAGE} -gt $MAX_LENGTH ]; then + echo "Сообщение слишком длинное, отправляем короткую версию." + # Используем echo -e для корректной обработки многострочности и сохраняем в переменную окружения для следующего шага + echo "TELEGRAM_MESSAGE<> $GITHUB_ENV + echo -e "${SHORT_MESSAGE}" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + else + echo "TELEGRAM_MESSAGE<> $GITHUB_ENV + echo -e "${FULL_MESSAGE}" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + fi + # Важно: нужно корректно обрабатывать пустые значения, если некоторых полей нет в событии + env: + TITLE: ${{ github.event.issue.title || github.event.pull_request.title || 'Комментарий к событию' }} + BODY: ${{ github.event.issue.body || github.event.comment.body || github.event.review.body || '' }} # Если комментарий пуст или это не событие комментария + URL: ${{ github.event.issue.html_url || github.event.pull_request.html_url || github.event.comment.html_url || github.event.review.html_url }} + + - name: Send Telegram Message uses: appleboy/telegram-action@master with: to: ${{ secrets.TELEGRAM_CHAT_ID }} token: ${{ secrets.TELEGRAM_BOT_TOKEN }} - message: | - Repository: ${{ github.repository }} - Type: ${{ github.event_name }} - Action: ${{ github.event.action }} - Titile: ${{ github.event.issue.title || github.event.pull_request.title || 'Комментарий' }} - ${{github.event.comment.body || ''}} - See ${{ github.event.issue.html_url || github.event.pull_request.html_url || github.event.comment.html_url || github.event.review.html_url }} + message: ${{ env.TELEGRAM_MESSAGE }} # Используем подготовленное сообщение + format: markdown # Или html, если хотите использовать разметку в сообщениях diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..7bf78bf --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,31 @@ +# Code of Conduct / Кодекс Поведения + +## English + +This project encourages open and free communication among its participants. We believe diverse perspectives and constructive discussions are valuable. + +All interactions related to this project (including issues, pull requests, comments, etc.) are expected to adhere to the **[GitHub Community Guidelines](https://docs.github.com/en/site-policy/github-community-guidelines)** and **[GitHub Terms of Service](https://docs.github.com/en/site-policy/github-terms/github-terms-of-service)**. + +We ask participants to be generally respectful and stay focused on topics relevant to the project. Behavior that violates GitHub's policies is not acceptable. + +Project maintainers reserve the right to moderate discussions (e.g., close off-topic issues, delete inappropriate comments, or block disruptive users) primarily to ensure compliance with GitHub's platform rules and maintain a productive environment focused on the project itself. + +**Disclaimer:** Project maintainers primarily act as moderators to keep discussions focused and aligned with GitHub's policies. They are not responsible for mediating all disputes or interpreting nuanced applications of GitHub's rules. Significant platform policy issues should be addressed through GitHub's official reporting mechanisms. Maintainers contribute voluntarily and response times may vary. + +By participating in this project, you agree to abide by these principles and GitHub's platform rules. + +--- + +## Русский + +Этот проект поощряет открытое и свободное общение между участниками. Мы верим в ценность различных точек зрения и конструктивных обсуждений. + +Ожидается, что все взаимодействия, связанные с этим проектом (включая issues, pull requests, комментарии и т.д.), будут соответствовать **[Правилам Сообщества GitHub](https://docs.github.com/ru/site-policy/github-community-guidelines)** и **[Условиям Обслуживания GitHub](https://docs.github.com/ru/site-policy/github-terms/github-terms-of-service)**. + +Мы просим участников быть взаимно уважительными и фокусироваться на темах, относящихся к проекту. Поведение, нарушающее политики GitHub, неприемлемо. + +Сопровождающие (мейнтенеры) проекта оставляют за собой право модерировать обсуждения (например, закрывать issues не по теме, удалять неуместные комментарии или блокировать деструктивных пользователей) в первую очередь для обеспечения соответствия правилам платформы GitHub и поддержания продуктивной среды, сфокусированной на самом проекте. + +**Отказ от ответственности:** Сопровождающие (мейнтенеры) проекта действуют в качестве модераторов в первую очередь для поддержания сфокусированности обсуждений и их соответствия политикам GitHub. Они не несут ответственности за разрешение всех споров или интерпретацию неявных применений правил GitHub. О серьезных нарушениях правил платформы следует сообщать через официальные механизмы GitHub. Мейнтенеры вносят свой вклад на добровольной основе, и время ответа может варьироваться. + +Участвуя в этом проекте, вы соглашаетесь следовать этим принципам и правилам платформы GitHub. \ No newline at end of file diff --git a/README.md b/README.md index 570e5fe..81aa9fa 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ It automatically updates parent checkboxes based on their children's state, and * Respects list indentation for nested hierarchies. * Flexible checkbox symbol interpretation (define checked/unchecked/ignored symbols). * Option to disable automatic sync on file open. -* File Ignore Rules. +* File Ignore Rules. ## Quick Links diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..57bf277 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,13 @@ +# Security Policy + +## Supported Versions + +We are committed to addressing security issues in the **latest release** of the Checkbox Sync plugin available in the Obsidian Community Plugins store. + +## Reporting a Vulnerability + +If you discover a security vulnerability, please report it privately through **GitHub's private vulnerability reporting feature**. You can find instructions on how to do this [here](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability). + +**Please do not report security vulnerabilities through public GitHub issues.** + +We aim to acknowledge receipt of your report within 48 hours and will work with you to understand and address the issue. We appreciate your efforts in responsibly disclosing your findings. diff --git a/docs/Integration with Tasks plugin.md b/docs/Integration_with_Tasks_plugin.md similarity index 100% rename from docs/Integration with Tasks plugin.md rename to docs/Integration_with_Tasks_plugin.md diff --git a/docs/changelog.md b/docs/changelog.md index fb546a0..096ac1b 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -9,7 +9,7 @@ nav_order: 3 - Added Feature: **Logging Toggle:** Add a setting to enable/disable detailed logging for debugging purposes. - Added Feature **File/Folder Scope Filter:** Implement settings to include or exclude specific files or folders where the plugin should be active. - Added Feature: **Support Non-Checkbox Nodes:** Added support for list-item and plain text inside the checkbox tree -- Added [Integration with Tasks plugin]("Integration with Tasks plugin.md") +- Added [Integration with Tasks plugin](Integration_with_Tasks_plugin.md) ### Changed - Transition to tree structure diff --git a/docs/index.md b/docs/index.md index c4bc6f3..c70bd40 100644 --- a/docs/index.md +++ b/docs/index.md @@ -24,7 +24,7 @@ This provides flexibility in how you manage your task lists, allowing you to cus * [Roadmap](roadmap.md) * [Installation Guide](installation.md) * [Contributing Guide](contributing.md) -* [Integration with Tasks plugin]("Integration with Tasks plugin.md") +* [Integration with Tasks plugin](Integration_with_Tasks_plugin.md) ### Acknowledgments * [Obsidian](https://obsidian.md/) — a platform for creating and organizing notes. @@ -49,7 +49,7 @@ This provides flexibility in how you manage your task lists, allowing you to cus * [Планы (Roadmap)](roadmap.md) * [Руководство по установке](installation.md) * [Руководство для контрибьюторов](contributing.md) -* [Интеграция с Tasks plugin]("Integration with Tasks plugin.md") +* [Интеграция с Tasks plugin](Integration_with_Tasks_plugin.md) ### Благодарности * [Obsidian](https://obsidian.md/) — платформа для создания и организации заметок.