SvanBoxel / delete-merged-branch

No more manually deleting merged branches, this lovely app does it for you.
https://github.com/apps/delete-merged-branch/
ISC License
322 stars 55 forks source link

Unable to delete branches suddenly #257

Open gaiksaya opened 2 weeks ago

gaiksaya commented 2 weeks ago

Thank you for creating this GitHub Action.

However, recently all our workflows are failing with below error:

2024-06-13T16:29:54.9267760Z Download action repository 'SvanBoxel/delete-merged-branch@main' (SHA:2b5b058e3db41a3328fd9a6a58fd4c2545a14353)
2024-06-13T16:29:55.4175299Z Complete job name: delete-branch
2024-06-13T16:29:55.5162644Z ##[group]Run SvanBoxel/delete-merged-branch@main
2024-06-13T16:29:55.5163384Z with:
2024-06-13T16:29:55.5163749Z env:
2024-06-13T16:29:55.5164357Z   GITHUB_TOKEN: ***
2024-06-13T16:29:55.5164830Z ##[endgroup]
2024-06-13T16:29:55.8058704Z 16:29:55.799Z  INFO probot: Loaded delete-merged-branch GitHub Application
2024-06-13T16:30:10.4118946Z Deprecation: [@octokit/request-error] `error.code` is deprecated, use `error.status`.
2024-06-13T16:30:10.4121833Z     at RequestError.get (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/main/dist/index.js:15092:17)
2024-06-13T16:30:10.4124827Z     at Object.Logger.stdSerializers.err (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/main/dist/index.js:27356:19)
2024-06-13T16:30:10.4127225Z 16:30:10.411Z ERROR event: Not Found (id=acc3c91a-5818-467e-bf35-720f5ca7df58)
2024-06-13T16:30:10.4130820Z     at /home/runner/work/_actions/SvanBoxel/delete-merged-branch/main/dist/index.js:27081:50
2024-06-13T16:30:10.4132489Z     at Array.forEach (<anonymous>)
2024-06-13T16:30:10.4134345Z     at Logger._applySerializers (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/main/dist/index.js:27073:35)
2024-06-13T16:30:10.4136515Z     at mkRecord (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/main/dist/index.js:27186:17)
2024-06-13T16:30:10.4138470Z     at Logger.error (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/main/dist/index.js:27252:19)
2024-06-13T16:30:10.4140562Z     at Application.<anonymous> (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/main/dist/index.js:84794:33)
2024-06-13T16:30:10.4142576Z     at step (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/main/dist/index.js:84675:23)
2024-06-13T16:30:10.4144480Z     at Object.throw (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/main/dist/index.js:84656:53)
2024-06-13T16:30:10.4146396Z     at rejected (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/main/dist/index.js:84648:65)
2024-06-13T16:30:10.4152523Z   HttpError: Not Found
2024-06-13T16:30:10.4154374Z       at /home/runner/work/_actions/SvanBoxel/delete-merged-branch/main/dist/index.js:15192:23
2024-06-13T16:30:10.4155844Z       at processTicksAndRejections (node:internal/process/task_queues:96:5)
2024-06-13T16:30:10.4157554Z       at async Job.doExecute (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/main/dist/index.js:23942:18)
2024-06-13T16:30:10.4158776Z   --
2024-06-13T16:30:10.4161411Z   event: {
2024-06-13T16:30:10.4162052Z     "event": "pull_request.closed",
2024-06-13T16:30:10.4162949Z     "id": "acc3c91a-5818-467e-bf35-720f5ca7df58",
2024-06-13T16:30:10.4164100Z     "repository": "opensearch-project/opensearch-build-libraries"
2024-06-13T16:30:10.4164915Z   }
2024-06-13T16:30:10.4197401Z ##[error]Action failed with error: Not Found
2024-06-13T16:30:10.4206952Z 16:30:10.412Z ERROR probot: Not Found
2024-06-13T16:30:10.4207925Z   HttpError: Not Found
2024-06-13T16:30:10.4209215Z       at /home/runner/work/_actions/SvanBoxel/delete-merged-branch/main/dist/index.js:15192:23
2024-06-13T16:30:10.4210748Z       at processTicksAndRejections (node:internal/process/task_queues:96:5)
2024-06-13T16:30:10.4212789Z       at async Job.doExecute (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/main/dist/index.js:23942:18)

https://github.com/opensearch-project/opensearch-build-libraries/actions/runs/9503330318/job/26193506264#step:2:30

Did something change or need permission updates or something?

devOpsTeamBM commented 2 weeks ago

Have same errors!

SvanBoxel commented 2 weeks ago

Does it still work if you point the action to and older version? e.g. 1.4.2?

gaiksaya commented 2 weeks ago

Hi @SvanBoxel

Just tried, seeing the same error:

2024-06-17T17:45:01.0208677Z env:
2024-06-17T17:45:01.0209206Z   GITHUB_TOKEN: ***
2024-06-17T17:45:01.0209532Z ##[endgroup]
2024-06-17T17:45:01.2900216Z 17:45:01.285Z  INFO probot: Loaded delete-merged-branch GitHub Application
2024-06-17T17:45:16.2572474Z Deprecation: [@octokit/request-error] `error.code` is deprecated, use `error.status`.
2024-06-17T17:45:16.2574688Z     at RequestError.get (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/1.4.2/dist/index.js:15092:17)
2024-06-17T17:45:16.2577158Z     at Object.Logger.stdSerializers.err (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/1.4.2/dist/index.js:27356:19)
2024-06-17T17:45:16.2579366Z     at /home/runner/work/_actions/SvanBoxel/delete-merged-branch/1.4.2/dist/index.js:27081:50
2024-06-17T17:45:16.2581162Z 17:45:16.256Z ERROR event: Not Found (id=604c1d15-274e-4e26-bb5f-8fe58f70b708)
2024-06-17T17:45:16.2591651Z     at Array.forEach (<anonymous>)
2024-06-17T17:45:16.2592331Z   HttpError: Not Found
2024-06-17T17:45:16.2593436Z       at /home/runner/work/_actions/SvanBoxel/delete-merged-branch/1.4.2/dist/index.js:15192:23
2024-06-17T17:45:16.2594654Z       at processTicksAndRejections (node:internal/process/task_queues:96:5)
2024-06-17T17:45:16.2596210Z       at async Job.doExecute (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/1.4.2/dist/index.js:23942:18)
2024-06-17T17:45:16.2597287Z   --
2024-06-17T17:45:16.2597732Z   event: {
2024-06-17T17:45:16.2598132Z     "event": "pull_request.closed",
2024-06-17T17:45:16.2598806Z     "id": "604c1d15-274e-4e26-bb5f-8fe58f70b708",
2024-06-17T17:45:16.2599640Z     "repository": "gaiksaya/opensearch-build-libraries"
2024-06-17T17:45:16.2600275Z   }
2024-06-17T17:45:16.2625996Z ##[error]Action failed with error: Not Found
2024-06-17T17:45:16.2635177Z 17:45:16.257Z ERROR probot: Not Found
2024-06-17T17:45:16.2635767Z   HttpError: Not Found
2024-06-17T17:45:16.2636890Z       at /home/runner/work/_actions/SvanBoxel/delete-merged-branch/1.4.2/dist/index.js:15192:23
2024-06-17T17:45:16.2638649Z       at processTicksAndRejections (node:internal/process/task_queues:96:5)
2024-06-17T17:45:16.2640204Z       at async Job.doExecute (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/1.4.2/dist/index.js:23942:18)
2024-06-17T17:45:16.2642094Z     at Logger._applySerializers (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/1.4.2/dist/index.js:27073:35)
2024-06-17T17:45:16.2643827Z     at mkRecord (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/1.4.2/dist/index.js:27186:17)
2024-06-17T17:45:16.2645445Z     at Logger.error (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/1.4.2/dist/index.js:27252:19)
2024-06-17T17:45:16.2647282Z     at Application.<anonymous> (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/1.4.2/dist/index.js:84794:33)
2024-06-17T17:45:16.2649024Z     at step (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/1.4.2/dist/index.js:84675:23)
2024-06-17T17:45:16.2650627Z     at Object.throw (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/1.4.2/dist/index.js:84656:53)
2024-06-17T17:45:16.2652438Z     at rejected (/home/runner/work/_actions/SvanBoxel/delete-merged-branch/1.4.2/dist/index.js:84648:65)
YuviGold commented 2 weeks ago

In my case the app stopped working, no errors

Lzyct commented 2 weeks ago

Any update on this issue? Thank you

adamatti commented 2 weeks ago

Same issue

karltud123 commented 1 week ago

+1

SvanBoxel commented 1 week ago

For the people who are using the app, I just redeployed it. That said, I regret to inform you all that I can no longer actively maintain this project. Due to other commitments, I am unable to dedicate the necessary time and resources.

adamatti commented 1 week ago

One alternative:

jobs:
  teardown:
    runs-on: ubuntu-latest
    permissions:
      contents: write # required
...
      name: Delete branch
        if: github.event.pull_request.merged == true #optional
        uses: actions/github-script@v5
        with:
          script: |
            github.rest.git.deleteRef({
              owner: context.repo.owner,
              repo: context.repo.repo,
              ref: `heads/${context.payload.pull_request.head.ref}`,
            })