Skip to content
name: Issue Management
on:
issues:
types: [opened]
jobs:
triage_or_add_to_project:
runs-on: ubuntu-latest
steps:
- name: Check if the issue creator is a maintainer
id: check_maintainer
run: echo "::set-output name=is_maintainer::$(echo ${{ github.event.issue.user.type }} | tr '[:upper:]' '[:lower:]')"
- name: Apply "needs triage" label to issues created by non-maintainers
if: steps.check_maintainer.outputs.is_maintainer == 'user'
run: |
gh issue add-label "${{ github.event.issue.number }}" "needs triage"
- name: Add issue to project for issues created by maintainers
if: steps.check_maintainer.outputs.is_maintainer == 'organization'
uses: softprops/action-gh-project@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
project_url: "https://github.com/orgs/rstudio/projects/179"
column_name: "New"