Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Initiate action should/could be specified in URL

未关闭
#17 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
api, backend

调研方向

首先跟踪从 GET /api/travel-request/ 到 POST URL 的客户端流程,然后检查在构建该 URL 时如何处理 initiate action。在进行任何更改之前,先通过 issue 讨论确认预期行为。完成的标准是 POST 请求始终一致地包含 action slug,包括 initiation,并且生成的 action 表单提交能够正常工作。

由索引模型根据 Issue 内容生成。

描述

discussion

The way the client is designed, it gets the workflow definition from GET /api/travel-request/. If there's an id property, it renders the data and the events. If there's multiple state.actions, it renders action buttons. If there's only 1 state.actions, it renders the form for it. If there's more than 1 state.actions, it waits until you select one of the action buttons, and renders that form. On submission, the form posts to POST /api/travel-request/<case-id?>/<action-slug>?token=xx.

At the moment, this fails on the initiate action, I think because by design we expected clients to not include the action on the initiate POST. But it's actually pretty simple to do that since (a) we're providing the name of the action in the response to their GET request, and (b) they're already using part of that response for their POST request (the template).

My guess is you probably added extra logic to identify what the default action was. Perhaps this isn't necessary, and we can just expect clients to include the action name in every POST request.

Thoughts @mjumbewu ?

主要语言
Python
星标
22
派生
5
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

CodeForPhilly/stately 的其他 Issue

查看 CodeForPhilly/stately 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。