Skip to content

Commit

Permalink
Update log-contribution.js
Browse files Browse the repository at this point in the history
Welp. Simplifying did not work. Let's try complexifying!

Signed-off-by: Sean P. Goggins <s@goggins.com>
  • Loading branch information
sgoggins authored Aug 28, 2024
1 parent 57ff48d commit 530302f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions log-contribution.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,25 @@ const github = require('@actions/github');
// Split the issue body by lines
const lines = issueBody.split('\n');

// Logging lines for debugging
console.log('Split lines:', lines);

// Iterate over each line and extract values
lines.forEach((line, index) => {
if (line.includes('Specify Area of Project')) {
projectArea = lines[index + 1].trim();
console.log('Extracted Project Area:', projectArea);
}
if (line.includes('Date of Completion')) {
dateCompleted = lines[index + 1].trim();
console.log('Extracted Date Completed:', dateCompleted);
}
if (line.includes('Specify the type of contribution')) {
typeOfContribution = lines[index + 1].trim();
console.log('Extracted Type of Contribution:', typeOfContribution);
}
});

console.log('Project Area:', projectArea);
console.log('Date Completed:', dateCompleted);
console.log('Type of Contribution:', typeOfContribution);

// Assume the task description comes from the issue title
const taskCompleted = issue.title.replace('[Project]:', '').trim();

Expand Down

0 comments on commit 530302f

Please sign in to comment.