To start, we’ll need to set up the app environment:
Welcome to the world of creating Apps for the Smart Builder!
This repository is a template repository, so please click "Use this template" as shown in the image below:
<aside> 💡 IMPORTANT! Please keep the repository visibility as "public" upon initial creation. You will run a script that will change the visibility of this private later. This is because the script first handles branch protection rules, but GitHub API does not allow you to do so unless the repository is public even with a Personal Access Token.
Example:
</aside>
After you have created your repository, clone it to your local computer by running git clone [email protected]:{your-github-accoint}/{your-app-repository}.git
.
For your App to be reviewed by our team, you’ll need to complete these steps.
npm run init-repo-settings
. This will run a script that will prompt you for your GitHub username, repository name, and Personal Access Token.To generate a Personal Access Token:
What does the script do?
If you are familiar with bash scripts, you can check it out at bin/update-repo-branch-settings.sh
.
The script does the following:
https://api.github.com/repos/{ownerName}/{repoName}/branches/main
to check if the repository exists and the correct input parameters have been enteredPUT
request to update branch protection rules so that the main
(default) branch requires a Pull Request with 1 approval