Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/input-output-hk/plutus in…
Browse files Browse the repository at this point in the history
…to effectfully/builtins/add-dropList
  • Loading branch information
effectfully committed Nov 4, 2024
2 parents 5112e9b + ac8c225 commit 442beb4
Show file tree
Hide file tree
Showing 156 changed files with 1,483 additions and 270 deletions.
89 changes: 63 additions & 26 deletions .github/workflows/slack-message-broker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,38 +26,75 @@ jobs:
- name: Prepare Slack Message
uses: actions/github-script@main
id: prepare-slack-message
if: >
(github.event_name == 'workflow_run' && !github.event.workflow_run.pull_requests[0].draft) ||
(github.event_name == 'check_run' && !github.event.check_run.check_suite.pull_requests[0].draft)

with:
script: |
console.log(${{ toJson(github.event) }});
function getSlackMemberToBeNotified() {
function getSlackMembersToBeNotified() {
const senderLogin = "${{ github.event.sender.login }}";
const workflowName = "${{ github.event.workflow.name }}";
const slackMemberIds = {
"zeme-wana": "U03HGDNDRKR",
"effectfully": "UBH8K0ZU2",
"kwxm": "UCF4SL4BT",
"Unisay": "U02V796524S",
"ramsay-t": "U05T49F9FV1",
"ana-pantilie": "U05V2854W86",
"zliu41": "U03BP2HTKDK",
"bezirg": "UQ1LUSR8B",
"erikd": "U914V9D2B"
"zeme-wana": ["U03HGDNDRKR"],
"effectfully": ["UBH8K0ZU2"],
"kwxm": ["UCF4SL4BT"],
"Unisay": ["U02V796524S"],
"ramsay-t": ["U05T49F9FV1"],
"ana-pantilie": ["U05V2854W86"],
"zliu41": ["U03BP2HTKDK"],
"bezirg": ["UQ1LUSR8B"],
"erikd": ["U914V9D2B"]
};
const workflowOwners = {
"🗽 Cardano Constitution Tests": ["UQ1LUSR8B"],
"🩺 Longitudinal Benchmark": ["UBH8K0ZU2"],
"💰 Cost Model Benchmark": ["UBH8K0ZU2"],
"🌘 Nightly Testsuite": ["UQ1LUSR8B"]
};
if (senderLogin in slackMemberIds) {
return `<@${slackMemberIds[senderLogin]}>`;
function at(ids) {
return ids.reduce((acc, id) => acc + `<@${id}> `, "");
}
if (workflowName in workflowOwners) {
return at(workflowOwners[workflowName]);
} else if (senderLogin in slackMemberIds) {
return at(slackMemberIds[senderLogin]);
} else {
return "@{senderLogin}";
return `@${senderLogin}`;
}
}
const isWorkflowRunEvent = "${{ github.event_name }}" == "workflow_run";
const isCheckRunEvent = "${{ github.event_name }}" == "check_run";
function isDraftPullRequest() {
const workflowRunPrIsNull = "${{ github.event.workflow_run.pull_requests == null }}" === "true";
const isDraftPrWorkflowRun = "${{ github.event.workflow_run.pull_requests[0][0].draft }}" === "true";
const checkRunPrIsNull = "${{ github.event.check_run.pull_requests == null }}" === "true";
const isDraftPrCheckRun = "${{ github.event.check_run.pull_requests[0][0].draft }}" === "true";
console.log(`isWorkflowRunEvent: ${isWorkflowRunEvent}`);
console.log(`isCheckRunEvent: ${isCheckRunEvent}`);
console.log(`workflowRunPrIsNull: ${workflowRunPrIsNull}`);
console.log(`checkRunPrIsNull: ${checkRunPrIsNull}`);
console.log(`isDraftPrWorkflowRun: ${isDraftPrWorkflowRun}`);
console.log(`isDraftPrCheckRun: ${isDraftPrCheckRun}`);
return isDraftPrWorkflowRun || isDraftPrCheckRun;
}
const slackMembers = getSlackMembersToBeNotified();
const isDraftPR = isDraftPullRequest();
let message = "";
let shouldSendMessage = false;
let slackMember = getSlackMemberToBeNotified();
let message;
let shouldSendMessage;
function handleWorkflowRunEvent() {
Expand All @@ -68,10 +105,10 @@ jobs:
const failureConclusions = [ "failure", "null", "action_required", "neutral", "timed_out" ];

if (failureConclusions.includes(conclusion)) {
message = `❌ ${name} \`${conclusion}\` <${url}|View Logs> ${slackMember}`;
message = `❌ ${name} \`${conclusion}\` <${url}|View Logs> ${slackMembers}`;
shouldSendMessage = true;
} else {
message = `${name} \`${status}\` \`${conclusion}\` <${url}|View Logs> ${slackMember}`;
message = `${name} \`${status}\` \`${conclusion}\` <${url}|View Logs> ${slackMembers}`;
shouldSendMessage = false;
}
}
Expand All @@ -91,21 +128,21 @@ jobs:
];

if (conclusion == "failure" && checkRunWatchlist.includes(name)) {
message = `❌ ${name} \`${conclusion}\` <${url}|View Logs> ${slackMember}`;
message = `❌ ${name} \`${conclusion}\` <${url}|View Logs> ${slackMembers}`;
shouldSendMessage = true;
} else {
message = `${name} \`${status}\` \`${conclusion}\` <${url}|View Logs> ${slackMember}`;
message = `${name} \`${status}\` \`${conclusion}\` <${url}|View Logs> ${slackMembers}`;
shouldSendMessage = false;
}
}


if ("${{ github.event_name }}" == "workflow_run") {
if (!isDraftPR && isWorkflowRunEvent) {
handleWorkflowRunEvent();
} else if ("${{ github.event_name }}" == "check_run") {
} else if (!isDraftPR && isCheckRunEvent) {
handleCheckRunEvent();
} else {
message = `Unknown event: ${{ github.event_name }}`;
message = `Unknown event or draft PR: ${{ github.event_name }}`;
shouldSendMessage = true;
}

Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/sprint-issues-rollover.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# This workflows moves issues and pull requests to the next sprint iteration of
# the Plutus Backlog project. In practice, all open backlog items in the Last
# iteration (the one that has just finished) the will be moved to the Current
# iteration (the one that has just started)
# the Plutus Backlog project. In practice, all open backlog items in the Current
# Iteration (the one that is still in progress) will be moved to the Next
# Iteration (the one that will start next).
# This workflow must be run manually from the GitHub Actions page.
# Make sure that the Current iteration has started before running this workflow.
# In practice you want to run this on the last day of the current sprint, the
# day before the next sprint begins.

name: "🛼 Sprint Issues Rollover"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ memptyTxInfo = TxInfo
, txInfoReferenceInputs = mempty
, txInfoOutputs = mempty
, txInfoFee = zero
, txInfoMint = mempty
, txInfoMint = emptyMintValue
, txInfoTxCerts = mempty
, txInfoWdrl = AssocMap.unsafeFromList mempty
, txInfoValidRange = always
Expand Down
17 changes: 10 additions & 7 deletions doc/docusaurus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,26 @@
"typecheck": "tsc"
},
"dependencies": {
"http-proxy-middleware": "^2.0.7",
"mermaid": "^10.9.3",
"cookie": "^0.7.0",
"path-to-regexp": "^1.9.0",
"@cmfcmf/docusaurus-search-local": "^1.1.0",
"@docusaurus/core": "3.3.0",
"@docusaurus/plugin-google-gtag": "3.3.0",
"@docusaurus/preset-classic": "3.3.0",
"@docusaurus/theme-mermaid": "3.3.0",
"@mdx-js/react": "^3.0.0",
"body-parser": "1.20.3",
"body-parser": "^1.20.3",
"clsx": "^2.0.0",
"express": "4.20.0",
"micromatch": "4.0.8",
"path-to-regexp": "3.3.0",
"express": "^4.20.0",
"micromatch": "^4.0.8",
"prism-react-renderer": "^2.3.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"send": "0.19.0",
"serve-static": "1.16.0",
"webpack": "5.94.0"
"send": "^0.19.0",
"serve-static": "^1.16.0",
"webpack": "^5.94.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.2.1",
Expand Down
Loading

0 comments on commit 442beb4

Please sign in to comment.