@@ -32,16 +32,16 @@ module.exports = async (context, req) => {
32
32
* the `gitgitgadget/git` and the `git/git` repository (with the
33
33
* `dscho/git` one thrown in for debugging purposes).
34
34
*/
35
- const orgs = [ 'gitgitgadget' , 'git' , 'dscho ']
36
- const a = [ context , undefined , 'gitgitgadget -workflows' , 'gitgitgadget-workflows' ]
35
+ const orgs = [ 'cygwingitgadget ' ]
36
+ const a = [ context , undefined , 'cygwingitgadget -workflows' , 'gitgitgadget-workflows' ]
37
37
38
38
const eventType = context . req . headers [ 'x-github-event' ] ;
39
39
context . log ( `Got eventType: ${ eventType } ` ) ;
40
40
const repositoryOwner = req . body . repository . owner . login ;
41
41
if ( ! orgs . includes ( repositoryOwner ) ) {
42
42
context . res = {
43
43
status : 403 ,
44
- body : ' Refusing to work on a repository other than gitgitgadget/git or git/git'
44
+ body : ` Refusing to work on any repository outside of ${ orgs . join ( ', ' ) } ` ,
45
45
} ;
46
46
} else if ( eventType === 'pull_request' ) {
47
47
if ( req . body . action !== 'opened' && req . body . action !== 'synchronize' ) {
@@ -59,9 +59,9 @@ module.exports = async (context, req) => {
59
59
body : `Ignored event type: ${ eventType } ` ,
60
60
} ;
61
61
} else if ( eventType === 'push' ) {
62
- if ( req . body . repository . full_name === 'gitgitgadget/git-mailing -list-mirror' ) {
62
+ if ( req . body . repository . full_name === 'cygwingitgadget/cygwin-patches -list-mirror' ) {
63
63
context . res = { body : `push(${ req . body . ref } in ${ req . body . repository . full_name } ): ` }
64
- if ( req . body . ref === 'refs/heads/lore-1 ' ) {
64
+ if ( req . body . ref === 'refs/heads/master ' ) {
65
65
const queued = await listWorkflowRuns ( ...a , 'handle-new-mails.yml' , 'queued' )
66
66
if ( queued . length ) {
67
67
context . res . body += [
@@ -73,7 +73,7 @@ module.exports = async (context, req) => {
73
73
context . res . body += `triggered ${ run . html_url } `
74
74
}
75
75
} else context . res . body += `Ignoring non-default branches`
76
- } else if ( req . body . repository . full_name !== 'git/git ' ) {
76
+ } else if ( req . body . repository . full_name !== 'cygwin/cygwin ' ) {
77
77
context . res = { body : `Ignoring pushes to ${ req . body . repository . full_name } ` }
78
78
} else {
79
79
const run = await triggerWorkflowDispatch (
@@ -84,7 +84,7 @@ module.exports = async (context, req) => {
84
84
}
85
85
)
86
86
const extra = [ ]
87
- if ( req . body . ref === 'refs/heads/seen' ) {
87
+ if ( [ 'refs/heads/main' , 'refs/heads/cygwin-3_6-branch' ] . includes ( req . body . ref ) ) {
88
88
for ( const workflow of [ 'update-prs.yml' , 'update-mail-to-commit-notes.yml' ] ) {
89
89
if ( ( await listWorkflowRuns ( ...a , workflow , 'main' , 'queued' ) ) . length === 0 ) {
90
90
const run = await triggerWorkflowDispatch ( ...a , workflow , 'main' )
0 commit comments