Code Version Control
https://github.com/cityofaustin/atd-knack/tree/master/code
Github Repo - Knack Code
Copying the code from the TEST application
From the Knack builder, copy the contents of the JS or CSS file that you have modified.
Navigate to ATD-Knack GitHub Repo
ATD-Knack GitHub Repo where all Knack app code is maintained.
ATD-Knack>Code>App Name>.css or .js file
Click the "code" folder
Select the app name you're working on (ex. sandbox-app)
Select the ".css" or ".js" folder
Click on the pencil icon at the top right of the page to edit the code
Creating a Commit
Replace the contents of the file with the new code version that you copied from the test application
At the bottom of the page, write a descriptive title and summary of what changes you made, and why.
Creating a branch from a commit
Choose the option "Create a new branch for this commit and start a pull request"
Give the new branch a meaningful name,
"name-issue ID-simple-title-of-change" -
dianamartin-6100-css-code-change-to-document
Click "Propose changes"
Creating a Pull Request
A pull request is automatically created on the next screen, confirm your pull request by clicking the green "Create pull request" button.
Assign a Reviewer
Lastly, you should assign a reviewer to check your code.
On the right side of the page find the cog icon next to "Reviewers", and select one of your colleagues to review the code (preferably from your own team first, then Dev team)
Post a slack on the "atd-knack" channel to see if one of your colleagues is available to review
Reviewing a Pull Request
You will receive an email from GitHub if you're assigned to review a pull request
Approving Pull Request
Navigate to the pull request
Under the "Commit" tab, click the commit name to open
Click the "+" sign beside the green highlighted code to "Add a single comment" or "Start a review"
Once you're done reviewing, click the "Finish your review" button on the top right
Enter in some comments, click "Approve" and click "Submit review"
Remember: Pull request authors can't "Approve" their own pull requests!
Pull Request Approved - Add Code to Production
Wait for the pull request to be approved
once it’s approved, copy/paste your code in the Knack TEST environment to PROD environment
make sure the code is working
Merging Branches
Click "Merge pull request" to merge your changes to the master branch
Will be prompted to "Confirm merge"
You will see this next message that your pull request was successfully merged and closed
Deleting Branches
Option 1: Click the "Delete branch" in the message prompt
Option 2: Navigate to main repo page "atd-knack"
Beside the "master" drop down, click "branches"
Find the branch you name and click the "Delete" icon
Last updated