Rename .github/workflows/triage.yml to .github/workflows/triage-discussion-label.yml and update the workflow name from "Discussion Triage" to "Process Discuss Label" to better reflect its intent.
The `environment` property cannot be set at the job level when using
`uses:` to call a reusable workflow. Pass it as a workflow input instead.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Previously, we were getting the token from repository secrets. We have
moved the token to its own environment secret in the
cli-discuss-automation environment. It is in its own environment so that
we don't inject our other secrets into this workflow as we don't need
them here.
This commit reverts the triage workflow to restore the previous PR support using the `pull_request_target`, which is more secure as it doesn't allow fork repositories to change the workflow before it runs.
Additionally, this fixes an issue currently causing the workflow to break as cli/cli uses the `discuss` label but github/cli uses the `triage` label.
- replaces creating discussions for issues
- supports discussing both issues and pull requests
- populates more information about related issues and pull requests in triage issues