Skip to content

Commit

Permalink
fixes for standard style
Browse files Browse the repository at this point in the history
  • Loading branch information
jbjonesjr authored Mar 10, 2021
1 parent 56a7921 commit 329f770
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions lib/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ module.exports = {
const match = body.match(regex)

if (match) {
let obj = JSON.parse(match[1]);
let obj = JSON.parse(match[1])
let data = obj[process.env.GITHUB_ACTION]
if(!data){
//attempt to rescue orphaned data
for (const [appid, value] 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;
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
2 changes: 1 addition & 1 deletion lib/reminders.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,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

0 comments on commit 329f770

Please sign in to comment.