Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Rebase fails in YOLOv5 #86

Closed
glenn-jocher opened this issue Oct 19, 2021 · 1 comment
Closed

Rebase fails in YOLOv5 #86

glenn-jocher opened this issue Oct 19, 2021 · 1 comment

Comments

@glenn-jocher
Copy link

glenn-jocher commented Oct 19, 2021

Hi, we are using this action in YOLOv5 to rebase PRs. This is great when it works, but unfortunately most attempts result in errors, even after upgrading to the latest version 1.4. Two example failures are here, and anyone should be able to reproduce/produce these failures by going to any YOLOv5 PR and typing '/rebase' in a message.

Example 1:

https://github.com/ultralytics/yolov5/actions/runs/1358138228 run on PR ultralytics/yolov5#5213

Successfully rebased and updated refs/heads/cfati_work.
+ git push --force-with-lease fork cfati_work
To https://github.com/CristiFati/yolov5.git
 ! [remote rejected] cfati_work -> cfati_work (refusing to allow a GitHub App to create or update workflow `.github/workflows/rebase.yml` without `workflows` permission)
error: failed to push some refs to 'https://github.com/CristiFati/yolov5.git'

Example 2:

https://github.com/ultralytics/yolov5/actions/runs/1358133720 run on PR ultralytics/yolov5#5225

Run cirrus-actions/rebase@1.4
/usr/bin/docker run --name fa4e144cdbdebf242f4225a18ff9f3f5b7e4a4_d2dba2 --label fa4e14 --workdir /github/workspace --rm -e GITHUB_TOKEN -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/yolov5/yolov5":"/github/workspace" fa4e14:4cdbdebf242f4225a18ff9f3f5b7e4a4
Collecting information about PR #5225 of ultralytics/yolov5...
Base branch for PR #5225 is master
+ git fetch origin master
From https://github.com/ultralytics/yolov5
 * branch            master     -> FETCH_HEAD
+ git fetch fork master
From https://github.com/python-pitfalls/yolov5
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> fork/master
+ git checkout -b master fork/master
fatal: A branch named 'master' already exists.

Reproduce

Go to https://github.com/ultralytics/yolov5/pulls and create a new /rebase message on any PR, and then visit action results at https://github.com/ultralytics/yolov5/actions/workflows/rebase.yml

Additional Information

Our rebase.yml is here, and is an exact copy of the official usage example:
https://github.com/ultralytics/yolov5/blob/master/.github/workflows/rebase.yml

@glenn-jocher
Copy link
Author

UPDATE: this is issue has been resolved by creating a new personal access token with workflows permissions, and then adding token value to organization secrets, and replacing GITHUB_TOKEN with new secrets name (ACTIONS_TOKEN in our case).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant