From 3a357497b2e07f82faf06d98bad7a416cf3e0439 Mon Sep 17 00:00:00 2001 From: gkr-bot Date: Wed, 29 Sep 2021 16:46:42 +0000 Subject: [PATCH] [skip-ci] Published 1.0.5 --- dist/index.js | 8 +++++--- package.json | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index ed061e7..7b5b9ac 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,6 +1,8 @@ -parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;cnew Promise(async(n,c)=>{try{const{outputData:p}=await t("git",["--no-pager","log","-1","--format=%ct"],{encoding:"utf8",stdio:["pipe","pipe","pipe"]}),m=new Date(1e3*parseInt(p,10));Math.round((new Date-m)/864e5)>r?(await t("git",["config","--global","user.email",o]),await t("git",["remote","set-url","origin",`https://${e}@github.com/${process.env.GITHUB_REPOSITORY}.git`]),await t("git",["config","--global","user.name",i]),await t("git",["commit","--allow-empty","-m",`"${a}"`]),n("Dummy commit created to keep the repository active...")):n("Nothing to do...")}catch(g){c(g.toString())}});module.exports={KeepAliveWorkflow:e}; -},{}],"ONtA":[function(require,module,exports) { +parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;cnew Promise((c,i)=>{let u="";const s=t({},n);s.stdio||Object.assign(s,{stdio:["inherit","inherit","inherit"]});const a=o(e,r,s);a.stdout&&a.stdout.on("data",function(e){u+=e.toString()}),a.on("close",e=>0!==e?i({code:e,outputData:u}):c({code:e,outputData:u})),a.on("error",()=>i({code:1,outputData:u}))});module.exports={execute:n}; +},{}],"I9BA":[function(require,module,exports) { +const{execute:t}=require("./util"),e=async(e,i,o,a,r)=>new Promise(async(n,c)=>{try{const{outputData:p}=await t("git",["--no-pager","log","-1","--format=%ct"],{encoding:"utf8",stdio:["pipe","pipe","pipe"]}),m=new Date(1e3*parseInt(p,10));Math.round((new Date-m)/864e5)>r?(await t("git",["config","--global","user.email",o]),await t("git",["remote","set-url","origin",`https://${e}@github.com/${process.env.GITHUB_REPOSITORY}.git`]),await t("git",["config","--global","user.name",i]),await t("git",["commit","--allow-empty","-m",`"${a}"`]),n("Dummy commit created to keep the repository active...")):n("Nothing to do...")}catch(g){c(g.toString())}});module.exports={KeepAliveWorkflow:e}; +},{"./util":"YOqM"}],"ONtA":[function(require,module,exports) { "use strict";function e(e){return null==e?"":"string"==typeof e||e instanceof String?e:JSON.stringify(e)}function t(e){return Object.keys(e).length?{title:e.title,line:e.startLine,endLine:e.endLine,col:e.startColumn,endColumn:e.endColumn}:{}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.toCommandProperties=exports.toCommandValue=void 0,exports.toCommandValue=e,exports.toCommandProperties=t; },{}],"Y3tv":[function(require,module,exports) { "use strict";var e=this&&this.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,s){void 0===s&&(s=r),e[s]=t[r]}),t=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var s={};if(null!=r)for(var i in r)"default"!==i&&Object.hasOwnProperty.call(r,i)&&e(s,r,i);return t(s,r),s};Object.defineProperty(exports,"__esModule",{value:!0}),exports.issue=exports.issueCommand=void 0;const s=r(require("os")),i=require("./utils");function n(e,t,r){const i=new u(e,t,r);process.stdout.write(i.toString()+s.EOL)}function o(e,t=""){n(e,{},t)}exports.issueCommand=n,exports.issue=o;const c="::";class u{constructor(e,t,r){e||(e="missing.command"),this.command=e,this.properties=t,this.message=r}toString(){let e=c+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=!0;for(const r in this.properties)if(this.properties.hasOwnProperty(r)){const s=this.properties[r];s&&(t?t=!1:e+=",",e+=`${r}=${p(s)}`)}}return e+=`${c}${a(this.message)}`}}function a(e){return i.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function p(e){return i.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")} diff --git a/package.json b/package.json index 02c1003..590bbf7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "keepalive-workflow", - "version": "1.0.4", + "version": "1.0.5", "description": "GitHub action to prevent GitHub from suspending your cronjob based trigger due to repository inactivity", "main": "library.js", "scripts": {