Issue form setup
- Alpha
The first interaction point users will have with your IssueOps workflow is the issue itself. This is where they will provide the information needed to kick off the workflow. Because of this, it is important to make sure that the issue form template is set up to capture all the information you need to get started.
For more information on the supported options, see Syntax for issue forms.
The top-level syntax of the issue form template is used to define the title and description that users will see when they go to create an issue in your repository. From a usability perspective, make sure to include a description and title that clearly explains what the user is requesting and what will happen once they submit their issue.
name: Create a new repositorydescription: |Once opened, this issue will cause a new GitHub repository to be created inthe `octocat` organization. You will be granted access as a collaborator soyou can build something awesome!labels:- issueops:new-repositoryprojects:- octocat/123body:# ...
The body
property is where you specify the inputs and any other supporting
information you need to collect from the user. Its important to make sure to
collect all the information you need to get started, but also to make sure that
the form is not too long or complicated.
If there's a way you can calculate certain information, consider doing that
instead of asking the user to provide additional inputs. For example, you can
get the user's GitHub username from the issue metadata
(${{ github.event.issue.user.login }}
) instead of asking them to provide it.
As you are drafting your issue form template, think about the kind of data you are requesting and the best format to use (both for user input and for automated processing later).
This can be confusing, because once an issue form is submitted, all the inputs look the same. Suppose you have the following issue form template:
name: New Repo Requestdescription: Submit a request to create a new GitHub repositorytitle: '[Request] New Repository'labels:- issueops:new-repositorybody:# Markdown type fields are not included in the submitted issue body- type: markdownattributes:value:Welcome to GitHub! Please fill out the information below to request anew repository. Once submitted, your request will be reviewed by theIssueOps team. If approved, the repository will be created and you willbe notified via a comment on this issue.- type: inputid: nameattributes:label: Repository Namedescription: The name of the repository you would like to create.placeholder: octorepovalidations:required: true- type: dropdownid: visibilityattributes:label: Repository Visibilitydescription: The visibility of the repository.multiple: falseoptions:- private- publicvalidations:required: true- type: dropdownid: topicsattributes:label: Repository Topicsdescription: The topics to add to the repository.multiple: trueoptions:- octocat- issueops- automationvalidations:required: true- type: checkboxesid: confirmattributes:label: Confirmationdescription: Do you confirm this request?options:- label: 'Yes'required: true- label: 'No'required: false
When the user submits the issue form, it will have the following Markdown format:
### Repository Nameoctorepo### Repository Visibilitypublic### Repository Topicsoctocat, issueops### Confirmation- [x] Yes- [ ] No
You can see that certain inputs look the same, but are actually different types and, depending on their values, may be processed differently.