The job_run_logs table tracks scheduled job orchestration, not individual worker jobs. Worker info (worker_id, worker_hostname) belongs on dispensary_crawl_jobs, not job_run_logs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
18 lines
406 B
JavaScript
18 lines
406 B
JavaScript
module.exports = function (pkg) {
|
|
var m;
|
|
if (m = match(JSON.stringify(pkg.repository))) {
|
|
return m;
|
|
}
|
|
else if (m = match(JSON.stringify(pkg))) {
|
|
return m;
|
|
}
|
|
return undefined;
|
|
};
|
|
|
|
function match (str) {
|
|
var m = /\bgithub.com[:\/]([^\/"]+)\/([^\/"]+)/.exec(str);
|
|
if (m) {
|
|
return 'https://github.com/' + m[1] + '/' + m[2].replace(/\.git$/, '');
|
|
}
|
|
}
|