Skip to content

Commit

Permalink
feat: allow webhook update calls
Browse files Browse the repository at this point in the history
  • Loading branch information
mfren committed Jan 28, 2025
1 parent 27f2ea7 commit 68b1019
Show file tree
Hide file tree
Showing 9 changed files with 206 additions and 1 deletion.
6 changes: 6 additions & 0 deletions client-templates/github-com/accept.json.sample
Original file line number Diff line number Diff line change
Expand Up @@ -2136,6 +2136,12 @@
"method": "POST",
"path": "/repos/:name/:repo/pulls/:pullRef/reviews",
"origin": "https://${GITHUB_TOKEN}@${GITHUB_API}"
},
{
"//": "allow webhook configs to be updated, to allow for secret upgrades",
"method": "PATCH",
"path": "/repos/:name/:repo/hooks/:id/config",
"origin": "https://${GITHUB_TOKEN}@${GITHUB_API}"
}
]
}
6 changes: 6 additions & 0 deletions client-templates/github-enterprise/accept.json.sample
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,12 @@
"method": "POST",
"path": "/repos/:name/:repo/pulls/:pullRef/reviews",
"origin": "https://${GITHUB_TOKEN}@${GITHUB_API}"
},
{
"//": "allow webhook configs to be updated, to allow for secret upgrades",
"method": "PATCH",
"path": "/repos/:name/:repo/hooks/:id/config",
"origin": "https://${GITHUB_TOKEN}@${GITHUB_API}"
}
]
}
6 changes: 6 additions & 0 deletions client-templates/github-server-app/accept.json.sample
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,12 @@
"method": "POST",
"path": "/repos/:name/:repo/pulls/:pullRef/reviews",
"origin": "https://${GITHUB_API}"
},
{
"//": "allow webhook configs to be updated, to allow for secret upgrades",
"method": "PATCH",
"path": "/repos/:name/:repo/hooks/:id/config",
"origin": "https://${GITHUB_API}"
}
]
}
6 changes: 6 additions & 0 deletions defaultFilters/github-enterprise.json
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,12 @@
"method": "POST",
"path": "/repos/:name/:repo/pulls/:pullRef/reviews",
"origin": "https://${GITHUB_TOKEN}@${GITHUB_API}"
},
{
"//": "allow webhook configs to be updated, to allow for secret upgrades",
"method": "PATCH",
"path": "/repos/:name/:repo/hooks/:id/config",
"origin": "https://${GITHUB_TOKEN}@${GITHUB_API}"
}
]
}
12 changes: 11 additions & 1 deletion defaultFilters/github-server-app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2022,6 +2022,16 @@
"scheme": "bearer",
"token": "${GHA_ACCESS_TOKEN}"
}
}
},
{
"//": "allow webhook configs to be updated, to allow for secret upgrades",
"method": "PATCH",
"path": "/repos/:name/:repo/hooks/:id/config",
"origin": "https://${GITHUB_API}",
"auth": {
"scheme": "bearer",
"token": "${GHA_ACCESS_TOKEN}"
}
},
]
}
6 changes: 6 additions & 0 deletions defaultFilters/github.json
Original file line number Diff line number Diff line change
Expand Up @@ -2136,6 +2136,12 @@
"method": "POST",
"path": "/repos/:name/:repo/pulls/:pullRef/reviews",
"origin": "https://${GITHUB_TOKEN}@${GITHUB_API}"
},
{
"//": "allow webhook configs to be updated, to allow for secret upgrades",
"method": "PATCH",
"path": "/repos/:name/:repo/hooks/:id/config",
"origin": "https://${GITHUB_TOKEN}@${GITHUB_API}"
}
]
}
6 changes: 6 additions & 0 deletions test/fixtures/accept/github.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@
"method": "POST",
"path": "/repos/:name/:repo/pulls/:pullRef/reviews",
"origin": "https://${GITHUB_TOKEN}@${GITHUB_API}"
},
{
"//": "allow webhook configs to be updated, to allow for secret upgrades",
"method": "PATCH",
"path": "/repos/:name/:repo/hooks/:id/config",
"origin": "https://${GITHUB_TOKEN}@${GITHUB_API}"
}
]
}
Loading

0 comments on commit 68b1019

Please sign in to comment.