Template fixes to handle internationalized conformance statement cate… #60
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Auto-add to HL7 Project 6 and set Inbox status | ||
| 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 | ||
| }); | ||