Skip to content

Commit b5e290f

Browse files
committed
TEST adjust to Cygwin
This will need to be done via overriding the `defaultConfig`. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent ac95f8e commit b5e290f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

GitGitGadget/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@ module.exports = async (context, req) => {
3232
* the `gitgitgadget/git` and the `git/git` repository (with the
3333
* `dscho/git` one thrown in for debugging purposes).
3434
*/
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']
3737

3838
const eventType = context.req.headers['x-github-event'];
3939
context.log(`Got eventType: ${eventType}`);
4040
const repositoryOwner = req.body.repository.owner.login;
4141
if (!orgs.includes(repositoryOwner)) {
4242
context.res = {
4343
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(', ')}`,
4545
};
4646
} else if (eventType === 'pull_request') {
4747
if (req.body.action !== 'opened' && req.body.action !== 'synchronize') {
@@ -59,9 +59,9 @@ module.exports = async (context, req) => {
5959
body: `Ignored event type: ${eventType}`,
6060
};
6161
} 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') {
6363
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') {
6565
const queued = await listWorkflowRuns(...a, 'handle-new-mails.yml', 'queued')
6666
if (queued.length) {
6767
context.res.body += [
@@ -73,7 +73,7 @@ module.exports = async (context, req) => {
7373
context.res.body += `triggered ${run.html_url}`
7474
}
7575
} 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') {
7777
context.res = { body: `Ignoring pushes to ${req.body.repository.full_name}` }
7878
} else {
7979
const run = await triggerWorkflowDispatch(
@@ -84,7 +84,7 @@ module.exports = async (context, req) => {
8484
}
8585
)
8686
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)) {
8888
for (const workflow of ['update-prs.yml', 'update-mail-to-commit-notes.yml']) {
8989
if ((await listWorkflowRuns(...a, workflow, 'main', 'queued')).length === 0) {
9090
const run = await triggerWorkflowDispatch(...a, workflow, 'main')

0 commit comments

Comments
 (0)