Skip to content

Commit 0784251

Browse files
Copilotdanielsiegl
andauthored
Improve Polarion vs EA display when model is already in sync (#107)
* Initial plan * improve Polarion review comment display when Polarion is in sync with EA model Agent-Logs-Url: https://github.com/LieberLieber/LemonTree.DevOps.Demo/sessions/61ed236b-d2db-4e9c-8244-9fc97101fca7 Co-authored-by: danielsiegl <41949368+danielsiegl@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: danielsiegl <41949368+danielsiegl@users.noreply.github.com>
1 parent 982c234 commit 0784251

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

.github/workflows/ReviewPolarionRequirements.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,31 @@ jobs:
261261
script: |
262262
const prNumber = ${{steps.find-pr.outputs.pr_number}};
263263
const COMMENT_MARKER = '<!-- polarion-review -->';
264-
const body = COMMENT_MARKER + '\nPolarion vs Model comparison in current Branch\n${{steps.uploadSession.outputs.SfsFileNameLinks}}\n\n${{ steps.processSvgs.outputs.svgLinksMarkdown }}${{steps.pcsDiff.outputs.CommitID}}\n\nChanged Requirements:\n${{steps.diffreport.outputs.ModifiedRequirements}}';
264+
const modifiedRequirements = '${{steps.diffreport.outputs.ModifiedRequirements}}'.trim();
265+
const branch = '${{steps.extract_branch.outputs.branch}}';
266+
const commitId = '${{steps.pcsDiff.outputs.CommitID}}';
267+
const runUrl = 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}';
268+
const runId = '${{ github.run_id }}';
269+
270+
let body;
271+
if (!modifiedRequirements) {
272+
body = COMMENT_MARKER + '\n' +
273+
'## Polarion vs Model Comparison - Run #' + runId + '\n' +
274+
'\n' +
275+
'**Status:** :heavy_check_mark: Polarion is in sync with EA model\n' +
276+
'\n' +
277+
'**Details:**\n' +
278+
'- Branch: `' + branch + '`\n' +
279+
'- Changed Requirements: None\n' +
280+
'- Commit: `' + commitId + '`\n' +
281+
'- Run: [View logs](' + runUrl + ')\n' +
282+
'\n' +
283+
'---\n' +
284+
'*This comment is automatically updated per run*';
285+
} else {
286+
body = COMMENT_MARKER + '\nPolarion vs Model comparison in current Branch\n${{steps.uploadSession.outputs.SfsFileNameLinks}}\n\n${{ steps.processSvgs.outputs.svgLinksMarkdown }}${{steps.pcsDiff.outputs.CommitID}}\n\nChanged Requirements:\n${{steps.diffreport.outputs.ModifiedRequirements}}';
287+
}
288+
265289
const { data: comments } = await github.rest.issues.listComments({
266290
owner: context.repo.owner,
267291
repo: context.repo.repo,

0 commit comments

Comments
 (0)