Skip to content

Data : EDA 폴더 추가 및 간단한 EDA 결과물 코드 공유 #13

Data : EDA 폴더 추가 및 간단한 EDA 결과물 코드 공유

Data : EDA 폴더 추가 및 간단한 EDA 결과물 코드 공유 #13

name: Create and Close Issue From Commit
on:
push:
branches:
- main # 또는 워치하고 싶은 다른 브랜치
jobs:
create_and_close_issue:
runs-on: ubuntu-latest
steps:
- name: Create and Close Issue
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const issue = {
owner: context.repo.owner,
repo: context.repo.repo,
title: context.payload.commits[0].message,
body: `Commit details:\n- Author: ${context.payload.commits[0].author.name}\n- Link: ${context.payload.commits[0].url}`
}
github.issues.create(issue).then((issueResponse) => {
github.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueResponse.data.number,
state: 'closed'
});
});