Skip to content

Commit

Permalink
dist release 📦 - created via Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jbjonesjr committed Mar 10, 2021
1 parent 329f770 commit fa06e90
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3521,7 +3521,7 @@ module.exports = {
if (!context.octokit) { octokit = new Octokit() } else { octokit = context.octokit }

const reminder = parseReminder(command.name + ' ' + command.arguments)
reminder.class = 'reminders2.0';
reminder.class = 'reminders2.0'

if (reminder) {
if (reminder.who === 'me') {
Expand Down Expand Up @@ -101810,19 +101810,13 @@ module.exports = {
const match = body.match(regex)

if (match) {
let data = JSON.parse(match[1])[process.env.GITHUB_ACTION]
if(!data){
let obj = JSON.parse(match[1]);
console.log('json-parse', obj);
for (const [appid, value] of Object.entries(obj)) {
console.log(`${appid}: ${value}`);
console.log(obj[appid].who)
console.log(obj[appid].what)
console.log(obj[appid].when)
console.log(obj[appid].hasOwnProperty('who') && obj[appid].hasOwnProperty('when') && obj[appid].hasOwnProperty('what'))
data = (obj[appid].hasOwnProperty('who') && obj[appid].hasOwnProperty('when') && obj[appid].hasOwnProperty('what')) ? obj[appid] : null;
let obj = JSON.parse(match[1])
let data = obj[process.env.GITHUB_ACTION]
if (!data) {
// attempt to rescue orphaned data
for (const [appid] of Object.entries(obj)) {
data = (obj[appid].hasOwnProperty('class') && obj[appid].class === 'reminders2.0') || (obj[appid].hasOwnProperty('who') && obj[appid].hasOwnProperty('when') && obj[appid].hasOwnProperty('what')) ? obj[appid] : null
}

}
return key ? data && data[key] : data
}
Expand Down

0 comments on commit fa06e90

Please sign in to comment.