Use FastLane to create PRs

This is a guide on how to set up a fastlane lane to create pull requests:

  1. Set Up Fastlane:
    1. Add a Gemfile file in the root of the repo
    2. Add these to the Gemfile:
     source ""
     gem "fastlane"
    1. Run bundle update
    2. Run bundle exec fastlane init
  2. Set Up the PR lane:
    1. Run cd fastlane
    2. Edit the Fastfile file to add the PR lane:
  3. Add your Github PAT to an environment file:
    1. Create a new file called .env inside the fastlane folder.
    2. Paste this inside:
    3. Add the .env file to the .gitignore:
  4. Run the lane:
    1. bundle exec fastlane pr
  5. Additionally, you could add an alias to the .zshrc file for easier usage:
    1. Run vim ~/.zshrc
    2. Add a new alias:
       alias pr='cd ~/your-project && bundle exec fastlane pr'
  6. Also additionally, you could add some documentation to your Contributing guidelines:
    1. Here is another post describing how to do that.
    2. Here you can find some inspiration.

Now you can run pr from anywhere in your console and send a PR from your console 😄.

You can find a repository where everything is set up here.

Remember that the lane won’t work in your pc for that repository, given you don’t have a valid PAT in the .env file.

Use FastLane to create PRs |
Share: Twitter LinkedIn