Skip to content

Commit fc2ac18

Browse files
committed
Add instructions to set up GitHub token
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
1 parent 40fe936 commit fc2ac18

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

README.rst

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,32 @@ Tests
143143
Data import
144144
-----------
145145

146+
Many data importers use GitHub APIs. For this, first set up value of the ``GH_TOKEN`` environment variable by running :
147+
148+
::
149+
150+
export GH_TOKEN=yourgithubtoken
151+
152+
153+
See `GitHub docs <https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token>`_ for instructions on how to obtain your GitHub token.
154+
155+
156+
To run all data importers use :
146157
::
147158

148159
DJANGO_DEV=1 python manage.py import --all
149160

161+
To list available importers use :
162+
::
163+
164+
DJANGO_DEV=1 python manage.py import --list
165+
166+
To run specific importers :
167+
::
168+
169+
DJANGO_DEV=1 python manage.py import rust npm
170+
171+
150172
If you want to run the import periodically, you can use a systemd timer:
151173

152174
::
@@ -205,4 +227,4 @@ For full documentation about API endpoints.
205227
.. |Gitter chat| image:: https://badges.gitter.im/gitterHQ/gitter.png
206228
:target: https://gitter.im/aboutcode-org/vulnerablecode
207229
.. |PRs Welcome| image:: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
208-
:target: http://makeapullrequest.com
230+
:target: http://makeapullrequest.com

0 commit comments

Comments
 (0)