Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

project-push-rules delete broken #2941

Open
Labels
@skycaptain

Description

@skycaptain

Description of the problem, including code/CLI snippet

I'm trying to delete a project push rule, but it results in a KeyError.

$ gitlab project-push-rules delete --project-id 1234Traceback (most recent call last):  File"/Users/[redacted]/.local/bin/gitlab", line 8,in<module>sys.exit(main())             ^^^^^^  File"/Users/[redacted]/.local/pipx/venvs/python-gitlab/lib/python3.12/site-packages/gitlab/cli.py", line 418,in main    gitlab.v4.cli.run(  File"/Users/[redacted]/.local/pipx/venvs/python-gitlab/lib/python3.12/site-packages/gitlab/v4/cli.py", line 588,in run    data =g_cli.run()           ^^^^^^^^^^^  File"/Users/[redacted]/.local/pipx/venvs/python-gitlab/lib/python3.12/site-packages/gitlab/v4/cli.py", line 79,in runreturn getattr(self,method)()           ^^^^^^^^^^^^^^^^^^^^^^^  File"/Users/[redacted]/.local/pipx/venvs/python-gitlab/lib/python3.12/site-packages/gitlab/v4/cli.py", line 181,in do_delete    id = self.args.pop(self.cls._id_attr)         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^KeyError: None

I can get the project push rule successfully usinggitlab -o json project-push-rules get --project-id 1234, so the rule exists and my token works.

Expected Behavior

No error, project rule gets deleted.

Actual Behavior

KeyError. See above.

Specifications

  • python-gitlab version: 4.8.0
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): v17.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp