Skip to content

Commit f9644aa

Browse files
committed
chore: Add discord-message action logging
1 parent c063ef6 commit f9644aa

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.github/actions/discord-message/action.mjs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,8 @@ const formatBody = (input) => {
2828

2929
async function getReleaseBody(name, version) {
3030
const tag = `${name}@${version}`;
31-
const result = await octokit.rest.repos.getReleaseByTag({
32-
owner: 'urql-graphql',
33-
repo: 'urql',
34-
tag,
35-
});
31+
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
32+
const result = await octokit.rest.repos.getReleaseByTag({ owner, repo, tag });
3633

3734
const release = result.status === 200 ? result.data : undefined;
3835
if (!release || !release.body) return;
@@ -75,7 +72,8 @@ async function main() {
7572
});
7673

7774
if (!response.ok) {
78-
console.log('Something went wrong while sending the discord webhook.');
75+
console.error('Something went wrong while sending the discord webhook.', response.status);
76+
console.error(await response.text());
7977
return;
8078
}
8179

0 commit comments

Comments
 (0)