(app, commits)
| 235 | |
| 236 | |
| 237 | const lookForLastUpdated = function (app, commits) { |
| 238 | |
| 239 | for (const { node: commit } of commits) { |
| 240 | |
| 241 | // console.log('commit', commit) |
| 242 | |
| 243 | const appEndpoint = getAppEndpoint(app) |
| 244 | |
| 245 | // $$ If message body contains endpoint |
| 246 | if (commit.messageBody.includes(appEndpoint)) { |
| 247 | // console.log('Found', app.name ,commit.committedDate) |
| 248 | return commit.committedDate |
| 249 | } |
| 250 | |
| 251 | // $$ If message body contains App Name |
| 252 | if (commit.messageBody.includes(app.name)) { |
| 253 | // console.log('Found', app.name ,commit.committedDate) |
| 254 | return commit.committedDate |
| 255 | } |
| 256 | |
| 257 | // $$ If message headline contains App Name |
| 258 | if (commit.messageHeadline.includes(app.name)) { |
| 259 | // console.log('Found', app.name ,commit.committedDate) |
| 260 | return commit.committedDate |
| 261 | } |
| 262 | |
| 263 | // $$$ If commits comments contains endpoint |
| 264 | for (const { node: comment } of commit.comments.edges) { |
| 265 | if (comment.body.includes(appEndpoint)) { |
| 266 | // console.log('Found', app.name ,commit.committedDate) |
| 267 | return commit.committedDate |
| 268 | } |
| 269 | } |
| 270 | |
| 271 | } |
| 272 | |
| 273 | return null |
| 274 | } |
| 275 | |
| 276 | // Fetch list of genres for each bundle |
| 277 | async function fetchBundleGenres () { |
no test coverage detected