project_card events for an organization project

Hello,

Just curious if there is a way to execute actions for any project_card events for an organization project.  Naively I assumed a project_card event would fire in the repository the issue lived that the project_card referred to; but that doesn’t appear to be the case.  Would an event dispatch on the issue itself?

Thanks,

Robert

Github supports ‘project card’ event on organization project, you can specify the exact type ‘create/move/convert to issue/edit/delete’ to the project card event for the workflow, please check the official doc here for more details.

Once the card is converted to an issue, you need to use ‘issue’ event to monitor. Please check the link here for the details. 

Hi @weide-zhou , 

Here’s the opening snippet of my action:

on:
  project_card:
    types: [moved]

jobs:
  add-in-progress-label:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/github-script@0.3.0
         with:
           github-token: ${{ secrets.GH_PAT }}

However, it never fires. My assumption is that actions are restricted to only seeing within the repository they are defined and therefore unable to see the events dispatched for an org project.  For our case, the card references an issue and is not a just a note.

Hi @rgmills ,

The workflow is triggered successfully on my end with your code, no matter the repository is common or inside an organization. The card has been converted to an issue, the reference should be an issue now.

Please make sure your workflow file is in ‘ master ’ branch, it won’t be triggered in other branches.

And what about other trigger in some repository, can they work well? Please aslo make sure actions is enabled in the repo setting.

Hmm. Private and 3rd party actions are on and workflow is defined in  master.

To be clear, I’m not converting a note to an issue.  I have an existing card with issue reference that I’m trying to track as that card is moved between different columns.  Which would seem possible based on the docs (https://developer.github.com/v3/activity/events/types/#projectcardevent)

Triggered when a project card is created, edited, moved, converted to an issue, or deleted.

Hi @rgmills ,

I moved cards(converted to an issue & not converted) to other column and both will trigger the workflow on my side.

How did you create the card? If possile, please provide an sample repo which can help to debug and avoid any confusion. Thanks.

Hi, I have the same issue here. I have a private repo and issues (no cards but issues) on an organization project board. I have a simple workflow listening for all project_cards and issues events. Moving an issue from one column of the board to the next doesn’t trigger any workflow on my repo.

PS: I just tried with a project board in the repository and everything works fine. It looks like the issue only appears with organization projects.