Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GithubException: 422 {"message": "refs/tags/ is not a valid ref name #3

Open
minerop5000 opened this issue Feb 3, 2024 · 0 comments

Comments

@minerop5000
Copy link

action setup:

      - name: Commit and push
        uses: Amraneze/push-to-protected-branch@v1.5.0
        with:
          repository: ${{ github.repository }}
          branch_name: main
          github_token: ${{ secrets.PAT_CLASSIC_REPO }}
          commit_message: "bump version ${{ steps.gitversion.outputs.majorMinorPatch }}"
          files_to_commit: "pubspec.yaml"

is running as:

Run Amraneze/push-to-protected-branch@v1.5.0
  with:
    repository: budgetiser/budgetiser
    branch_name: main
    github_token: ***
    commit_message: bump version 1.10.19
    files_to_commit: pubspec.yaml
    create_tag: false

I get this error message:

Traceback (most recent call last):
  File "/action/workspace/main.py", line 27, in <module>
    repository.create_git_ref(
  File "/usr/local/lib/python3.8/site-packages/github/Repository.py", line 970, in create_git_ref
    headers, data = self._requester.requestJsonAndCheck(
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 353, in requestJsonAndCheck
    return self.__check(
  File "/usr/local/lib/python3.8/site-packages/github/Requester.py", line 378, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 422 {"message": "refs/tags/ is not a valid ref name.", "documentation_url": "https://docs.github.com/rest/git/refs#create-a-reference"}

Help would be appreciated!

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

No branches or pull requests

1 participant