From c609f85107246737801e01ab3ca98d14e5b49b6c Mon Sep 17 00:00:00 2001 From: Michalina Date: Wed, 5 Jul 2023 15:37:10 +0200 Subject: [PATCH 1/2] Inform about contracts not being deployed to Mainnet We want to add a note to each generated API doc for Random Beacon that informs about contracts not being deployed on Mainnet. The note is in style used by GitBook to highlight important information (read more: https://docs.gitbook.com/content-creation/blocks/hint#git-sync-representation-in-markdown). The note is inserted between 5th and 6th line of each generated doc. Note: This commit contains a temporary change of the triggering conditions for the publish job. We need to remove this change before merging to `main`. --- .github/workflows/contracts-random-beacon-docs.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/contracts-random-beacon-docs.yml b/.github/workflows/contracts-random-beacon-docs.yml index 87e826bf5b..6a0b0b8846 100644 --- a/.github/workflows/contracts-random-beacon-docs.yml +++ b/.github/workflows/contracts-random-beacon-docs.yml @@ -45,6 +45,7 @@ jobs: uses: keep-network/ci/.github/workflows/reusable-solidity-docs.yml@main with: projectDir: /solidity/random-beacon + postProcessingCommand: find ./generated-docs -name "*.md" -type f -exec sed -i '5i {% hint style="warning" %}\nThis file documents a code which is not yet deployed to Mainnet.\n{% endhint %}\n' {} + publish: false addTOC: false commentPR: true @@ -59,10 +60,12 @@ jobs: contracts-docs-publish: name: Publish contracts documentation needs: docs-detect-changes - if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/solidity/') + # TODO: Remove alternative condition before merge + if: (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/solidity/')) || github.ref == 'refs/pull/3671/merge' uses: keep-network/ci/.github/workflows/reusable-solidity-docs.yml@main with: projectDir: /solidity/random-beacon + postProcessingCommand: find ./generated-docs -name "*.md" -type f -exec sed -i '5i {% hint style="warning" %}\nThis file documents a code which is not yet deployed to Mainnet.\n{% endhint %}\n' {} + publish: true addTOC: false verifyCommits: true From 7b06c4a9ad0858d036d8ab6eb73fad705fc9115f Mon Sep 17 00:00:00 2001 From: Michalina Date: Wed, 19 Jul 2023 11:17:24 +0200 Subject: [PATCH 2/2] Modify the warning message --- .github/workflows/contracts-random-beacon-docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/contracts-random-beacon-docs.yml b/.github/workflows/contracts-random-beacon-docs.yml index 6a0b0b8846..c0ee3a6f10 100644 --- a/.github/workflows/contracts-random-beacon-docs.yml +++ b/.github/workflows/contracts-random-beacon-docs.yml @@ -45,7 +45,7 @@ jobs: uses: keep-network/ci/.github/workflows/reusable-solidity-docs.yml@main with: projectDir: /solidity/random-beacon - postProcessingCommand: find ./generated-docs -name "*.md" -type f -exec sed -i '5i {% hint style="warning" %}\nThis file documents a code which is not yet deployed to Mainnet.\n{% endhint %}\n' {} + + postProcessingCommand: find ./generated-docs -name "*.md" -type f -exec sed -i '5i {% hint style="warning" %}\nThis file documents a contract which is not yet deployed to Mainnet.\n{% endhint %}\n' {} + publish: false addTOC: false commentPR: true @@ -65,7 +65,7 @@ jobs: uses: keep-network/ci/.github/workflows/reusable-solidity-docs.yml@main with: projectDir: /solidity/random-beacon - postProcessingCommand: find ./generated-docs -name "*.md" -type f -exec sed -i '5i {% hint style="warning" %}\nThis file documents a code which is not yet deployed to Mainnet.\n{% endhint %}\n' {} + + postProcessingCommand: find ./generated-docs -name "*.md" -type f -exec sed -i '5i {% hint style="warning" %}\nThis file documents a contract which is not yet deployed to Mainnet.\n{% endhint %}\n' {} + publish: true addTOC: false verifyCommits: true