From 63a3bc8e5b44df5295e0f3b259cd5e1524a004fd Mon Sep 17 00:00:00 2001 From: Vijay Soni Date: Sat, 29 Jun 2024 00:45:22 +0530 Subject: [PATCH 1/3] Implement PR Gate for TGramBot --- .github/workflows/pr-gate.yml | 32 ++++++++++++++++++++++++++++++++ CONTRIBUTING.md | 28 ++++++++++++++++++++++++++++ README.md | 13 ++++++++++++- 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pr-gate.yml create mode 100644 CONTRIBUTING.md diff --git a/.github/workflows/pr-gate.yml b/.github/workflows/pr-gate.yml new file mode 100644 index 0000000..cb6f57c --- /dev/null +++ b/.github/workflows/pr-gate.yml @@ -0,0 +1,32 @@ +name: PR Gate Workflow + +on: + pull_request: + branches: + - main + +jobs: + lint-test-build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ruff + + - name: Lint with Ruff + run: ruff . + + - name: Run tests + run: echo "Add commands to run tests here" + + - name: Build + run: echo "Add commands to build the project here" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..c38de76 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,28 @@ +# Contributing to TGramBot + +We welcome contributions to the TGramBot project. To ensure a smooth contribution process, please follow these guidelines. + +## Code of Conduct + +This project and everyone participating in it is governed by the TGramBot Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [project email]. + +## How to Submit a Pull Request + +1. Fork the repository and create your branch from `main`. +2. If you've added code that should be tested, add tests. +3. Ensure the test suite passes. +4. Make sure your code lints. +5. Issue that pull request! + +## Pull Request Review Process + +The project maintainers will review your pull request. They may request changes or provide feedback. Once approved, a maintainer will merge the pull request. + +## Coding Standards + +* Write clean, maintainable code. +* Follow the existing coding style (e.g., indentation, comments, naming conventions). +* Include meaningful commit messages. +* Update the README.md with details of changes to the interface, if applicable. + +Thank you for contributing to TGramBot! diff --git a/README.md b/README.md index cc5b8de..aea1cfb 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,17 @@ TGramBot A Telegram Bot Control Center to send messages to list of channels +## Contribution Guidelines + +To contribute to this project, please follow the guidelines below: + +- Fork the repository and create your branch from `main`. +- Make sure your code adheres to the coding standards and passes all the automated tests. +- Submit a pull request (PR) with your changes. +- Your PR will be reviewed by the maintainers, and feedback will be provided if necessary. +- Once approved, your PR will be merged into the main branch. + +Please note that all contributions must pass automated tests and adhere to the coding standards set for this project. ## Pre-requisites @@ -337,4 +348,4 @@ C:/Users//AppData/Local/ ~/Library/Application Support/ -``` \ No newline at end of file +``` From b9dafdf8a5461bc66c439c08f67f4d90aee5d1ce Mon Sep 17 00:00:00 2001 From: Vijay Soni Date: Sat, 29 Jun 2024 02:08:50 +0530 Subject: [PATCH 2/3] Update pr-gate.yml --- .github/workflows/pr-gate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-gate.yml b/.github/workflows/pr-gate.yml index cb6f57c..2829cb4 100644 --- a/.github/workflows/pr-gate.yml +++ b/.github/workflows/pr-gate.yml @@ -6,7 +6,7 @@ on: - main jobs: - lint-test-build: + pr-gate: runs-on: ubuntu-latest steps: - name: Checkout code From 90a3bcd822a4eb35354319d18e18b8cafeed8170 Mon Sep 17 00:00:00 2001 From: Vijay Soni Date: Sat, 29 Jun 2024 02:09:49 +0530 Subject: [PATCH 3/3] Update pr-gate.yml --- .github/workflows/pr-gate.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-gate.yml b/.github/workflows/pr-gate.yml index 2829cb4..7717f1a 100644 --- a/.github/workflows/pr-gate.yml +++ b/.github/workflows/pr-gate.yml @@ -20,13 +20,13 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install ruff + pip install ruff pytest - name: Lint with Ruff - run: ruff . + run: ruff check . - name: Run tests - run: echo "Add commands to run tests here" + run: pytest - name: Build - run: echo "Add commands to build the project here" + run: echo "TODO: Add commands to build the project here"