Mirror: TypeScript LSP plugin that finds GraphQL documents in your code and provides diagnostics, auto-complete and hover-information.

chore: Add discord-message action logging

Changed files
+4 -6
.github
actions
discord-message
+4 -6
.github/actions/discord-message/action.mjs
···
async function getReleaseBody(name, version) {
const tag = `${name}@${version}`;
-
const result = await octokit.rest.repos.getReleaseByTag({
-
owner: 'urql-graphql',
-
repo: 'urql',
-
tag,
-
});
+
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
+
const result = await octokit.rest.repos.getReleaseByTag({ owner, repo, tag });
const release = result.status === 200 ? result.data : undefined;
if (!release || !release.body) return;
···
});
if (!response.ok) {
-
console.log('Something went wrong while sending the discord webhook.');
+
console.error('Something went wrong while sending the discord webhook.', response.status);
+
console.error(await response.text());
return;
}