openJcePlusTests_0_PASSED but there were a number of junit failures #9
This file contains 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: TriagerX Issue Trigger | |
on: [issue_comment] | |
jobs: | |
handle-issue: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: npm install axios | |
- name: Trigger TriagerX | |
uses: actions/github-script@v4 | |
with: | |
script: | | |
const issueTitle = context.payload.issue.title; | |
const issueDescription = context.payload.issue.body; | |
const axios = require('axios'); | |
console.log("issue_title: ", issueTitle); | |
console.log("issue_description: ", issueDescription); | |
let input = { | |
"issue_title": issueTitle, | |
"issue_description": issueDescription, | |
} | |
const response = await axios.post('http://140.211.168.122/recommendation', JSON.stringify(input), { | |
headers: { | |
'accept': 'application/json', | |
'Content-Type': 'application/json', | |
}, | |
}); | |
console.log(response.data); | |
const recommendedComponents = response.data.recommended_components; | |
const recommendedDevelopers = response.data.recommended_developers; | |
const resultString = `Recommended Components: ${recommendedComponents.join(', ')}\nRecommended Developers: ${recommendedDevelopers.join(', ')}`; | |
await github.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: resultString | |
}); |