Skip to content

move yml file into workflows directory #1

move yml file into workflows directory

move yml file into workflows directory #1

Workflow file for this run

name: Transfer New Issue to Docs Project
on:
issues:
types: [opened]
jobs:
transfer:
runs-on: ubuntu-latest
steps:
- name: Transfer Issue
uses: actions/github-script@v5
with:
github-token: ${{secrets.GH_TOKEN}}
script: script: |

Check failure on line 15 in .github/workflows/issue-transfer.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/issue-transfer.yml

Invalid workflow file

You have an error in your yaml syntax on line 15
const issueTitle = context.payload.issue.title;
const issueBody = context.payload.issue.body;
const issueNumber = context.payload.issue.number;
const organizationName = 'near';
const projectName = 'NEAR Docs';
// Fetch project ID and other necessary IDs
const query = `
query {
organization(login: "${organization\$rg}") {
projectV2(number: 117) {
id
}
}
}
`;
const projectId = await github.graphql(query);
// Add issue to the project
const mutation = `
mutation($projectId: ID!, $contentId: ID!) {
addProjectV2ItemById(input: {projectId: $projectId, contentId: $contentId}) {
item {
id
}
}
}
`;
await github.graphql(mutation, { projectId: projectId.organization.projectV2.id, contentId: context.payload.issue.node_id });