Skip to content

Test

Test #1

name: Issue Migration
on:
issues:
types: [opened]
jobs:
migrate_issue:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const issue = context.payload.issue;
const newIssue = await github.rest.issues.create({
owner: issue.owner,
repo: issue.repo,
title: issue.title,
body: issue.body,
labels: issue.labels,
assignees: issue.assignees
});
console.log(`Created issue ${newIssue.data.number} in ${newIssue.data.repository.full_name}`);
- uses: actions/delete-issue@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}