-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
I have two actions that create annotations after running eslint & stylelint but I have yet to move them to v2. They run fine in v2 workflows though and annotations are created as you'd expect.
I'm trying to setup a new action that creates annotations just like my other actions but using the toolkit packages. I'm able to create a checks run using GITHUB_TOKEN
and the github client, but I'm not able to call the update checks function with the annotations. I keep getting a 422 response back. Are there differences between v1 and v2 actions that would prevent this from working?
This call works:
const githubClient = new github.GitHub(core.getInput("repo-token", { required: true }));
const { data } = await githubClient.checks.create({
...github.context.repo,
name: github.context.action,
head_sha: github.context.sha,
started_at: new Date().toISOString(),
});
But this call doesn't:
const githubClient = new github.GitHub(core.getInput("repo-token", { required: true }));
const { data} = await githubClient.checks.update({
...github.context.repo,
check_run_id: id, // data.id from the first call
completed_at: new Date().toISOString(),
conclusion: conclusion,
output,
status: "completed",
});
Metadata
Metadata
Assignees
Labels
No labels