microadam / drone-config-changeset-conditional

The Unlicense
65 stars 17 forks source link

Revert "Update to octokit" #34

Closed kdnutrien closed 3 years ago

kdnutrien commented 3 years ago

This reverts commit 1a1155e13fdb68a656133496d318321c1a119821.

kdnutrien commented 3 years ago

wrong repo

microadam commented 3 years ago

:D Any reason you would want to revert this? It was required due to the changes in github authentication and deprecation of username and password auth

kdnutrien commented 3 years ago

According to Dockerhub, the last push was 2 years ago - https://hub.docker.com/r/microadam/drone-config-plugin-changeset-conditional - which implies we were running code from before the octokit changes were made. When I run locally, I get a module resolution error

internal/modules/cjs/loader.js:888
  throw err;
  ^

Error: Cannot find module '@octokit/rest'
Require stack:
- /Users/kevindice/nutrien/ours/drone-config-changeset-conditional/plugin.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
    at Function.Module._load (internal/modules/cjs/loader.js:730:27)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/Users/kevindice/nutrien/ours/drone-config-changeset-conditional/plugin.js:3:21)
    at Module._compile (internal/modules/cjs/loader.js:1068:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/kevindice/nutrien/ours/drone-config-changeset-conditional/plugin.js'
  ]
}

which in hindsight was probably just package.json missing a dep for @octokit/rest. We went ahead and forked this so we could have explicit image tags in our internal ECR repo since using :latest is kinda unsafe, and since we had already deployed the latest changes here, this was a panic revert to get our build system back online....meant to send this PR to our fork, but github was trying to be helpful and defaulted here. We're back to running the latest version published to dockerhub and will get to this Monday.