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

gh issue create with project fails when permissions haven't been assigned #8798

Open
henrygriffiths opened this issue Mar 7, 2024 · 3 comments
Labels
bug Something isn't working gh-issue relating to the gh issue command needs-triage needs to be reviewed

Comments

@henrygriffiths
Copy link

Describe the bug

When creating an issue without the project permissions, the command fails stating could not add to project: 'Project Name' not found

Steps to reproduce the behavior

  1. Run `gh pr issue create --title "Issue Title" --body "" --project "Project Name" without the projects permission

Expected vs actual behavior

The command returned the result could not add to project: not found. When running the project command, it returns the error error: your authentication token is missing required scopes [read:project]

Since the issue is the same, the permission has not been granted, the error should be the same.

Logs

$ gh issue create --title "Issue Title" --body "" --project "Project Name"

Creating issue in ***/***

could not add to project: 'Project Name' not found
@henrygriffiths henrygriffiths added the bug Something isn't working label Mar 7, 2024
@cliAutomation cliAutomation added the needs-triage needs to be reviewed label Mar 7, 2024
@mxie mxie added the gh-issue relating to the gh issue command label Apr 30, 2024
@stanojaros
Copy link

hi, is there any update on this bug? I have a simillar problem when trying to add project with command gh issue edit

@mattclay
Copy link

mattclay commented Nov 1, 2024

Running gh auth refresh -s project updates the token used and allows issues to be assigned to projects.

@henrygriffiths
Copy link
Author

Running gh auth refresh -s project updates the token used and allows issues to be assigned to projects.

Correct, it does fix the issue, however the error message given by the gh cli is still incorrect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working gh-issue relating to the gh issue command needs-triage needs to be reviewed
Projects
None yet
Development

No branches or pull requests

5 participants