Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project board column change #48

Open
woodie opened this issue Jul 30, 2020 · 3 comments
Open

Project board column change #48

woodie opened this issue Jul 30, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@woodie
Copy link

woodie commented Jul 30, 2020

If we want to sync our Github project board with external systems, it would be helpful to have a way to trigger actions when an Issue is dragged from one column to another.

@alex-page
Copy link
Owner

I want to keep this action simple and focused on the issue and pull request webhooks. I could expand it to use column webhooks. This would address this need. Would you be interested in helping adding this functionality?

@alex-page alex-page added the enhancement New feature or request label Jul 30, 2020
@alex-page
Copy link
Owner

alex-page commented Aug 17, 2020

This is awesome, thanks @woodie. I don't have time right now to implement this but the details here are really awesome. If you want to make a PR I can definitely review it.

@woodie
Copy link
Author

woodie commented Aug 21, 2020

Got it working with existing actions.

name: Comment on column move

on:
  project_card:
    types: [moved]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Fetch card properties
        uses: JamesIves/fetch-api-data-action@releases/v1
        with:
          ENDPOINT: ${{ github.event.project_card.url }}
          CONFIGURATION: |
            { "method": "GET",
              "headers": {
                "Authorization": "Bearer ${{ secrets.AUTOMATION_TOKEN }}",
                "Accept": "application/vnd.github.inertia-preview+json"
              }
            }
      - name: Parse content URL
        uses: jungwinter/split@v1
        id: split
        with:
          msg: ${{ fromJson(env['FETCH_API_DATA']).content_url }}
          seperator: '/'
      - name: Fetch column properties
        uses: JamesIves/fetch-api-data-action@releases/v1
        with:
          ENDPOINT: ${{ github.event.project_card.column_url }}
          CONFIGURATION: |
            { "method": "GET",
              "headers": {
                "Authorization": "Bearer ${{ secrets.AUTOMATION_TOKEN }}",
                "Accept": "application/vnd.github.inertia-preview+json"
              }
            }
      - name: Create comment
        if: ${{ steps.split.outputs._6 == 'issues' }}
        uses: peter-evans/create-or-update-comment@v1
        with:
          issue-number: ${{ steps.split.outputs._7 }}
          body: "@${{ github.event.sender.login }} moved Issue to ${{ fromJson(env['FETCH_API_DATA']).name }}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants