{"id":28152729,"url":"https://github.com/lando/transfer-issue-action","last_synced_at":"2025-05-15T05:12:00.219Z","repository":{"id":40701069,"uuid":"416819959","full_name":"lando/transfer-issue-action","owner":"lando","description":"A GitHub Action for transferring issues between github repos with the ability to create a stub issue in the original repo.","archived":false,"fork":false,"pushed_at":"2025-02-18T23:11:54.000Z","size":157,"stargazers_count":5,"open_issues_count":5,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-06T23:35:13.859Z","etag":null,"topics":["devops","github-actions"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lando.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["lando","pirog"],"patreon":"devwithlando","open_collective":"devwithlando","custom":"https://lando.dev/join"}},"created_at":"2021-10-13T16:31:57.000Z","updated_at":"2024-11-08T16:51:07.000Z","dependencies_parsed_at":"2025-04-22T00:46:00.617Z","dependency_job_id":null,"html_url":"https://github.com/lando/transfer-issue-action","commit_stats":{"total_commits":60,"total_committers":5,"mean_commits":12.0,"dds":0.55,"last_synced_commit":"ed72cd18a184e820c5a1c8bf1ebfed9ef9302ccc"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lando%2Ftransfer-issue-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lando%2Ftransfer-issue-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lando%2Ftransfer-issue-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lando%2Ftransfer-issue-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lando","download_url":"https://codeload.github.com/lando/transfer-issue-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253592884,"owners_count":21932898,"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":["devops","github-actions"],"created_at":"2025-05-15T05:12:00.154Z","updated_at":"2025-05-15T05:12:00.209Z","avatar_url":"https://github.com/lando.png","language":"JavaScript","readme":"# Transfer Issue GitHub Action\r\n\r\nA GitHub Action for transferring issues between GitHub repos _within the same organization_ when they are labeled in a certain way.\r\n\r\nIt also has the ability to do the following:\r\n\r\n* Create a stub issue in the original issue that is closed and locked.  This allows for a better user experience when searching for issues in the old repo.  The stub issue will look _like_ the below but with details relevant to _your_ issue.\r\n\r\n  ```\r\n  @lando this is a stub issue that has been created as a placeholder in this repo.\r\n\r\n  Your original issue has been moved to [https://github.com/lando/transfer-issue-action/issues/53](https://github.com/lando/transfer-issue-action/issues/53)\r\n  ```\r\n\r\n* Apply labels to the transffered issue.\r\n\r\n## Events\r\n\r\nThis action was designed particularly for the below event but may work for other issue related events as well. YMMV.\r\n\r\n```yaml\r\non:\r\n  issues:\r\n    types:\r\n      - labeled\r\n```\r\n\r\n## Inputs\r\n\r\nInput | Description | Required | Default |\r\n----------|-------------|:----------:|:-------:|\r\n| `token` | A GitHub [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) created with repo access | yes | - |\r\n| `router` | A label to repo routing in the form \"LABEL:REPO\" | yes* |-|\r\n| `apply_label` | A label to apply on the new issue in the format \"LABEL:HEXCODE\" | yes* |-|\r\n| `create_stub` | Create a stub issue with title and description in original repo | no | `false` |\r\n| `debug` | Enable debug output | no | `false` |\r\n\r\n### Input Notes\r\n\r\n* The `GITHUB_TOKEN` secret provided by GitHub Actions will not work when transferring issues to another repo.  You will get the error `Resource not accessible by integration` if you try and use it.  Create a [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) with the `repo` check box and all its sub items checked.\r\n\r\n## Outputs\r\n\r\nOutput | Type | Description |\r\n----------|-------------|------------|\r\n| `destination_repo` | String | The name of the repo the issue was transferred to |\r\n| `new_issue_number` | String | The number of the new issue |\r\n| `new_issue_url` | String | The url of the new issue |\r\n| `stub_issue_number` | String | The number of the created issue stub |\r\n\r\n## Basic Example\r\n\r\nWhen an issue in the repo which implements this action is tagged with `holla` it gets transferred to within the same organization to a repo called `atcha`.\r\n\r\n```yaml\r\n- name: Transfer Issue \u0026 Create Stub\r\n  uses: lando/transfer-issue-action@v2\r\n  with:\r\n    token: ${{ secrets.TRANSFER_ISSUE_TOKEN }}\r\n    router: holla:atcha\r\n```\r\n\r\n## Labels Example\r\n\r\nDoes the same as above but when the new issue is created it applies the `Needs Triage` label and also creates a stub in the source repo.\r\n\r\n```yaml\r\n- name: Transfer Issue \u0026 Create Stub\r\n  uses: lando/transfer-issue-action@v2\r\n  with:\r\n    token: ${{ secrets.TRANSFER_ISSUE_TOKEN }}\r\n    router: holla:atcha\r\n    apply_label: \"Needs Triage:FF0000\"\r\n    create_stub: true\r\n```\r\n\r\n## Advanced Example\r\n\r\nIn this example, we are forgoing a stub and instead adding a comment to the tranferred issue via [https://github.com/actions/github-script](https://github.com/actions/github-script). Also note the use of `strategy.matrix.router` which allows us to route different labels to different repos.\r\n\r\n`strategy.matrix`\r\n```yaml\r\nstrategy:\r\n  matrix:\r\n    router:\r\n      - holla:lando\r\n      - things:cli\r\n```\r\n\r\n`steps`\r\n```yaml\r\n- name: Transfer Issue \u0026 Comment\r\n  uses: lando/transfer-issue-action@v2\r\n  id: transfer-issue\r\n  with:\r\n    token: ${{ secrets.TRANSFER_ISSUE_TOKEN }}\r\n    router: ${{ matrix.router }}\r\n- name: Update Transferred Issue\r\n  uses: actions/github-script@v5\r\n  if: steps.transfer-issue.outputs.new_issue_number != ''\r\n  with:\r\n    script: |\r\n      await github.rest.issues.createComment({\r\n        issue_number: `${{ steps.transfer-issue.outputs.new_issue_number}}`,\r\n        owner: context.repo.owner,\r\n        repo: `${{ steps.transfer-issue.outputs.destinatiom_repo }}`,\r\n        body: `@${ context.payload.issue.user.login } your issue is over here now!`\r\n      });\r\n```\r\n\r\n## Notes\r\n\r\nGraphQL Mutations for transferring a repo only allows you to tranfer repos within the same owner/org.\r\n\r\n## Changelog\r\n\r\nWe try to log all changes big and small in both [THE CHANGELOG](https://github.com/lando/transfer-issue-action/blob/main/CHANGELOG.md) and the [release notes](https://github.com/lando/transfer-issue-action/releases).\r\n\r\n## Development\r\n\r\n* Requires [Node 18+](https://nodejs.org/dist/latest-v14.x/)\r\n\r\n```bash\r\ngit clone https://github.com/lando/transfer-issue-action.git \u0026\u0026 cd transfer-issue-action\r\nnpm install\r\n```\r\n\r\nIf you dont' want to install Node 18+ for whatever reason you can install [Lando](https://docs.lando.dev/basics/installation.html) and use that:\r\n\r\n```bash\r\ngit clone https://github.com/lando/transfer-issue-action.git \u0026\u0026 cd transfer-issue-action\r\n# Install deps and get node\r\nlando start\r\n\r\n# Run commands\r\nlando node\r\nlando npm\r\n```\r\n\r\n## Testing\r\n\r\n```bash\r\n# Lint the code\r\nnpm run lint\r\n```\r\n\r\nYou can also open up a PR to test the action out.\r\n\r\nAdditionally you can manually create an issue in this repo and label it with either `manual_issue_transfer_action_test` or `holla-tronic` to test the action.\r\n\r\nNote that in both the PR and manual testing scenarios we will:\r\n\r\n* Close the transferred issue _and_ stubbed issue if applicable for cleanliness purposes. Therefore you will want to look in the closed issues for evidence of the transfer.\r\n* Transfer the issue to the same repo as the one generating it eg from `lando/transfer-issue-action` to `lando/transfer-issue-action`. You can see that the transfer has happened by inspecting the transferred issue and noting the `lando-droid transferred this issue from lando/transfer-issue-action...` entry.\r\n\r\n## Releasing\r\n\r\nCreate a release and publish to [GitHub Actions Marketplace](https://docs.github.com/en/enterprise-cloud@latest/actions/creating-actions/publishing-actions-in-github-marketplace). Note that the release tag must be a [semantic version](https://semver.org/).\r\n\r\n## Maintainers\r\n\r\n* [@pirog](https://github.com/pirog)\r\n* [@reynoldsalec](https://github.com/reynoldsalec)\r\n\r\n## Contributors\r\n\r\n\u003ca href=\"https://github.com/lando/transfer-issue-action/graphs/contributors\"\u003e\r\n  \u003cimg src=\"https://contrib.rocks/image?repo=lando/transfer-issue-action\" /\u003e\r\n\u003c/a\u003e\r\n\r\nMade with [contributors-img](https://contrib.rocks).\r\n\r\n## Other Resources\r\n\r\n* [Important advice](https://www.youtube.com/watch?v=WA4iX5D9Z64)\r\n","funding_links":["https://github.com/sponsors/lando","https://github.com/sponsors/pirog","https://patreon.com/devwithlando","https://opencollective.com/devwithlando","https://lando.dev/join"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flando%2Ftransfer-issue-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flando%2Ftransfer-issue-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flando%2Ftransfer-issue-action/lists"}