probot / stale

A GitHub App built with Probot that closes abandoned Issues and Pull Requests after a period of inactivity.
https://probot.github.io/apps/stale/
ISC License
1.25k stars 212 forks source link

_extends doesn't work as expected #284

Closed robbiemcmichael closed 4 years ago

robbiemcmichael commented 4 years ago

I was attempting to use _extends with Stale, but received this error message:

{
  "name": "event",
  "hostname": "bb1b09193b54",
  "pid": 59,
  "level": 50,
  "err": {
    "message": "Invalid repository name in key \"_extends\": org/repo:path/to/stale.yml",
    "name": "Error",
    "stack": "Error: Invalid repository name in key \"_extends\": org/repo:path/to/stale.yml\n    at getBaseParams (/usr/src/node_modules/probot-config/index.js:56:11)\n    at getConfig (/usr/src/node_modules/probot-config/index.js:96:22)\n    at runMicrotasks (<anonymous>)\n    at processTicksAndRejections (internal/process/task_queues.js:97:5)\n    at async forRepository (/usr/src/index.js:54:18)\n    at async markAndSweep (/usr/src/index.js:48:19)"
  },
  "event": {
    "event": "schedule.repository",
    "installation": 23,
    "repository": "ApplicationInfrastructure/probot-app-tests"
  },
  "msg": "Invalid repository name in key \"_extends\": org/repo:path/to/stale.yml",
  "time": "2020-05-31T23:58:03.987Z",
  "v": 0
}

It seems that the issue is that _extends support is currently provided by probot-config. Stale is using version 0.1.0 which has an old regex which only allows org/repo instead of the new regex which allows org/repo:path. Path support was added to probot-config and is available in version 0.2.0 and above. It's worth pointing out that probot-config has been archived and _extends was added directly to probot in version 9.3.0 and above.

This issue can be resolved by updating the probot-config package to 0.2.0+ or dropping it entirely in favour of probot 9.3.0+. I assume the latter is preferred but don't know what the changes are between the locked version (7.3.1) and the latest version, so I don't know if doing so will be a lot of work.

stale[bot] commented 4 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?