Skip to content

Commit 31edbe5

Browse files
committed
Simplify the triggerWorkflowDispatch() call
This is easier to read, and it will make similar calls that I am about to introduce also easier to read. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 5aebcfd commit 31edbe5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

GitGitGadget/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ module.exports = async (context, req) => {
4444
'git': 13,
4545
'gitgitgadget': 3,
4646
};
47+
const a = [context, undefined, 'gitgitgadget-workflows', 'gitgitgadget-workflows']
4748

4849
const eventType = context.req.headers['x-github-event'];
4950
context.log(`Got eventType: ${eventType}`);
@@ -62,10 +63,7 @@ module.exports = async (context, req) => {
6263
context.res = { body: `Ignoring pushes to ${req.body.repository.full_name}` }
6364
} else {
6465
const run = await triggerWorkflowDispatch(
65-
context,
66-
undefined,
67-
'gitgitgadget-workflows',
68-
'gitgitgadget-workflows',
66+
...a,
6967
'sync-ref.yml',
7068
'main', {
7169
ref: req.body.ref

0 commit comments

Comments
 (0)