{"id":25382725,"url":"https://github.com/polka-codes/action","last_synced_at":"2025-04-09T13:38:43.902Z","repository":{"id":276892947,"uuid":"930148756","full_name":"polka-codes/action","owner":"polka-codes","description":"Github Action to polka.codes integration","archived":false,"fork":false,"pushed_at":"2025-03-10T03:35:53.000Z","size":964,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-10T04:31:57.852Z","etag":null,"topics":["ai","coding-assistant","github-action"],"latest_commit_sha":null,"homepage":"https://polka.codes","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/polka-codes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-10T06:40:53.000Z","updated_at":"2025-03-10T03:35:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"8319a7f3-2c25-44ee-8483-5b7cd80809dc","html_url":"https://github.com/polka-codes/action","commit_stats":null,"previous_names":["polka-codes/action"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polka-codes%2Faction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polka-codes%2Faction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polka-codes%2Faction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/polka-codes%2Faction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/polka-codes","download_url":"https://codeload.github.com/polka-codes/action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248050584,"owners_count":21039417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","coding-assistant","github-action"],"created_at":"2025-02-15T07:38:14.076Z","updated_at":"2025-04-09T13:38:43.896Z","avatar_url":"https://github.com/polka-codes.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Polka Codes GitHub Action\n\n[![Polka Codes](https://img.shields.io/badge/Powered%20by-Polka%20Codes-purple)](https://github.com/polka-codes/polka-codes)\n\nA GitHub Action that integrates with [Polka Codes](https://github.com/polka-codes/polka-codes) to implement autonomous coding agents in your GitHub workflows.\n\n## Overview\n\nThis action allows you to:\n- Automatically implement Github issue and open a pull request with the suggested changes\n- Read PR comments and implement suggested changes\n- Automatic bug fixing and code improvements\n\n## Security Considerations\n\n\u003e ⚠️ **Important Security Warning**\n\u003e\n\u003e This action processes comments as triggers for automated operations. This introduces potential security considerations:\n\u003e\n\u003e - Comments in issues and PRs are used as input for the action\n\u003e - Malicious content in comments could potentially be executed or processed\n\u003e - Without proper restrictions, any user who can comment could trigger the action\n\u003e\n\u003e **Recommended Security Measures:**\n\u003e\n\u003e 1. **Restrict Permissions**: Configure repository permissions to control who can trigger the action\n\u003e 2. **Use Controlled Triggers**: Consider using `workflow_dispatch` instead of comment-based triggers for more controlled execution\n\u003e 3. **Label Protection**: If using label-based triggers, restrict who can apply/remove relevant labels\n\u003e 4. **Review Automation**: Regularly audit automated operations and their triggers\n\u003e\n\u003e Always follow the principle of least privilege when configuring this action.\n\n## Installation\n\nAdd the action to your GitHub workflow:\n\n```yaml\n- uses: polka-codes/action@v1\n  with:\n    # Configure inputs based on your needs\n    issue_number: ${{ github.event.issue.number }}\n      task: Implement the issue\n      # or\n      # pr_number: ${{ github.event.pull_request.number }}\n      # task: Review the PR and fix any issues, improve documentation, improve test coverage if necessary.\n  env:\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n    POLKA_API_PROVIDER: openrouter\n    POLKA_MODEL: deepseek/deepseek-chat\n    POLKA_API_KEY: ${{ secrets.POLKA_API_KEY }}\n```\n\n## Configuration\n\n### Required Environment Variables\n\n- `GITHUB_TOKEN`: GitHub token for API access (automatically provided by GitHub Actions)\n- `POLKA_API_KEY`: API KEY for AI Service\n\nFor complete list of available environment variables, please refer to [Polka Codes](https://github.com/polka-codes/polka-codes?tab=readme-ov-file#environment-variables).\n\n### Action Inputs\n\n| Input | Description | Required | Default |\n|-------|-------------|----------|---------|\n| `issue_number` | The issue number to process | No | - |\n| `pr_number` | The pull request number to process | No | - |\n| `task` | Direct task description to process | No | - |\n| `config` | Path to the polka.codes config file(s) | No | `.polkacodes.yml` |\n\nNote: At least one of `issue_number`, `pr_number`, or `task` must be provided.\n\n## Usage Examples\n\n### Implement any issue labeled with 'polka.codes' label\n\n```yaml\nname: Implement issue\non:\n  issues:\n    types: [opened]\n    labels: ['polka.codes']\n\njobs:\n  implement:\n    if: contains(github.event.issue.labels.*.name, 'polka.codes'\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n      - name: Install dependencies\n        run: npm install\n      - name: Config git\n        run: |\n          git config --global user.name \"github-actions[bot]\"\n          git config --global user.email \"github-actions[bot]@users.noreply.github.com\"\n      - uses: polka-codes/action@master\n        with:\n          issue_number: ${{ github.event.issue.number }}\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          POLKA_API_KEY: ${{ secrets.POLKA_API_KEY }}\n```\n\n### Manual dispatch\n\n```yaml\nname: Implement issue\non:\n  workflow_dispatch:\n    inputs:\n      issue_number:\n        description: 'Issue number to process'\n        required: true\n        type: number\n\njobs:\n  implement:\n    runs-on: ubuntu-latest\n    steps:\n      # checkout and setup env\n      - uses: polka-codes/action@master\n        with:\n          issue_number: ${{ github.event.inputs.issue_number }}\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          POLKA_API_KEY: ${{ secrets.POLKA_API_KEY }}\n```\n\n```yaml\nname: Improve PR\non:\n  workflow_dispatch:\n    inputs:\n      pr_number:\n        description: 'PR number to process'\n        required: true\n        type: number\n\njobs:\n  implement:\n    runs-on: ubuntu-latest\n    steps:\n      # checkout and setup env\n      - uses: polka-codes/action@master\n        with:\n          pr_number: ${{ github.event.inputs.pr_number }}\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          POLKA_API_KEY: ${{ secrets.POLKA_API_KEY }}\n```\n\n### PR improvements\n\n```yaml\nname: Improve PR\non:\n    pull_request:\n    branches: [ \"master\" ]\n\njobs:\n  improve:\n    runs-on: ubuntu-latest\n    steps:\n      # checkout and setup env\n      - uses: polka-codes/action@master\n        with:\n          pr_number: ${{ github.event.inputs.pr_number }}\n          task: Review the PR and fix any issues, improve documentation, improve test coverage if necessary.\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          POLKA_API_KEY: ${{ secrets.POLKA_API_KEY }}\n```\n\n---\n*This README is generated by polka.codes*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolka-codes%2Faction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolka-codes%2Faction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolka-codes%2Faction/lists"}