@erdoai/cli 0.130.1 → 0.131.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4689,6 +4689,7 @@ function renderApproval(r) {
|
|
|
4689
4689
|
}
|
|
4690
4690
|
facts.push(["created", r.created_at]);
|
|
4691
4691
|
if (r.decided_at) facts.push(["decided", r.decided_at]);
|
|
4692
|
+
if (r.decision_reason) facts.push(["because", r.decision_reason]);
|
|
4692
4693
|
if (r.expires_at) facts.push(["expires", r.expires_at]);
|
|
4693
4694
|
if (r.execution) {
|
|
4694
4695
|
const reason = r.execution.summary ? ` \u2014 ${r.execution.summary}` : "";
|
|
@@ -4748,6 +4749,9 @@ approvalsCmd.command("decide <id>").description("Approve or reject a pending app
|
|
|
4748
4749
|
).option(
|
|
4749
4750
|
"--constraints <json>",
|
|
4750
4751
|
`explicit parameter constraints for the standing policy, e.g. '{"spreadsheet_id":{"values":["..."]}}'`
|
|
4752
|
+
).option(
|
|
4753
|
+
"--reason <text>",
|
|
4754
|
+
"why you decided this way. On --reject it holds the same proposal back for 7 days: a re-proposal of the same subject that states no new reason is answered with your decline instead of a new approval, and the decision record keeps it as the decider's rationale"
|
|
4751
4755
|
).action(
|
|
4752
4756
|
async (id, opts) => {
|
|
4753
4757
|
try {
|
|
@@ -4784,7 +4788,8 @@ ${listing}`);
|
|
|
4784
4788
|
const res = await client.decideApproval(id, {
|
|
4785
4789
|
decision: opts.approve ? "approved" : "rejected",
|
|
4786
4790
|
scope: opts.scope,
|
|
4787
|
-
parameter_constraints: constraints
|
|
4791
|
+
parameter_constraints: constraints,
|
|
4792
|
+
...opts.reason?.trim() ? { reason: opts.reason.trim() } : {}
|
|
4788
4793
|
});
|
|
4789
4794
|
console.log(res.message);
|
|
4790
4795
|
} catch (e) {
|