Skip to content

Template fixes to handle internationalized conformance statement cate… #60

Template fixes to handle internationalized conformance statement cate…

Template fixes to handle internationalized conformance statement cate… #60

Workflow file for this run

name: Auto-add to HL7 Project 6 and set Inbox status

Check failure on line 1 in .github/workflows/add_issues.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/add_issues.yml

Invalid workflow file

(Line: 13, Col: 7): Unexpected value 'projects'
on:
issues:
types: [opened]
jobs:
add-to-project:
runs-on: ubuntu-latest
permissions:
issues: read
contents: read
projects: write
steps:
- name: Add issue to HL7 project and move to Inbox
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const projectId = "PVT_kwDOAURDVc4AkS-i";
const statusFieldId = "PVTSSF_lADOAURDVc4AkS-izgchrII";
const inboxOptionId = "6e0766a4";
const itemId = context.payload.issue.node_id;
const addResp = await github.graphql(`
mutation($projectId: ID!, $itemId: ID!) {
addProjectV2ItemById(input: {
projectId: $projectId,
contentId: $itemId
}) {
item {
id
}
}
}
`, { projectId, itemId });
const projectItemId = addResp.addProjectV2ItemById.item.id;
await github.graphql(`
mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $optionId: String!) {
updateProjectV2ItemFieldValue(input: {
projectId: $projectId,
itemId: $itemId,
fieldId: $fieldId,
value: {
singleSelectOptionId: $optionId
}
}) {
projectV2Item {
id
}
}
}
`, {
projectId,
itemId: projectItemId,
fieldId: statusFieldId,
optionId: inboxOptionId
});