Duplicate and Wrong Version Entries in Action Logs After Automatic Joomla Update #132
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: Convert Question Issues to Discussion | |
| on: | |
| issues: | |
| types: [opened] | |
| permissions: | |
| issues: write | |
| discussions: write | |
| jobs: | |
| convert: | |
| if: github.event.issue.issue_type == 'Feature' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Convert Issue to Discussion | |
| uses: actions/github-script@e69ef5462fd455e02edcaf4dd7708eda96b9eda0 # v7.0.0 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const issueNodeId = context.payload.issue.node_id; | |
| await github.graphql(` | |
| mutation($issueId: ID!) { | |
| convertIssueToDiscussion(input: { | |
| issueId: $issueId | |
| categoryId: "DIC_kwDOACWcjM4C27nv" | |
| }) { | |
| discussion { | |
| id | |
| url | |
| } | |
| } | |
| } | |
| `, { issueId: issueNodeId }); |