{"id":13517723,"url":"https://github.com/FormidableLabs/appr","last_synced_at":"2025-03-31T08:31:54.085Z","repository":{"id":57182904,"uuid":"85345207","full_name":"FormidableLabs/appr","owner":"FormidableLabs","description":"Open React Native PR Builds instantly on device","archived":true,"fork":false,"pushed_at":"2020-07-16T20:49:10.000Z","size":390,"stargazers_count":381,"open_issues_count":11,"forks_count":32,"subscribers_count":51,"default_branch":"master","last_synced_at":"2025-03-09T15:04:45.545Z","etag":null,"topics":["continuous-deployment","create-react-native-app","dev-infra","react-native","review-tools"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/FormidableLabs.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}},"created_at":"2017-03-17T18:55:31.000Z","updated_at":"2024-03-31T15:22:21.000Z","dependencies_parsed_at":"2022-09-12T23:50:33.633Z","dependency_job_id":null,"html_url":"https://github.com/FormidableLabs/appr","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FormidableLabs%2Fappr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FormidableLabs%2Fappr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FormidableLabs%2Fappr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FormidableLabs%2Fappr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FormidableLabs","download_url":"https://codeload.github.com/FormidableLabs/appr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246441704,"owners_count":20778082,"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":["continuous-deployment","create-react-native-app","dev-infra","react-native","review-tools"],"created_at":"2024-08-01T05:01:36.684Z","updated_at":"2025-03-31T08:31:53.362Z","avatar_url":"https://github.com/FormidableLabs.png","language":"JavaScript","readme":"\u003ch1 align=\"center\"\u003eappr\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca title='License' href=\"https://raw.githubusercontent.com/FormidableLabs/appr/master/LICENSE\" height=\"18\"\u003e\n    \u003cimg src='https://img.shields.io/badge/license-MIT-blue.svg' /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://badge.fury.io/js/appr\"\u003e\n    \u003cimg src=\"https://badge.fury.io/js/appr.svg\" alt=\"npm version\" height=\"18\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://travis-ci.org/FormidableLabs/appr\"\u003e\n    \u003cimg src=\"https://travis-ci.org/FormidableLabs/appr.svg?branch=master\" alt=travis\" height=\"18\"\u003e\n  \u003c/a\u003e\n   \u003ca href=\"https://github.com/FormidableLabs/appr#maintenance-status\"\u003e\n    \u003cimg alt=\"Maintenance Status\" src=\"https://img.shields.io/badge/maintenance-archived-red.svg\" /\u003e\n  \u003c/a\u003e                                                                                             \n\u003c/p\u003e\n\n\u003ch4 align=\"center\"\u003e\n  Automatically Deploy Pull Requests for Create React Native App and Expo\n\u003c/h4\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/demo.gif\" alt=\"demo\" width=\"600\"\u003e\u003c/img\u003e\n\u003c/p\u003e\n\n---\n\n**appr builds and deploys pull requests** in your [create-react-native-app](https://github.com/react-community/create-react-native-app) (and other [Expo](https://expo.io/)-based) projects, and replies with a link you can open directly on your device or emulator.\n\n## Compatibility warning :warning:\n\nAs of [Expo SDK 26, the Expo iOS client is no longer able to open QR codes due to Apple App Store limitations](https://blog.expo.io/upcoming-limitations-to-ios-expo-client-8076d01aee1a). We are investigating on how to adapt appr to work with newer version of Expo iOS. In the meantime, appr only works for Android testing workflows and Expo SDK versions 25 and older on iOS.\n\n## Etymology /ɛtɪˈmɒlədʒi/\n\n### appr /ˈapə/\n\n_noun_\n\n* **appr** - Pull Request Review Apps for React Native\n* **appr** - Portmanteaux of _app_ and _PR_.\n* **appr** - Throwback to Web 2.0, when everything was bettr\n\n## What are \"Review Apps\"?\n\nMature technical organizations peer-review their code. Reviewing code on GitHub is simple enough: for most well-crafted pull requests, you can review the code diff in your browser, and either approve the changes, or request further improvements.\n\nTesting another developer's changes isn't quite as easy. Typically, you will have to stash any work in progress in your own workspace, pull down the remote branch, install dependencies, compile and start the application before you can verify that the changes work as intended.\n\nSince it was launched, I've loved Heroku's GitHub-integrated [Review Apps](https://devcenter.heroku.com/articles/github-integration-review-apps). As part of your branch build, Heroku will spin up a new review instance of your application, which you can then access with a direct link from your GitHub pull request. [Netlify](https://www.netlify.com/) offers the same functionality for deploying static websites.\n\nUnfortunately, a one-click workflow like this doesn't exist for mobile development. To add insult to injury, the ramp-up time to test mobile app changes on your local device can be much longer than for web applications.\n\nEnter **appr**. Built on [Expo](https://expo.io) and inspired by [Expo Sketch](https://sketch.expo.io), **appr** aims to make peer-reviewing React Native app code as easy as static websites. **appr** creates a new [Expo Release Channel](https://docs.expo.io/versions/latest/guides/release-channels.html) for every PR or branch you enable it on and automatically pushes your code to the release channel on every change.\n\n## Getting started\n\nAdd `appr` and `exp` to your project.\n\n```sh\n  yarn add --dev appr exp\n```\n\nOr, using npm:\n\n```sh\n  npm install --dev appr exp\n```\n\n`exp`, the Expo CLI, is a required peer dependency. In versions `1.x` of appr it was installed by default, so if your'e upgrading to `appr@2.x`, please install `exp` manually.\n\nAdd the `appr` task to the `scripts` section of your package.json:\n\n```diff\n  scripts: {\n+   \"appr\": \"appr\",\n  }\n```\n\nNext, configure one of the currently supported CI environments:\n\n* [Configuring Travis](#configuring-travis)\n* [Configuring Circle CI](#configuring-circle-ci)\n* [All other CIs](#configuring-other-cis)\n\n[Contributions](#contributing) for other CI platforms welcome.\n\n## Limitations\n\nThere are a few limitations you should be aware of. **appr** is currently not able to deploy:\n\n1.  React Native apps started with something other than create-react-native-app or Expo.\n2.  Ejected React Native apps containing custom native module dependencies.\n3.  Pull Requests from forked repositories. This is due to Travis and Circle security policies (wisely) not exposing secure environment variables to forked builds. (Circle CI allows you to disable this setting, but it is not recommended!)\n\n[Contributions](#contributing) and ideas for solutions welcome.\n\n## Configuring Travis\n\n[Travis CI](https://travis-ci.org) is free for open source projects, and offers paid plans for private repositories. To get started, create an account on Travis using your GitHub login.\n\n#### Add .travis.yml to your project\n\nAdd the following to your `.travis.yml`:\n\n```yml\nlanguage: node_js\nnode_js:\n  - \"node\"\ncache: yarn\nscript:\n  - 'if [ \"$TRAVIS_PULL_REQUEST\" != \"false\" ]; then yarn appr; fi'\n```\n\nThis will configure your Travis build to use the latest Node.js and Yarn, and ensure that the **appr** build only runs on Pull Request builds.\n\n#### (Optional) Pushing non-PR branches\n\nYou may also want to automatically push some target branches, e.g. your `develop` or `master` branches to a release channel to test your integrated code. In that case, you can whitelist the branches to release in your `.travis.yml`:\n\n```yml\nscript:\n  - 'if [ \"$TRAVIS_PULL_REQUEST\" != \"false\" ] || [ \"$TRAVIS_BRANCH\" == \"master\" ]; then yarn appr; fi'\n```\n\n#### (Optional) Running tests\n\nIt's advisable to run your unit tests before deploying review apps. You can do this by adding other steps in the `script` section, and always leaving the **appr** step last:\n\n```diff\nscript:\n+ - yarn ci-test-command\n  - 'if [ \"$TRAVIS_PULL_REQUEST\" != \"false\" ]; then yarn appr; fi'\n```\n\nNote that the default `test` command in `create-react-native-app` runs Jest in `--watch` mode, which will hang forever. You can either change the `test` script in your package.json, or, or override the test command as above.\n\n#### Enable Travis\n\nThe final step is to enable [Travis CI](https://travis-ci.org) on your repository. Log into your Travis account, and turn on the build for your project in your Profile.\n\nAfter enabled, you'll be taken to your project build page. Before triggering the first build, you'll need to add a few secure environment variables to your build under `More options \u003e Settings`:\n\n* `EXP_USERNAME` - Exponent username, under which to publish the review apps. Use your main account, or create a new one for review apps. All review apps will be unlisted, so only you can see them in your app listings.\n* `EXP_PASSWORD` - Exponent password for the publish user.\n* `GITHUB_USERNAME` - A user account you want to use for posting the review app links. Use your own, or create a new \"bot\" account and grant them access to your repo.\n* `GITHUB_TOKEN` - A [Personal API Token](https://github.com/blog/1509-personal-api-tokens) of the user with access to the repository. If the repository is private, the token needs to be granted the full `repo` scope. For public repositories, the `public_repo` scope is enough.\n\n#### Test it\n\nYou should now be able to create a new branch, make changes, and open a pull request. If the stars are aligned, the Travis build should publish the app to Expo!\n\n## Configuring Circle CI\n\n[Circle CI](https://circleci.com) offers one free build container for public and private repositories. To get started, create an account on Circle CI using your GitHub login.\n\n#### Add circle.yml to your project\n\nAdd the following to your `circle.yml`:\n\n```yml\ndependencies:\n  override:\n    - yarn\nmachine:\n  node:\n    version: 6.9\ndeployment:\n  appr:\n    branch: /.*/\n    commands:\n      - 'if [ \"$CI_PULL_REQUEST\" != \"\" ]; then yarn appr; fi'\n```\n\nThis will configure your Circle build to use the latest Node.js and Yarn (optional), and ensure that the **appr** build only runs on Pull Request builds.\n\n#### (Optional) Pushing non-PR branches\n\nYou may also want to automatically push some target branches, e.g. your `develop` or `master` branches to a release channel to test your integrated code. In that case, you can whitelist the branches to release in your `circle.yml`:\n\n```yml\ndeployment:\n  appr:\n    branch: /.*/\n    commands:\n      - 'if [ \"$CI_PULL_REQUEST\" != \"\" ] || [ \"$CIRCLE_BRANCH\" == \"master\" ]; then yarn appr; fi'\n```\n\n#### (Optional) Running tests\n\nCircle CI will automatically run your tests before the deployment. Note that the default `test` command in `create-react-native-app` runs Jest in `--watch` mode, which will hang forever. You can either change the\n`test` script in your package.json, or, or override the test command in circle.yml:\n\n```yml\ntest:\n  override:\n    - yarn ci-test-command\n```\n\n#### Enable Circle CI\n\nThe final step is to enable [Circl CI](https://circleci.com) on your repository. Log into your Circle CI account, and [turn on the build for your project](https://circleci.com/add-projects).\n\nAfter enabled, you'll be taken to your project build page. Before triggering the first build, you'll need to add a few secure environment variables to your build under `[Gear icon] \u003e Settings \u003e Environment variables`:\n\n* `EXP_USERNAME` - Exponent username, under which to publish the review apps. Use your main account, or create a new one for review apps. All review apps will be unlisted, so only you can see them in your app listings.\n* `EXP_PASSWORD` - Exponent password for the publish user.\n* `GITHUB_USERNAME` - A user account you want to use for posting the review app links. Use your own, or create a new \"bot\" account and grant them access to your repo.\n* `GITHUB_TOKEN` - A [Personal API Token](https://github.com/blog/1509-personal-api-tokens) of the user with access to the repository. If the repository is private, the token needs to be granted the full `repo` scope. For public repositories, the `public_repo` scope is enough.\n\nOptionally, you can enable `Advanced settings \u003e Only build pull requests` to avoid running build on branches that do not have open pull requests.\n\n#### Test it\n\nYou should now be able to create a new branch, make changes, and open a pull request. If the stars are aligned, the Circle CI build should publish the app to Expo!\n\n## Configuring other CIs\n\nIf your preferred CI is not explicitly supported by _appr_, but supports building GitHub pull requests,\nyou can use it by [defining environment variables as shown in the default config file](scripts/config/default.js).\n\n## Contributing\n\nImprovements and additions welcome. For large changes, please submit a discussion issue before jumping to coding; we'd hate you to waste the effort.\n\nIn lieu of a formal style guide, follow the included eslint rules, and use [Prettier](https://github.com/prettier/prettier) to format your code.\n\n### Maintenance Status\n\n**Archived:** This project is no longer maintained by Formidable. We are no longer responding to issues or pull requests unless they relate to security concerns. We encourage interested developers to fork this project and make it their own!\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFormidableLabs%2Fappr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFormidableLabs%2Fappr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFormidableLabs%2Fappr/lists"}