MCPcopy
hub / github.com/ThatGuySam/doesitarm / lookForLastUpdated

Function lookForLastUpdated

helpers/build-app-list.js:237–274  ·  view source on GitHub ↗
(app, commits)

Source from the content-addressed store, hash-verified

235
236
237const 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
277async function fetchBundleGenres () {

Callers 1

buildReadmeAppListFunction · 0.85

Calls 1

getAppEndpointFunction · 0.90

Tested by

no test coverage detected