Is it possible to assign GitHub issues directly to project boards when creating the issue in Visual Studio Code using GitHub pull requests and issues?

Viewed 208

Environment:

  • VSCode installed
  • Signed in to GitHub in VSCode
  • "GitHub pull requests and issues" extension installed
  • Single repository open that has known project boards, eg. "General"

Explanation:
If I open the Command Palette in VSCode and type "GitHub Issues: Create an issue" and press enter, a file opens. The file is called "NewIssue.md" and contains the following:

Issue Title

Assignees: Comma-separated usernames, either @username or just username.
Labels: Comma-separated labels.


<!-- Edit the body of your new issue then click the ✓ "Create Issue" button in the top right of
the editor. The first line will be the issue title. Assignees and Labels follow after a blank
line. Leave an empty line before beginning the body of the issue. -->

I am able to create an issue and body with a title as suggested in the comment block.

Is there a way to assign this to a project board within this file?
I have tried adding Projects: General below Labels:
It created the issue but did not automatically assign it to the project board.

Thanks

1 Answers

If you are using the beta project board, you can use this action: https://github.com/marketplace/actions/add-to-github-projects-beta to add issues to your board from a workflow.

The action is pretty well documented but the overall idea is you have a workflow that is triggered on new issues or changes to existing issue labels and if the labels match a list that you define, then the issue is added to the board.

Related