From ec6067c8ddf3f3a50b59bb64cc3e6dd386a9a07e Mon Sep 17 00:00:00 2001 From: konard Date: Sat, 25 Apr 2026 05:22:01 +0000 Subject: [PATCH 1/2] Initial commit with task details Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: https://github.com/xlabtg/Teleton-Client/issues/34 --- .gitkeep | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitkeep diff --git a/.gitkeep b/.gitkeep new file mode 100644 index 0000000..9148f1a --- /dev/null +++ b/.gitkeep @@ -0,0 +1 @@ +# .gitkeep file auto-generated at 2026-04-25T05:22:01.164Z for PR creation at branch issue-34-c6c473c0b4fb for issue https://github.com/xlabtg/Teleton-Client/issues/34 \ No newline at end of file From cf8674594ffe3e39cd0c3bedf2d35f54243ee710 Mon Sep 17 00:00:00 2001 From: konard Date: Sat, 25 Apr 2026 05:24:38 +0000 Subject: [PATCH 2/2] Add GitHub contribution templates --- .github/ISSUE_TEMPLATE/bug_report.yml | 70 +++++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_task.yml | 66 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/subtask.yml | 2 +- .github/pull_request_template.md | 26 +++++++++ .gitkeep | 1 - README.md | 5 ++ docs/contributing-templates.md | 21 ++++++++ scripts/validate-foundation.mjs | 4 ++ test/foundation.test.mjs | 31 +++++++++++ 9 files changed, 224 insertions(+), 2 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_task.yml create mode 100644 .github/pull_request_template.md delete mode 100644 .gitkeep create mode 100644 docs/contributing-templates.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..4eb0e05 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,70 @@ +name: Bug report +description: Report a reproducible Teleton Client defect. +title: "[Bug] " +labels: + - bug +body: + - type: markdown + attributes: + value: | + Use this template for defects with a clear actual result and expected result. Do not include secrets, production credentials, access tokens, Telegram API hashes, private keys, or user-private message content. + - type: textarea + id: summary + attributes: + label: Summary + description: Describe the bug and the affected area. + validations: + required: true + - type: textarea + id: reproduce + attributes: + label: Steps to reproduce + description: Provide the smallest reliable reproduction. + placeholder: | + 1. Run ... + 2. Open ... + 3. Observe ... + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected behavior + description: Describe what should happen. + validations: + required: true + - type: textarea + id: actual + attributes: + label: Actual behavior + description: Describe what happens instead, including relevant error messages. + validations: + required: true + - type: textarea + id: environment + attributes: + label: Environment + description: Include OS, Node.js version, package manager, app platform, and relevant dependency versions. + placeholder: | + - OS: + - Node.js: + - Platform: + validations: + required: true + - type: textarea + id: logs + attributes: + label: Logs or screenshots + description: Add redacted logs, screenshots, or traces. Remove secrets, credentials, tokens, and private message content before posting. + validations: + required: false + - type: textarea + id: tests + attributes: + label: Tests or checks tried + description: List automated or manual checks already run, and whether they passed. + placeholder: | + - [ ] npm test + - [ ] npm run validate:foundation + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/feature_task.yml b/.github/ISSUE_TEMPLATE/feature_task.yml new file mode 100644 index 0000000..2ca3666 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_task.yml @@ -0,0 +1,66 @@ +name: Feature task +description: Propose bounded product, platform, or infrastructure work. +title: "[Task] " +labels: + - enhancement +body: + - type: markdown + attributes: + value: | + Use this template for planned Teleton Client work that is not a defect. Do not include secrets, production credentials, access tokens, Telegram API hashes, private keys, or user-private message content. + - type: textarea + id: problem + attributes: + label: Problem or goal + description: Describe the user, product, or engineering need. + validations: + required: true + - type: textarea + id: scope + attributes: + label: Scope + description: Describe the bounded implementation work and any explicit non-goals. + validations: + required: true + - type: textarea + id: acceptance + attributes: + label: Acceptance criteria + description: List measurable checks that prove the task is complete. + placeholder: | + - [ ] ... + - [ ] ... + validations: + required: true + - type: dropdown + id: phase + attributes: + label: Project area + options: + - Infrastructure and Core + - Connectivity Layer + - Teleton Agent Integration + - TON Blockchain Module + - Platform Wrappers + - Security and Licenses + - Testing and Release + - Other + validations: + required: true + - type: textarea + id: testing + attributes: + label: Testing plan + description: Describe the automated or manual validation expected for this work. + placeholder: | + - npm test + - npm run validate:foundation + validations: + required: true + - type: textarea + id: risks + attributes: + label: Risks and dependencies + description: Note compatibility, security, privacy, release, or upstream dependency risks. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/subtask.yml b/.github/ISSUE_TEMPLATE/subtask.yml index 35e21fc..65f0e2d 100644 --- a/.github/ISSUE_TEMPLATE/subtask.yml +++ b/.github/ISSUE_TEMPLATE/subtask.yml @@ -7,7 +7,7 @@ body: - type: markdown attributes: value: | - Use this template for work that belongs to the Teleton Client foundation epic. + Use this template for work that belongs to the Teleton Client foundation epic. Do not include secrets, production credentials, access tokens, Telegram API hashes, private keys, or user-private message content. - type: input id: parent attributes: diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..936fcc3 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,26 @@ +## Summary + +- + +## Issue + +Fixes # + +## Tests + +- [ ] `npm test` +- [ ] `npm run validate:foundation` +- [ ] Manual checks, if relevant: + +## Risk + +- + +## Screenshots or recordings + +Add before and after screenshots for UI changes, or write `Not applicable`. + +## Security and privacy + +- [ ] This PR does not include secrets, production credentials, access tokens, Telegram API hashes, private keys, or private message content. +- [ ] Any logs, screenshots, or fixtures are redacted. diff --git a/.gitkeep b/.gitkeep deleted file mode 100644 index 9148f1a..0000000 --- a/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -# .gitkeep file auto-generated at 2026-04-25T05:22:01.164Z for PR creation at branch issue-34-c6c473c0b4fb for issue https://github.com/xlabtg/Teleton-Client/issues/34 \ No newline at end of file diff --git a/README.md b/README.md index ab58572..513eb04 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ This repository is in the foundation phase. The current implementation establish - Dependency-free Node.js validation and test suite. - Machine-readable backlog for the Teleton Client foundation epic. - Published GitHub subissues for the issue `#1` decomposition, tracked in the manifest. +- GitHub issue and pull request templates for reproducible, secret-free contributions. - Dry-run and idempotent GitHub issue creation script for decomposing issue `#1`. - Shared cross-platform settings model for language, theme, notifications, agent mode, proxy, and secure references. - Baseline TDLib client adapter contract with mock-backed tests. @@ -41,6 +42,10 @@ The project is intended to evolve through these layers: See `docs/architecture.md`, `docs/backlog.md`, and `docs/tdlib-adapter.md` for the current foundation plan. +## Contribution Templates + +Use the GitHub issue templates for feature tasks, bug reports, and generated implementation subtasks. Pull requests should use the repository template to link issues, list tests, call out risks, and include screenshots for UI changes. See `docs/contributing-templates.md` for template expectations. + ## Issue Decomposition Preview the subissues generated from the epic: diff --git a/docs/contributing-templates.md b/docs/contributing-templates.md new file mode 100644 index 0000000..a1437d4 --- /dev/null +++ b/docs/contributing-templates.md @@ -0,0 +1,21 @@ +# Contribution Templates + +Teleton Client uses GitHub templates to keep issues and pull requests reproducible, reviewable, and safe to discuss publicly. + +## Feature Task Issues + +Use the feature task template for planned product, platform, infrastructure, documentation, or testing work. Define the goal, bounded scope, acceptance criteria, project area, and testing plan before implementation starts. + +## Bug Report Issues + +Use the bug report template for defects with observable expected and actual behavior. Include the smallest reliable reproduction, environment details, redacted logs, and the tests or checks already tried. + +## Generated Subtasks + +Use the implementation subtask template for tasks decomposed from the Teleton Client foundation epic. Keep the parent epic, phase, scope, acceptance criteria, and testing notes aligned with `config/epic-subtasks.json`. + +## Pull Requests + +Pull requests should summarize the change, link the issue, list tests, call out risks, and include screenshots or recordings for UI work. PR descriptions should stay current as implementation details change. + +Never include secrets, production credentials, access tokens, Telegram API hashes, private keys, or private message content in issues, pull requests, logs, screenshots, or fixtures. diff --git a/scripts/validate-foundation.mjs b/scripts/validate-foundation.mjs index 1880dc1..0e67031 100644 --- a/scripts/validate-foundation.mjs +++ b/scripts/validate-foundation.mjs @@ -12,8 +12,12 @@ const requiredFiles = [ 'LICENSE', '.githooks/pre-commit', '.github/workflows/ci.yml', + '.github/ISSUE_TEMPLATE/bug_report.yml', + '.github/ISSUE_TEMPLATE/feature_task.yml', '.github/ISSUE_TEMPLATE/subtask.yml', + '.github/pull_request_template.md', 'config/epic-subtasks.json', + 'docs/contributing-templates.md', 'docs/architecture.md', 'docs/backlog.md', 'docs/tdlib-adapter.md' diff --git a/test/foundation.test.mjs b/test/foundation.test.mjs index 186c592..1fc6fc9 100644 --- a/test/foundation.test.mjs +++ b/test/foundation.test.mjs @@ -21,8 +21,12 @@ test('foundation artifacts required by issue 1 are present', () => { 'LICENSE', '.githooks/pre-commit', '.github/workflows/ci.yml', + '.github/ISSUE_TEMPLATE/bug_report.yml', + '.github/ISSUE_TEMPLATE/feature_task.yml', '.github/ISSUE_TEMPLATE/subtask.yml', + '.github/pull_request_template.md', 'config/epic-subtasks.json', + 'docs/contributing-templates.md', 'docs/tdlib-adapter.md' ]; @@ -31,6 +35,33 @@ test('foundation artifacts required by issue 1 are present', () => { } }); +test('GitHub templates collect reproducible, secret-free contribution details', async () => { + const templateFiles = [ + '.github/ISSUE_TEMPLATE/bug_report.yml', + '.github/ISSUE_TEMPLATE/feature_task.yml', + '.github/ISSUE_TEMPLATE/subtask.yml', + '.github/pull_request_template.md' + ]; + + for (const templateFile of templateFiles) { + const content = await readFile(pathFor(templateFile), 'utf8'); + assert.match(content, /test|reproduc/i, `${templateFile} should prompt for validation details`); + assert.match(content, /secret|credential|token/i, `${templateFile} should warn against secrets`); + } + + const bugTemplate = await readFile(pathFor('.github/ISSUE_TEMPLATE/bug_report.yml'), 'utf8'); + assert.match(bugTemplate, /Expected behavior/i); + assert.match(bugTemplate, /Actual behavior/i); + + const featureTemplate = await readFile(pathFor('.github/ISSUE_TEMPLATE/feature_task.yml'), 'utf8'); + assert.match(featureTemplate, /Acceptance criteria/i); + + const guide = await readFile(pathFor('docs/contributing-templates.md'), 'utf8'); + assert.match(guide, /feature task/i); + assert.match(guide, /bug report/i); + assert.match(guide, /pull request/i); +}); + test('epic backlog decomposes issue 1 into prioritized phases', async () => { const manifest = await readJson('config/epic-subtasks.json');