Skip to content

Commit

Permalink
feat(issues): Add env and version from app
Browse files Browse the repository at this point in the history
  • Loading branch information
annelhote committed Feb 7, 2025
1 parent de4cab7 commit a222ee4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/src/utils/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const createIssueOpenAlexAffiliations = ({ email, issue }) => {
body += `works_examples: ${workIds}\n`;
body += `searched between: ${startYear} - ${endYear}\n`;
body += `contact: ${encrypt(email.split('@')[0])} @ ${email.split('@')[1]}\n`;
body += `version: ${process.env.npm_package_version}-${process.env.NODE_ENV}`;
return octokit.rest.issues.create({
body,
owner: 'dataesr',
Expand All @@ -86,6 +87,8 @@ const createIssueMentionsCharacterizations = ({ email, issue }) => {
const title = `Correction for mention ${issue.id}`;
// eslint-disable-next-line no-param-reassign
issue.user = `${encrypt(email.split('@')[0])} @ ${email.split('@')[1]}`;
// eslint-disable-next-line no-param-reassign
issue.version = `${process.env.npm_package_version}-${process.env.NODE_ENV}`;
const body = `\`\`\`\n${JSON.stringify(issue, null, 4)}\n\`\`\``;
return octokit.rest.issues.create({
body,
Expand Down

0 comments on commit a222ee4

Please sign in to comment.