Skip to content

Dependency Dashboard #12586

Dependency Dashboard

Dependency Dashboard #12586

name: Monday.com Issue Sync
on:
issues:
types: [opened, edited, closed, reopened, labeled, unlabeled, milestoned, demilestoned, assigned, unassigned]
workflow_dispatch:
inputs:
issue_number:
type: number
description: "The target issue number for syncing changes."
required: true
event_type:
type: string
description: "The type of event. Currently only 'SyncActionChanges' is supported."
required: true
milestone_updated:
type: boolean
description: "Indicates if the milestone was updated."
required: false
assignee_updated:
type: boolean
description: "Indicates if the assignee was updated."
required: false
state_updated:
type: choice
description: "Indicates if the state (open/closed) was updated."
required: false
options:
- open
- closed
label_name:
type: string
description: "The label name added or removed from the issue."
required: false
label_color:
type: string
description: "The hex code color (without '#' prefix) associated with the label."
required: false
label_action:
type: choice
description: "The action taken on the label."
required: false
options:
- added
- removed
env:
MONDAY_KEY: ${{ secrets.MONDAY_KEY }}
MONDAY_BOARD: ${{ secrets.MONDAY_BOARD }}
jobs:
determine-action:
runs-on: ubuntu-latest
permissions:
issues: write
contents: read
steps:
- uses: actions/checkout@v6
- name: "Create Task"
if: github.event.action == 'opened' ||
(github.event.action == 'labeled' && github.event.label.name == 'monday.com sync')
uses: actions/github-script@v8
with:
script: |
const action = require('${{ github.workspace }}/.github/scripts/monday/createTask.js')
await action({github, context, core})
- name: "Update Label on Task"
if: github.event.action == 'labeled' && github.event.label.name != 'monday.com sync'
uses: actions/github-script@v8
with:
script: |
const action = require('${{ github.workspace }}/.github/scripts/monday/updateLabels.js')
await action({context, core})
- name: "Remove Label from Task"
if: github.event.action == 'unlabeled'
uses: actions/github-script@v8
with:
script: |
const action = require('${{ github.workspace }}/.github/scripts/monday/removeLabel.js')
await action({context, core})
- name: "Update Milestone"
if: github.event.action == 'milestoned' || github.event.action == 'demilestoned'
uses: actions/github-script@v8
with:
script: |
const action = require('${{ github.workspace }}/.github/scripts/monday/updateMilestone.js')
await action({context, core})
- name: "Update Task Title"
if: github.event.action == 'edited'
uses: actions/github-script@v8
with:
script: |
const action = require('${{ github.workspace }}/.github/scripts/monday/updateTitle.js')
await action({context, core})
- name: "Update Task Assignee"
if: github.event.action == 'assigned' || github.event.action == 'unassigned'
uses: actions/github-script@v8
with:
script: |
const action = require('${{ github.workspace }}/.github/scripts/monday/updateAssignee.js')
await action({context, core})
- name: "Update Task Status"
if: github.event.action == 'closed' || github.event.action == 'reopened'
uses: actions/github-script@v8
with:
script: |
const action = require('${{ github.workspace }}/.github/scripts/monday/updateState.js')
await action({context, core})
- name: "Sync Action Changes"
if: github.event.inputs.event_type == 'SyncActionChanges'
uses: actions/github-script@v8
with:
script: |
const action = require('${{ github.workspace }}/.github/scripts/monday/syncActionChanges.js')
await action({github, context, core})