{"id":17458951,"url":"https://github.com/caseywebb/action-pr-multi-env-link-expander","last_synced_at":"2026-04-07T23:02:52.956Z","repository":{"id":225437085,"uuid":"765944413","full_name":"caseyWebb/action-pr-multi-env-link-expander","owner":"caseyWebb","description":"Paste localhost links in GitHub Pull Request descriptions, have them transformed into staging/production links.","archived":false,"fork":false,"pushed_at":"2026-04-03T17:37:54.000Z","size":1013,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-03T20:24:13.193Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caseyWebb.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":"2024-03-01T23:40:39.000Z","updated_at":"2026-04-03T17:36:42.000Z","dependencies_parsed_at":"2024-03-12T17:29:46.785Z","dependency_job_id":"3b9c3e78-4a3c-4aef-8210-2d3bfd9a4302","html_url":"https://github.com/caseyWebb/action-pr-multi-env-link-expander","commit_stats":null,"previous_names":["caseywebb/action-pr-multi-env-link-expander"],"tags_count":6,"template":false,"template_full_name":"actions/typescript-action","purl":"pkg:github/caseyWebb/action-pr-multi-env-link-expander","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caseyWebb%2Faction-pr-multi-env-link-expander","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caseyWebb%2Faction-pr-multi-env-link-expander/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caseyWebb%2Faction-pr-multi-env-link-expander/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caseyWebb%2Faction-pr-multi-env-link-expander/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caseyWebb","download_url":"https://codeload.github.com/caseyWebb/action-pr-multi-env-link-expander/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caseyWebb%2Faction-pr-multi-env-link-expander/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31532339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2024-10-18T04:38:16.367Z","updated_at":"2026-04-07T23:02:52.948Z","avatar_url":"https://github.com/caseyWebb.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multi-Environment Link Expander GitHub Action\n\n[![GitHub Super-Linter](https://github.com/caseyWebb/action-pr-multi-env-link-expander/actions/workflows/linter.yml/badge.svg)](https://github.com/super-linter/super-linter)\n![CI](https://github.com/caseyWebb/action-pr-multi-env-link-expander/actions/workflows/ci.yml/badge.svg)\n[![Check dist/](https://github.com/caseyWebb/action-pr-multi-env-link-expander/actions/workflows/check-dist.yml/badge.svg)](https://github.com/caseyWebb/action-pr-multi-env-link-expander/actions/workflows/check-dist.yml)\n[![CodeQL](https://github.com/caseyWebb/action-pr-multi-env-link-expander/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/caseyWebb/action-pr-multi-env-link-expander/actions/workflows/codeql-analysis.yml)\n[![Coverage](./badges/coverage.svg)](./badges/coverage.svg)\n\nThis action expands localhost links in a PR description for multiple\nenvironments. For example, transforms\n\n```markdown\nhttp://localhost:3000/my/cool/page\n```\n\nto\n\n```markdown\nhttps://staging.myapp.com/my/cool/page (Open in\n[Development](http://localhost:3000/my/cool/page))\n```\n\n---\n\nMarkdown links are also supported. For example,\n\n```markdown\n[My Cool Page](http://localhost:3000/my/cool/page)\n```\n\nis transformed to\n\n```markdown\n[My Cool Page (Staging)](https://staging.myapp.com/my/cool/page) (Open in\n[Development](http://localhost:3000/my/cool/page))\n```\n\n---\n\nIf multiple environments are specified, the action will expand the links for\neach.\n\n```markdown\nhttps://staging.myapp.com/my/cool/page (Open in\n[Production](https://myapp.com/my/cool/page),\n[Development](http://localhost:3000/my/cool/page))\n```\n\n## Usage\n\nThis action is designed to be used in a GitHub Actions workflow. To use this\naction in your repository, create a new workflow file (e.g.,\n`.github/workflows/expand-localhost-links.yml`) and add the following content:\n\n```yaml\nname: 'PR Multi-Environment Link Expander'\non:\n  pull_request:\n    types: [opened, edited]\n\npermissions:\n  pull-requests: write\n\njobs:\n  expand-localhost-links:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Expand Localhost Links\n        id: expand-localhost-links\n        uses: caseyWebb/action-pr-multi-env-link-expander@v1.0.0\n        with:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          ENVIRONMENTS:\n            '{\"Staging\": \"https://staging.myapp.com\", \"Production\":\n            \"https://myapp.com\"}'\n```\n\n### Configuration\n\nThe action requires the following inputs:\n\n- `GITHUB_TOKEN`\n  - The GitHub token used to authenticate with the GitHub API. This is\n    automatically provided by GitHub Actions and does not need to be set\n    manually.\n\n- `ENVIRONMENTS`\n  - A JSON object that maps environment names to their respective URLs. For\n    example,\n    `{\"Staging\": \"https://staging.myapp.com\", \"Production\": \"https://myapp.com\"}`.\n\n## Contributing\n\n### Setting Up Your Development Environment\n\nThis repository uses [Nix](https://nixos.org/) and [direnv](https://direnv.net/)\nto manage the development environment. To get started, install Nix and direnv,\nand then run the following command:\n\n```bash\ndirenv allow\n```\n\nThis will install the required dependencies and set up the development\nenvironment, including installing the required npm dependencies.\n\n### Running the Tests\n\n```bash\n$ npm test\n\nPASS  ./index.test.js\n  ✓ throws invalid number (3ms)\n  ✓ wait 500 ms (504ms)\n  ✓ test runs (95ms)\n\n...\n```\n\nPass additional arguments to Jest by adding them to the `npm test` command. For\nexample,\n\n```bash\nnpm test -- --watch\n```\n\n### Publishing a New Release\n\nThis project includes a helper script, [`script/release`](./script/release)\ndesigned to streamline the process of tagging and pushing new releases for\nGitHub Actions.\n\nGitHub Actions allows users to select a specific version of the action to use,\nbased on release tags. This script simplifies this process by performing the\nfollowing steps:\n\n1. **Retrieving the latest release tag:** The script starts by fetching the most\n   recent release tag by looking at the local data available in your repository.\n1. **Prompting for a new release tag:** The user is then prompted to enter a new\n   release tag. To assist with this, the script displays the latest release tag\n   and provides a regular expression to validate the format of the new tag.\n1. **Tagging the new release:** Once a valid new tag is entered, the script tags\n   the new release.\n1. **Pushing the new tag to the remote:** Finally, the script pushes the new tag\n   to the remote repository. From here, you will need to create a new release in\n   GitHub and users can easily reference the new tag in their workflows.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaseywebb%2Faction-pr-multi-env-link-expander","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaseywebb%2Faction-pr-multi-env-link-expander","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaseywebb%2Faction-pr-multi-env-link-expander/lists"}