Skip to content

Commit

Permalink
Trying even more basic style
Browse files Browse the repository at this point in the history
  • Loading branch information
nguy8tri committed Sep 17, 2024
1 parent c8a095f commit 1939a81
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pr-artifacts-link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
with:
script: |
const prNumber = process.env.PR_NUMBER;
const prFooter = "# Artifacts for PR #${prNumber} (DO NOT CHANGE)";
const artifactLinks = `- [Coverage Artifact](https://uwcubesat.github.io/found/${prNumber}/merge/coverage)\n`
+ `- [Doxygen Artifact](https://uwcubesat.github.io/found/${prNumber}/merge/doxygen)\n`;
Expand All @@ -32,10 +33,10 @@ jobs:
});
// Check if both artifact links are already present in the PR body
if (pr.body.includes(artifactLinks.trim())) {
if (pr.body.includes("Artifacts for PR")) {
console.log('PR description already has documentation artifacts');
} else {
const newPrBody = `# Artifacts for PR #${prNumber}\n\n${artifactLinks.trim()}\n\n${pr.body}`;
const newPrBody = `# Description\n${pr.body}\n\n${prFooter}\n${artifactLinks.trim()}`;
await github.rest.pulls.update({
owner: context.repo.owner,
Expand Down

0 comments on commit 1939a81

Please sign in to comment.