Body fixes
This commit is contained in:
26
.github/workflows/build.yml
vendored
26
.github/workflows/build.yml
vendored
@@ -151,7 +151,7 @@ jobs:
|
|||||||
const ownerName = 'debridmediamanager';
|
const ownerName = 'debridmediamanager';
|
||||||
const repoName = 'zurg-early-releases';
|
const repoName = 'zurg-early-releases';
|
||||||
const tagName = '${{ steps.version.outputs.version }}';
|
const tagName = '${{ steps.version.outputs.version }}';
|
||||||
const releaseName = `Release ${tagName}`;
|
const releaseName = `${tagName}`;
|
||||||
|
|
||||||
let lastReleaseTime;
|
let lastReleaseTime;
|
||||||
let hoursSinceLastRelease = 'N/A';
|
let hoursSinceLastRelease = 'N/A';
|
||||||
@@ -170,7 +170,7 @@ jobs:
|
|||||||
}
|
}
|
||||||
|
|
||||||
const sponsorshipDetails = `
|
const sponsorshipDetails = `
|
||||||
Support our project:
|
Support [Debrid Media Manager](https://debridmediamanager.com/) and [zurg](https://github.com/debridmediamanager/zurg-testing/) development by becoming a sponsor:
|
||||||
- Patreon: https://www.patreon.com/debridmediamanager
|
- Patreon: https://www.patreon.com/debridmediamanager
|
||||||
- GitHub Sponsors: https://github.com/sponsors/debridmediamanager
|
- GitHub Sponsors: https://github.com/sponsors/debridmediamanager
|
||||||
- PayPal: https://paypal.me/yowmamasita
|
- PayPal: https://paypal.me/yowmamasita
|
||||||
@@ -179,39 +179,41 @@ jobs:
|
|||||||
async function getGithubSponsors() {
|
async function getGithubSponsors() {
|
||||||
const query = `
|
const query = `
|
||||||
query {
|
query {
|
||||||
viewer {
|
organization(login: "debridmediamanager") {
|
||||||
sponsorshipsAsMaintainer(first: 100) {
|
sponsorshipsAsMaintainer(first: 100) {
|
||||||
nodes {
|
nodes {
|
||||||
sponsorEntity {
|
sponsorEntity {
|
||||||
... on User {
|
... on User {
|
||||||
login
|
login
|
||||||
}
|
}
|
||||||
|
... on Organization {
|
||||||
|
login
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}`;
|
||||||
`;
|
|
||||||
try {
|
try {
|
||||||
const response = await github.graphql(query);
|
const response = await github.graphql(query);
|
||||||
return response.viewer.sponsorshipsAsMaintainer.nodes
|
const sponsors = response.viewer.sponsorshipsAsMaintainer.nodes
|
||||||
.filter(node => node.sponsorEntity)
|
.filter(node => node.sponsorEntity)
|
||||||
.map(node => node.sponsorEntity.login);
|
.map(node => '@' + node.sponsorEntity.login);
|
||||||
|
return sponsors.join(' ');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error fetching GitHub sponsors: ", error);
|
console.error("Error fetching GitHub sponsors: ", error);
|
||||||
return [];
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const githubSponsors = await getGithubSponsors();
|
|
||||||
|
|
||||||
const releaseBody = `
|
const releaseBody = `
|
||||||
Release: ${tagName}
|
Version: ${tagName}
|
||||||
|
Commit: '[${{ github.sha }}](https://github.com/debridmediamanager/zurg/commit/'${{ github.sha }}')'
|
||||||
Hours since last release: ${hoursSinceLastRelease} hours
|
Hours since last release: ${hoursSinceLastRelease} hours
|
||||||
|
|
||||||
${sponsorshipDetails}
|
${sponsorshipDetails}
|
||||||
|
|
||||||
Shoutouts to our amazing sponsors! ${githubSponsors.join(', ')}
|
Shoutouts to our amazing sponsors! ${await getGithubSponsors()}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const response = await github.rest.repos.createRelease({
|
const response = await github.rest.repos.createRelease({
|
||||||
|
|||||||
Reference in New Issue
Block a user