Provisioning a new Docassemble repository - Digital-Law-Lab/Digital-Law-Lab GitHub Wiki
Introduction
Use this procedure when 'copying' a repository of existing code from another repository into the Digital Law Lab so we can work on it.
Clone and Mirror the Repository
TODO: instructions on creating a package from scratch
Where we work on existing code (eg: code from LLAW3301 repo) we do not create a fork. Instead we should mirror the repository into our Organisation.
Steps:
- Create a new repository in Digital Law Lab using our Repository Naming Standard via the web browser
eg: we use the web browser to create a repo called
docassemble-clcsa-01-service-directory
- Do a bare clone of the existing repository (command-line)
eg: we will clone from LLAW3301:
git clone --bare https://github.com/LLAW3301/docassemble-LLAW33012020S2P06.git
- Do a mirror push to the repo just created in step 1.
git push --mirror https://github.com/Digital-Law-Lab/docassemble-clcsa-01-service-directory
Clean out branches
If the repository mirrored is a LLAW3301 student project it will contain a number of branches that we no longer need. Delete all branches except for main
/master
.
Update the Package Info
- create a
next
branch frommaster
(more on why below) - check out
next
and make these changes:- Rename
docassemble/old_package_name
todocassemble/new_package_name
- Edit
setup.py
and replace all occurences ofold_package_name
withnew_package_name
- find the .yml file that is used to run the app and rename it to
main.yml
- Rename
- commit changes to
next
and push - check out into Docassemble playground and confirm package still runs
Note: In the example we've used in this document old_package_name
would be LLAW33012020S2P06
and new_package_name
would be clcsa-01-service-directory
.
Create working branch structure
This should be done in accordance with the Code Branches Policy
- Make sure
next
branch exists, otherwise create it - Create
next_AAAA
branches for each team member fromnext
where
AAAA
is the GitHub username of each team member
Grant access to the repo
Grant write access to Digital-Law-Lab/docassemble-developers
group eg:
main
and next
branches
Protect Note: It looks like protection is behind a paywall. We may need to drop this.
Only @mferrare should be able to merge changes into main
and next
. Set up protection on the branch so these two boxes are checked:
Note: although the policy requires approval it does not restrict approvals only to @mferrare. However, only @mferrare should approve PRs into main
and next
.
Create Slack channel
On our Slack create a new channel for this repository.
Channel naming convention:
- Use the same name as the repo but omit the
docassemble-
portion for docassemble packageseg: the channel for the
docassemble-clcsa-01-serivce-directory
is calledclcsa-01-service-directory
- Note the Slack requires channel names to be in lower case.