Skip to content

Commit 5bb7b48

Browse files
committed
refactor: ♻️ Archival conditional based on license status
1 parent 876366c commit 5bb7b48

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

bot/compliance-checks/archival/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,12 @@ export function parseZenodoInfo(issueBody) {
166166
* @param {Object} context - GitHub context
167167
* @returns {String} String of updated base template with archival information
168168
*/
169-
export async function applyArchivalTemplate(baseTemplate, repository, owner) {
169+
export async function applyArchivalTemplate(
170+
baseTemplate,
171+
repository,
172+
owner,
173+
subjects
174+
) {
170175
const archiveTitle = `\n\n## FAIR Software Release`;
171176
const badgeURL = `${CODEFAIR_DOMAIN}/dashboard/${owner}/${repository.name}/release/zenodo`;
172177
const alreadyReleaseText = ` of your software was successfully released on GitHub and archived on Zenodo. You can view the Zenodo archive by clicking the button below:`;

bot/utils/renderer/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,12 @@ export async function renderIssues(
189189

190190
// ── ARCHIVAL
191191
step = "applyArchival";
192-
baseTemplate = await applyArchivalTemplate(baseTemplate, repository, owner);
192+
baseTemplate = await applyArchivalTemplate(
193+
baseTemplate,
194+
repository,
195+
owner,
196+
subjects
197+
);
193198
logwatch.info(`Archival template applied`, {
194199
owner,
195200
repo: repository.name,

0 commit comments

Comments
 (0)