@@ -44,31 +44,25 @@ Generate a secret key for Flask, so that it can save information into the sessio
44
44
$ export FLASK_SECRET_KEY=` python -c " import os; print(os.urandom(24))" `
45
45
$ heroku config:set FLASK_SECRET_KEY=$FLASK_SECRET_KEY
46
46
47
- Setup OAuth
48
- -----------
47
+
48
+ Set Up Authentication Tokens
49
+ ----------------------------
49
50
50
51
Jira
51
52
~~~~
52
53
53
54
OAuth authentication for Jira requires a RSA keypair. To set this up:
54
55
55
- 1. Run ``openssl genrsa -out jira.pem ``. This will generate a private key.
56
- 2. Run ``openssl rsa -in jira.pem -pubout -out jira.pub ``. This will generate the
57
- public key.
58
- 3. Generate a random string to serve as the consumer key. For example, run
59
- ``python -c "import uuid; print(uuid.uuid4().hex)" > jira.uuid ``.
60
- 4. Configure an Application Link in Jira. The consumer key is the contents
61
- of ``jira.uuid ``, and the public key is the contents of ``jira.pub ``.
62
- 5. Set RSA key and consumer key in Heroku environment:
56
+ #. Get a Jira access token. TODO: Explain how to do this.
57
+
58
+ #. Specify the Jira user email and token:
63
59
64
60
.. code-block :: bash
65
61
66
- $ export JIRA_OAUTH_RSA_KEY=" $( < jira.pem) "
67
- $ export JIRA_OAUTH_CONSUMER_KEY=" $( < jira.uuid) "
68
- $ heroku config:set JIRA_OAUTH_RSA_KEY=$JIRA_OAUTH_RSA_KEY
69
- $ heroku config:set JIRA_OAUTH_CONSUMER_KEY=$JIRA_OAUTH_CONSUMER_KEY
62
+ $ heroku config:set [email protected]
63
+ $ heroku config:set JIRA_USER_TOKEN=94LW................51FC
70
64
71
- 6. Specify the JIRA server to use:
65
+ #. Specify the Jira server to use:
72
66
73
67
.. code-block :: bash
74
68
@@ -77,24 +71,15 @@ OAuth authentication for Jira requires a RSA keypair. To set this up:
77
71
GitHub
78
72
~~~~~~
79
73
80
- 1. `Register a new application on GitHub <https://github.com/settings/applications/new >`_.
81
-
82
- 2. The new application will give you a consumer key and consumer secret. Set
83
- these values in the Heroku environment:
84
-
85
- .. code-block :: bash
86
-
87
- $ heroku config:set GITHUB_OAUTH_CLIENT_ID=my-id GITHUB_OAUTH_CLIENT_SECRET=my-secret
88
-
89
- 3. Create a GitHub personal access token for the bot user. It will need these
74
+ #. Create a GitHub personal access token for the bot user. It will need these
90
75
scopes: admin:repo_hook, repo, user:email, workflow, write:org. Specify it
91
76
as a Heroku setting:
92
77
93
78
.. code-block :: bash
94
79
95
80
$ heroku config:set GITHUB_PERSONAL_TOKEN=my-pat
96
81
97
- 4 . A GitHub project will be needed for blended pull requests, and another for
82
+ # . A GitHub project will be needed for blended pull requests, and another for
98
83
other OSPRs. Specify them as ``org:number ``:
99
84
100
85
.. code-block :: bash
@@ -103,14 +88,17 @@ GitHub
103
88
$ heroku config:set GITHUB_BLENDED_PROJECT=edx:9
104
89
105
90
106
-
107
91
Deploy
108
92
------
109
93
110
- 1. Set up your Heroku git remote to point to your Heroku application
111
- 1. ``git push heroku ``
112
- 1. Visit your website -- it should load!
113
- 1. Enjoy the sweet, sweet taste of API integration
94
+ #. Set up your Heroku git remote to point to your Heroku application
95
+
96
+ #. ``git push heroku ``
97
+
98
+ #. Visit your website -- it should load!
99
+
100
+ #. Enjoy the sweet, sweet taste of API integration
101
+
114
102
115
103
Recurring Tasks
116
104
---------------
0 commit comments