Skip to content

how to add to project without workflow #661

Open
@quantuminformation

Description

@quantuminformation

You prefer not to use workflows,

but using this:

name: Auto apply triage label and default project

on:
  issues:
    types:
      - opened
      - reopened

jobs:
  label_and_assign_project:
    runs-on: ubuntu-latest
    permissions:
      issues: write
      repository-projects: write  

    steps:
      - name: Add "triage" label if no milestone
        if: ${{ github.event.issue.milestone == null }}
        run: |
          gh issue edit ${{ github.event.issue.number }} \
            --repo quantumjs/launch-track \
            --add-label triage
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}



      - name: Add issue to org-level project
        run: gh project item-add quantumjs/1 --content-id "${{ github.event.issue.node_id }}"
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

gives error:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions