Skip to content

Commit 4329d1c

Browse files
committed
request the workflow OAuth scope, to rollup GHA PRs
1 parent 36ce5c7 commit 4329d1c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

homu/html/queue.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,14 @@ <h1>Homu queue - {% if repo_url %}<a href="{{repo_url}}" target="_blank">{{repo_
196196
<script src="../assets/jquery.dataTables.min.js"></script>
197197

198198
<script>
199+
const OAUTH_SCOPES = [
200+
"public_repo",
201+
"admin:repo_hook",
202+
203+
// Needed to be able to include GitHub Actions workflow files in rollup PRs.
204+
"workflow",
205+
];
206+
199207
document.getElementById('expand-rollup').onclick = function() {
200208
var checkboxCount = document.querySelectorAll('#queue tbody input[type=checkbox]:checked').length;
201209
document.getElementById('checkbox-count').innerHTML = checkboxCount;
@@ -216,7 +224,7 @@ <h1>Homu queue - {% if repo_url %}<a href="{{repo_url}}" target="_blank">{{repo_
216224

217225
location = 'https://github.com/login/oauth/authorize' +
218226
'?client_id={{oauth_client_id}}' +
219-
'&scope=public_repo,admin:repo_hook' +
227+
'&scope=' + OAUTH_SCOPES.join(',') +
220228
'&state=' + encodeURIComponent(JSON.stringify({
221229
cmd: 'rollup',
222230
repo_label: '{{repo_label}}',
@@ -229,7 +237,7 @@ <h1>Homu queue - {% if repo_url %}<a href="{{repo_url}}" target="_blank">{{repo_
229237

230238
location = 'https://github.com/login/oauth/authorize' +
231239
'?client_id={{oauth_client_id}}' +
232-
'&scope=public_repo,admin:repo_hook' +
240+
'&scope=' + OAUTH_SCOPES.join(',') +
233241
'&state=' + encodeURIComponent(JSON.stringify({
234242
cmd: 'synch',
235243
repo_label: '{{repo_label}}',

0 commit comments

Comments
 (0)