Skip to content

Commit d1def9e

Browse files
cunlatim-schilling
andauthored
Update new project section (#57)
* Update new project section * Be more specific about who needs access to PyPI project as owner Remove a TODO that we're not sure if it'll happen at all. --------- Co-authored-by: Tim Schilling <schillingt@better-simple.com>
1 parent ccd1527 commit d1def9e

File tree

1 file changed

+82
-74
lines changed

1 file changed

+82
-74
lines changed

README.md

Lines changed: 82 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -98,82 +98,78 @@ Django Commons packages.
9898

9999
## New Project Playbook
100100

101-
1. Check if repository
102-
meets [inbound requirements][3].
103-
2. Confirm who will be the admins and maintainers for the repository
104-
3. PyPI project owner must add you (Django Commons admin) as owner in PyPI
105-
4. (TODO: Determine how this works with transferring out of an org and into the Django Commons org)
106-
5. [Add repository owner to Django Commons as member](#new-member-playbook) (they'll be added
107-
to a team later)
108-
6. Share
109-
link ([https://docs.github.com/en/repositories/creating-and-managing-repositories/transferring-a-repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/transferring-a-repository))
110-
with repo owner to transfer repo
111-
7. Wait for repository transferred in
112-
8. [Make Terraform changes to add new project](#terraform-changes-to-add-a-new-project)
113-
9. Under Actions > General > "Fork pull request workflows from outside collaborators", set "Require approval for
114-
first-time contributors"
115-
10. Have the maintainer push a new tag and walk them through the release process
116-
11. Set a calendar event or reminder for 30 days in the future to remove previous repository owner from team
117-
118-
### Terraform changes to add a new project
119-
120-
#### Using the GitHub UI
121-
122-
1. Transfer the existing repository to the Django Commons organization using the GitHub UI, so old information is
123-
preserved.
124-
2. Make sure the there are no teams `repo-name`, `repo-name-admins` and `repo-name-committers` in the Django Commons
125-
organization. Teams can be viewed [here][teams]. The teams will be created by
126-
the terraform apply process.
127-
128-
#### Locally
129-
130-
Assuming repository name is `repo-name`:
131-
132-
1.
133-
134-
In [`terraform/production/respositories.tfvars`][2],
135-
add the new repository to the `repositories` section:
136-
137-
```terraform
138-
repositories = {
139-
# ...
140-
"repo-name" = {
141-
description = "repo description"
142-
homepage_url = "" # optional, default is ""
143-
allow_auto_merge = false # optional, default is false
144-
allow_merge_commit = false # optional, default is false
145-
allow_rebase_merge = false # optional, default is false
146-
allow_squash_merge = true # optional, default is true
147-
allow_update_branch = true # optional, default is true
148-
delete_branch_on_merge = true # optional, default is true
149-
has_discussions = true # optional, default is true
150-
has_downloads = true # optional, default is true
151-
has_wiki = false # optional, default is false
152-
is_template = false # optional, default is false
153-
push_allowances = []
154-
template = "" # optional, default is ""
155-
topics = []
156-
visibility = "public" # optional, default is "public"
157-
is_django_commons_repo = optional(bool, false) # Do not create teams for repository
158-
enable_branch_protection = true # optional, default is true
159-
required_status_checks_contexts = [] # optional, default is []
160-
admins = [] # Members of the repository's admin and repository teams. Have admin permissions
161-
committers = [] # Members of the repository's committers and repository teams. Have write permissions
162-
members = [] # Members of the repository team. Have triage permissions
163-
}
164-
}
165-
```
101+
Assuming the repository name is `repo-name`:
166102

167-
2. Create a pull-request to `main` branch. This will trigger terraform to plan the changes in the organization to be
168-
executed.
169-
Review the changes and make sure they align with the request.
170-
3. Merge the pull request. This will trigger terraform to apply the changes in the organization.
103+
### Pre Transfer Steps
171104

172-
The expected changes:
105+
- [ ] Check if the repository meets [inbound requirements][3].
106+
- [ ] Confirm who will be the admins and maintainers for the repository
107+
- [ ] Make sure the there are no teams `{repo-name}`, `{repo-name}-admins` and `{repo-name}-committers` in the Django
108+
Commons organization. Teams can be viewed [here][teams]. The teams will be created by the terraform apply process.
109+
- [ ] (project owner) PyPI project owner must add the Django Commons PyPI Admins as owners in [PyPI][pypi],
110+
and [test-pypi][test-pypi]
111+
- [ ] [Add repository owner to Django Commons as member](#new-member-playbook) (they'll be added to a team later)
112+
- [ ] (project owner) Transfer the existing repository to the Django Commons organization using the GitHub UI, so old
113+
information is preserved. See [GitHub docs][gh-docs-transfer-repo].
114+
115+
### Post Transfer Steps
173116

174-
- New teams `repo-name`, `repo-name-admins`, `repo-name-committers` with the relevant members based on the
175-
repository's description.
176-
- The repository changes are accepted by the project maintainers.
117+
- [ ] Terraform changes to add project to organization
118+
- [ ] In [`terraform/production/respositories.tfvars`][2], add the new repository to the `repositories` section:
119+
120+
```terraform
121+
repositories = {
122+
# ...
123+
"repo-name" = {
124+
description = "repo description"
125+
homepage_url = "" # optional, default is ""
126+
allow_auto_merge = false # optional, default is false
127+
allow_merge_commit = false # optional, default is false
128+
allow_rebase_merge = false # optional, default is false
129+
allow_squash_merge = true # optional, default is true
130+
allow_update_branch = true # optional, default is true
131+
delete_branch_on_merge = true # optional, default is true
132+
has_discussions = true # optional, default is true
133+
has_downloads = true # optional, default is true
134+
has_wiki = false # optional, default is false
135+
is_template = false # optional, default is false
136+
push_allowances = []
137+
template = "" # optional, default is ""
138+
topics = []
139+
visibility = "public" # optional, default is "public"
140+
is_django_commons_repo = optional(bool, false) # Do not create teams for repository
141+
enable_branch_protection = true # optional, default is true
142+
required_status_checks_contexts = [] # optional, default is []
143+
admins = [] # Members of the repository's admin and repository teams. Have admin permissions
144+
committers = [] # Members of the repository's committers and repository teams. Have write permissions
145+
members = [] # Members of the repository team. Have triage permissions
146+
}
147+
}
148+
```
149+
150+
- [ ] Create a pull-request to `main` branch. This will trigger terraform to plan the changes in the organization to
151+
be executed.
152+
Review the changes and make sure they align with the request.
153+
- [ ] Merge the pull request. This will trigger terraform to apply the changes in the organization.
154+
- The expected changes:
155+
- [ ] New teams `repo-name`, `repo-name-admins`, `repo-name-committers` with the relevant members based on the
156+
repository's description.
157+
- [ ] The repository changes are accepted by the project maintainers.
158+
- [ ] Repository has two environments: `pypi` and `testpypi`, see example [here][playground-environments]
159+
160+
- [ ] Repo changes:
161+
- [ ] (project owner) Create/Update the release GitHub workflow in the repository, example can be
162+
found [here][release-gh-workflow]
163+
- [ ] Under Actions > General > "Fork pull request workflows from outside collaborators", set "Require approval for
164+
first-time contributors"
165+
166+
- [ ] PyPI and Test PyPI changes:
167+
- [ ] Add the release workflow to pypi.org's package publishing (and test.pypi.org's package publishing).
168+
Example can be found [here][pypi-publishing]
169+
170+
- [ ] Have the maintainer push a new tag and walk them through the release process
171+
- [ ] Set a calendar event or reminder for 30 days in the future to remove the previous repository owner from PyPI
172+
project (if applicable)
177173
178174
## Remove Project Playbook
179175
@@ -208,4 +204,16 @@ The expected changes:
208204
209205
[teams]: https://github.com/orgs/django-commons/teams
210206
211-
[failed-invitations]: https://github.com/orgs/django-commons/people/failed_invitations
207+
[failed-invitations]: https://github.com/orgs/django-commons/people/failed_invitations
208+
209+
[test-pypi]: https://test.pypi.org/manage/project/django-commons/
210+
211+
[pypi]: https://pypi.org/
212+
213+
[gh-docs-transfer-repo]: https://docs.github.com/en/repositories/creating-and-managing-repositories/transferring-a-repository
214+
215+
[release-gh-workflow]: https://github.com/django-commons/django-commons-playground/blob/main/.github/workflows/release.yml
216+
217+
[pypi-publishing]: https://test.pypi.org/manage/project/django-tasks-scheduler/settings/publishing/
218+
219+
[playground-environments]: https://github.com/django-commons/django-commons-playground/settings/environments

0 commit comments

Comments
 (0)