diff --git a/dist/index.js b/dist/index.js index 209b7620..40deefb9 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2421,7 +2421,7 @@ const core = __nccwpck_require__(186) */ function logActionRefWarning() { const actionRef = process.env.GITHUB_ACTION_REF - const repoName = process.env.GITHUB_REPOSITORY + const repoName = process.env.GITHUB_ACTION_REPOSITORY if (actionRef === 'main' || actionRef === 'master') { core.warning( @@ -2437,8 +2437,29 @@ function logActionRefWarning() { } } +/** + * Displays warning message if the repository is under the nearform organisation + */ +function logRepoWarning() { + const actionRepo = process.env.GITHUB_ACTION_REPOSITORY + const [repoOrg, repoName] = actionRepo.split('/') + const newOrg = 'nearform-actions' + + if (repoOrg != newOrg) { + core.warning( + `The '${repoName}' action, no longer exists under the '${repoOrg}' organisation.\n` + + `Please update it to '${newOrg}', you can do this\n` + + `by updating your Github Workflow file from:\n\n` + + ` uses: '${repoOrg}/${repoName}'\n\n` + + `to:\n\n` + + ` uses: '${newOrg}/${repoName}'\n\n` + ) + } +} + module.exports = { - logActionRefWarning + logActionRefWarning, + logRepoWarning } @@ -3235,7 +3256,7 @@ module.exports = require("util"); /***/ ((module) => { "use strict"; -module.exports = JSON.parse('{"name":"github-action-merge-dependabot","version":"3.5.4","description":"A GitHub action to automatically merge and approve Dependabot pull requests","main":"src/index.js","scripts":{"build":"ncc build src/index.js","lint":"eslint .","test":"tap test/**.test.js","prepare":"husky install"},"author":{"name":"Salman Mitha","email":"SalmanMitha@gmail.com"},"contributors":["Simone Busoli "],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/fastify/github-action-merge-dependabot.git"},"bugs":{"url":"https://github.com/fastify/github-action-merge-dependabot/issues"},"homepage":"https://github.com/fastify/github-action-merge-dependabot#readme","dependencies":{"@actions/core":"^1.9.1","@actions/github":"^5.1.1","actions-toolkit":"github:nearform/actions-toolkit","gitdiff-parser":"^0.2.2","semver":"^7.3.8"},"devDependencies":{"@vercel/ncc":"^0.36.0","eslint":"^8.31.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","husky":"^8.0.2","prettier":"^2.8.1","proxyquire":"^2.1.3","sinon":"^15.0.1","tap":"^16.3.2"}}'); +module.exports = JSON.parse('{"name":"github-action-merge-dependabot","version":"3.6.0","description":"A GitHub action to automatically merge and approve Dependabot pull requests","main":"src/index.js","scripts":{"build":"ncc build src/index.js","lint":"eslint .","test":"tap test/**.test.js","prepare":"husky install"},"author":{"name":"Salman Mitha","email":"SalmanMitha@gmail.com"},"contributors":["Simone Busoli "],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/fastify/github-action-merge-dependabot.git"},"bugs":{"url":"https://github.com/fastify/github-action-merge-dependabot/issues"},"homepage":"https://github.com/fastify/github-action-merge-dependabot#readme","dependencies":{"@actions/core":"^1.9.1","@actions/github":"^5.1.1","actions-toolkit":"github:nearform/actions-toolkit","gitdiff-parser":"^0.2.2","semver":"^7.3.8"},"devDependencies":{"@vercel/ncc":"^0.36.1","eslint":"^8.33.0","eslint-config-prettier":"^8.6.0","eslint-plugin-prettier":"^4.2.1","husky":"^8.0.3","prettier":"^2.8.3","proxyquire":"^2.1.3","sinon":"^15.0.1","tap":"^16.3.4"}}'); /***/ }) diff --git a/package-lock.json b/package-lock.json index a9b5cf10..70a8f863 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "github-action-merge-dependabot", - "version": "3.5.4", + "version": "3.6.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "github-action-merge-dependabot", - "version": "3.5.4", + "version": "3.6.0", "license": "MIT", "dependencies": { "@actions/core": "^1.9.1", diff --git a/package.json b/package.json index 8f5e4600..4ad69876 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "github-action-merge-dependabot", - "version": "3.5.4", + "version": "3.6.0", "description": "A GitHub action to automatically merge and approve Dependabot pull requests", "main": "src/index.js", "scripts": {