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

allow specifying project when opening an issue #119

Closed
joemiller opened this issue Sep 6, 2024 · 4 comments
Closed

allow specifying project when opening an issue #119

joemiller opened this issue Sep 6, 2024 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@joemiller
Copy link

It would be nice if we could set the 'project' attribute of an issue when opening.

Use case is... A team using GH Projects to organize issues from one or more repos into a view of open issues and prioritize them, etc. Having automated issues (failures) from certain CI jobs added to a project board would improve visibility of these failures and allow them to be prioritized by the team.

@jayqi
Copy link
Owner

jayqi commented Sep 9, 2024

Hmm... as far as I can tell, the GitHub REST API does not support projects. It looks like maybe the GraphQL API does though.

https://docs.github.com/en/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects#updating-projects

I've never used GraphQL before so it'll take me some time and effort to figure out how this would be implemented.

@jayqi jayqi added enhancement New feature or request help wanted Extra attention is needed labels Sep 9, 2024
@joemiller
Copy link
Author

joemiller commented Sep 9, 2024

@jayqi Ah, I did not realize that :(
thank you!

the gh cli has this option. i am assuming it uses the graphql api. not sure if perhaps shelling out to gh could be an option since it is likely to be available in the environment, i think

@joemiller
Copy link
Author

joemiller commented Sep 9, 2024

One of my co-workers showed me the workflows feature inside github projects. There's a simple rule that can be configured via the web ui where all issues created in a repo can automatically be added to a project. This can be further scoped by tags, eg: "add all issues opened | reopened in repo foo with label bar to project my-project". With this behavior there's much less need for this feature in this Action.

(I figure I will leave this issue open in case there's a scenario i am not considering that someone else might have which would benefit from the Action being able to add an issue to a project. Feel free to close it.)

@jayqi jayqi closed this as completed in f73389a Sep 11, 2024
@jayqi
Copy link
Owner

jayqi commented Sep 11, 2024

I've added documentation to the README about the auto-add workflow. Configuring this with the project feels clearer to me anyways, since repos and projects are many-to-many, and this action is associated directly with a repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants