File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,8 +120,8 @@ Creating a Webhook
120120
121121:obj: `democrasite.webiscite ` needs `webhooks `_ to find out about events on
122122Github. `Create a webhook `_ in your fork of the repository, then generate a
123- secret key for your hook and store it in your environment (either through your
124- terminal or `` .env `` file) as `` GITHUB_SECRET_KEY `` .
123+ secret key for your hook and store it in `` .envs/.local/.django `` (or your shell) as
124+ `` GITHUB_WEBHOOK_SECRET `` so it matches the secret configured on GitHub .
125125
126126To test your webhook, follow these `instructions `_. (If you have a preferred
127127tool for exposing your local server, feel free to replace smee with it.) If you
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ following the instructions in the guide.
7474Understanding the repository
7575^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7676
77- Check out ``repo_map .txt `` in the root of the repository for a display of the
77+ Check out ``repository_map .txt `` in the root of the repository for a display of the
7878repository layout and brief explanations for the purpose of each non-obvious file and
7979directory.
8080
@@ -114,8 +114,8 @@ Setting up your users
114114 how the site behaves for both kinds of users.
115115
116116.. _`django-allauth` : https://docs.allauth.org/en/latest/introduction/index.html
117- .. _`GitHub` : https://django- allauth.readthedocs.io /en/latest/providers.html#github
118- .. _`Google` : https://docs.allauth.org/en/latest/socialaccount/providers/github .html
117+ .. _`GitHub` : https://docs. allauth.org /en/latest/socialaccount/ providers/github .html
118+ .. _`Google` : https://docs.allauth.org/en/latest/socialaccount/providers/google .html
119119
120120Linting
121121^^^^^^^
Original file line number Diff line number Diff line change @@ -4,15 +4,18 @@ How To - Project Documentation
44Get Started
55----------------------------------------------------------------------
66
7- Documentation can be written as rst files in ` democrasite/ docs` .
7+ Documentation source files live in the `` docs/ `` directory at the repository root .
88
99
10- To build and serve docs, use the commands::
10+ To build and serve docs with live reload, start the local stack (including the ``docs ``
11+ service) from the project root::
1112
12- docker compose -f docker-compose.docs.yml up
13+ just up
1314
15+ The docs container serves Sphinx at http://localhost:9000/ (see ``docker-compose.local.yml ``).
1416
15- Changes to files in `docs ` will be picked up and reloaded automatically.
17+ Changes to files under ``docs/ `` and under ``democrasite/ `` (watched by sphinx-autobuild)
18+ will be picked up and reloaded automatically.
1619
1720`Sphinx <https://www.sphinx-doc.org/ >`_ is the tool used to build documentation.
1821
Original file line number Diff line number Diff line change @@ -27,10 +27,14 @@ creates a :class:`~democrasite.webiscite.models.PullRequest` instance.
2727
2828If the user who created the pull request has a democrasite account, a new
2929:class: `~democrasite.webiscite.models.Bill `
30- is created with the information from the pull request and made visible on the
31- homepage immediately. A :class: `~django_celery_beat.models.PeriodicTask ` is
32- also scheduled to execute :func: `~democrasite.webiscite.tasks.submit_bill `
33- once the voting period ends.
30+ is created with the information from the pull request. If the pull request is
31+ still a GitHub draft, the bill stays in ``DRAFT `` status (no voting) until the
32+ PR is marked ready for review, which publishes it via
33+ :meth: `~democrasite.webiscite.webhooks.PullRequestHandler.ready_for_review `.
34+ Otherwise the bill is ``OPEN `` on the homepage. A
35+ :class: `~django_celery_beat.models.PeriodicTask ` is scheduled to execute
36+ :func: `~democrasite.webiscite.tasks.submit_bill ` once the voting period ends
37+ (enabled when the bill leaves ``DRAFT ``).
3438
3539:func: `~democrasite.webiscite.tasks.submit_bill ` verifies that the pull
3640request is still open and that its SHA has not changed since the bill was
You can’t perform that action at this time.
0 commit comments