AI 시대, 코드 품질과 SW공급망의 새로운 기준(Sonar & JFrog)

안녕하세요. Sonar & JFrog 조인트 세미나 개최합니다. 좌석이 한정되어 있으니, 서둘러 등록하세요.
2026.09.17 (목) 13:00 코엑스 300호


이 문서는 Jira 애드온인 ScriptRunner for Jira에서 Slack으로 커스텀 웹훅을 보내는 스크립트를 공유하기 위해 작성되었다. 


사전조건

Slack에서 Incoming webhook 생성 후 채널을 추가한다. 


스크립트

다음과 같이 스크립트 작성 후에 Script Console에서 테스트를 해보면 원하는 Slack의 채널에 커스텀 메시지를 보낼 수 있다. 

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.config.properties.APKeys
import groovyx.net.http.ContentType
import groovyx.net.http.RESTClient
import groovyx.net.http.HttpResponseDecorator

final webhookBase = 'https://hooks.slack.com'
final webhookPath = '/services/abc/def/ghi'


def message = "New issue created in project" as String
def body = [
    text : message
]

def response = new RESTClient(webhookBase).post(
    path: webhookPath,
    contentType: ContentType.HTML,
    body: body,
    requestContentType: ContentType.JSON
) as HttpResponseDecorator

assert response.status == 200: "Request failed with status $response.status. $response.entity.content.text"

  • 레이블 없음