Skip to content

🐞 BUG: 채팅 기록 가져오기 오류 #33

🐞 BUG: 채팅 기록 가져오기 오류

🐞 BUG: 채팅 기록 가져오기 오류 #33

name: Add Issue to Project
on:
issues:
types:
- opened
env:
PROJECT_NUMBER: 19
jobs:
add-labels-to-issue:
name: Add Labels to Issue
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
script: |
const issueTitle = context.payload.issue.title;
const labelList = [
{ icon: '🔮', label: 'epic' },
{ icon: '📗', label: 'story' },
{ icon: '✅', label: 'feature' },
{ icon: '🐞', label: 'bug' },
{ icon: '🔄', label: 'refactor' }
];
const labels = labelList.reduce((acc, { icon, label }) => {
if(issueTitle.indexOf(icon) > -1) {
acc.push(label);
}
return acc;
}, []);
github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels,
});
add-issue-to-project:
name: Add Issue to Project
runs-on: ubuntu-latest
steps:
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/add-to-project@v0.5.0
with:
project-url: https://github.com/orgs/boostcampwm2023/projects/${{ env.PROJECT_NUMBER }}
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}