{"id":46614259,"url":"https://github.com/ws2git/pr-spark","last_synced_at":"2026-03-07T19:32:19.979Z","repository":{"id":311024382,"uuid":"1042237213","full_name":"ws2git/pr-spark","owner":"ws2git","description":"Automatically open pull requests between branches with GitHub’s API. Perfect for automation, workflows, and keeping your code in sync.","archived":false,"fork":false,"pushed_at":"2025-11-29T20:55:30.000Z","size":437,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-02T01:44:49.715Z","etag":null,"topics":["github","github-actions","github-automation","github-ci"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/ws2git.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-21T17:38:19.000Z","updated_at":"2025-11-29T20:51:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"00ca3c1b-873e-428e-9ce5-2555d64e59ff","html_url":"https://github.com/ws2git/pr-spark","commit_stats":null,"previous_names":["ws2git/pr-spark"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ws2git/pr-spark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ws2git%2Fpr-spark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ws2git%2Fpr-spark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ws2git%2Fpr-spark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ws2git%2Fpr-spark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ws2git","download_url":"https://codeload.github.com/ws2git/pr-spark/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ws2git%2Fpr-spark/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30227849,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T19:01:10.287Z","status":"ssl_error","status_checked_at":"2026-03-07T18:59:58.103Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["github","github-actions","github-automation","github-ci"],"created_at":"2026-03-07T19:32:17.884Z","updated_at":"2026-03-07T19:32:19.956Z","avatar_url":"https://github.com/ws2git.png","language":"TypeScript","readme":"# PR Spark\n\nAutomatically create pull requests between branches using GitHub's API for workflows and automation.\nThis GitHub Action is useful for teams who want to automate PR creation in CI/CD pipelines, branch synchronization, or cross-repository workflows.\n\n---\n\n## ✨ Features\n\n- **Automated PR Creation**: Create pull requests programmatically between any branches\n- **Cross-Repository Support**: Create PRs in different repositories within the same organization\n- **Flexible Configuration**: Customizable PR title, body, source, and destination branches\n- **Powered by GitHub API**: Uses official GitHub REST API for reliable PR management\n- **Organization-wide**: Can be used across any repository with proper permissions\n\n## 🛠️ Usage\n\n### 1. **Prerequisites**\n\n- Your workflow **must pass the necessary inputs** to this action\n- The GitHub token must have `repo` permissions to create pull requests\n- Source and destination branches must exist in the target repository\n\n### 2. **Example Workflow Integration**\n\n```yaml\nname: Quick PR Spark Test\n\non: [workflow_dispatch]\n\njobs:\n  quick-test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      \n      - name: Create test PR\n        uses: ws2git/pr-spark@v3\n        with:\n          github-token: ${{ secrets.GITHUB_TOKEN }}\n          owner: ${{ github.repository_owner }}\n          repo: ${{ github.event.repository.name }}\n          title: \"Quick Test PR\"\n          body: \"Testing PR Spark action functionality\"\n          source-branch: \"develop\"  # Adjust according to your branches.\n          dest-branch: \"main\" # Adjust according to your branches.\n```\n\n## 📥 Inputs\n\n| Name | Required | Description |\n|---|---|---|\n| `github-token` | Yes | GitHub token for authentication (requires repo scope) |\n| `owner` | Yes | The owner/organization of the target repository |\n| `repo` | Yes | The name of the target repository |\n| `title` | Yes | Pull Request title |\n| `body` | No | Pull Request body/description |\n| `source-branch` | Yes | The branch from which the PR will be opened |\n| `dest-branch` | Yes | The PR target branch |\n\n## 📤 Outputs\n\n| Name | Description |\n|---|---|\n| `pull-request-url` | URL of the created pull request |\n\n## ⚙️ How It Works\n\nThis action uses the GitHub REST API via Octokit to create pull requests. It validates all inputs, checks for branch conflicts, and creates the PR with the specified parameters.\n\n**Core logic:**\n```typescript\n// Creates PR using GitHub API\nawait octokit.rest.pulls.create({\n  owner,\n  repo,\n  title,\n  head: sourceBranch,\n  base: destBranch,\n  body\n});\n```\n\nIf source and destination branches are the same, or if required parameters are missing, the action fails with descriptive error messages.\n\n## 🛡️ Security and Authentication\n\nThis Action uses the **GitHub REST API** with a provided token for authentication.\n\n**Recommended**: For operations within the current repository, use the default **`${{ secrets.GITHUB_TOKEN }}`**:\n\n```yaml\nwith:\n  github-token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n**Cross-Repository Operations**: For creating PRs in different repositories, use a **PAT** (Personal Access Token) with `repo` scope stored as a secret:\n\n```yaml\nwith:\n  github-token: ${{ secrets.MY_PAT_WITH_REPO_SCOPE }}\n```\n\n**Never expose tokens in plain text.**\n\n## 📌 Notes\n\n⚠️ **Important Considerations:**\n\n- The source and destination branches must exist in the target repository\n- For cross-repository PRs, the token must have access to both source and target repositories\n- If a PR between the same branches already exists, the action will fail\n- Branch names are validated for proper Git format\n\n## 🔗 Related Documentation\n\n- [GitHub REST API - Pull Requests](https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#create-a-pull-request)\n- [GitHub Actions Documentation](https://docs.github.com/en/actions)\n- [Octokit.js Library](https://github.com/octokit/octokit.js)\n\n## ❓ Support\n\nIf you find a bug or have a question, [open an issue](https://github.com/ws2git/pr-spark/issues).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fws2git%2Fpr-spark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fws2git%2Fpr-spark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fws2git%2Fpr-spark/lists"}