Skip to content

feat: Set up GoodAction Hub standalone data repository#2

Merged
TechQuery merged 9 commits intomainfrom
copilot/update-issue-templates-and-readme
Mar 9, 2026
Merged

feat: Set up GoodAction Hub standalone data repository#2
TechQuery merged 9 commits intomainfrom
copilot/update-issue-templates-and-readme

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 9, 2026

Repurposes this repo from "Fake Open Source wiki" into the GoodAction Hub independent data repository, migrating the data structure documentation from GoodAction-Hub.github.io and establishing an Issue-based data submission workflow.

Issue Templates

  • Renamed Fake-Open-Source-event.ymlactivity.yml: rebuilt as a unified public welfare activity submission form covering meetups, conferences, and competitions
  • Added a type dropdown (meetup / conference / competition) to replace the need for three separate templates
  • Issue title serves as the activity title; submission guidelines explain the automated PR → review → merge → website pipeline
  • Added start_time and end_time fields (YYYY-MM-DD HH:mm:ss) for overall activity duration; timeline textarea (Markdown table format, pre-filled as default value) retained for per-session key milestones
  • Removed year field, human-readable date field (view layer concern), and redundant confirmation checkbox
  • Removed conference.yml and competition.yml (merged into activity.yml)
  • Added restaurant.yml: new submission form for accessibility-friendly restaurants, with fields for unique ID, description, accessibility features, specialty food (Markdown table of dish name + price), average spend, social values (checkboxes), address, and GPS coordinates

README

  • Unified "如何添加数据 / How to Add Data" section (activity + restaurant) with a single common description and beginner-friendly hint pointing to both submission links
  • "数据结构 / Data Structure" section with two subsections: ### 活动 / Activities and ### 餐厅 / Restaurants
  • Link references renumbered sequentially: [1]=提交活动, [2]=提交餐厅, [3]=审核列表, [4]=JSON API
  • 灵感来源 / Inspiration section links to BiYuanShe/Fake-Open-Source-wiki (the template repository)
  • Activity YAML schema includes both start_time/end_time and timeline with deadline/comment entries; restaurant YAML schema includes food[].name/price, avg_spend, and social_values array

GitHub Actions

  • submit-event.yml: Renamed to "Activity submission"; updated label trigger (eventactivity), template path (activity.yml), and all environment variable names to match new form fields
  • save-event.sh: Fully rewritten to append structured entries to data/activities.yml; uses shared append_yaml_table from yaml_utils.sh to parse the timeline Markdown table into YAML deadline/comment entries
  • submit-restaurant.yml: New workflow triggered by restaurant label; parses restaurant form fields and appends entries to data/restaurants.yml
  • save-restaurant.sh: New script that uses shared append_yaml_table from yaml_utils.sh to parse the food Markdown table into food[].name/price entries, plus append_yaml_split_array for comma-separated features and checkboxes
  • yaml_utils.sh: New shared utility module containing yaml_escape, append_yaml_split_array, and the generic append_yaml_table function (parses any 2-column Markdown table into a YAML list with configurable key names, indentation, and header-row detection); sourced by both save scripts
  • deploy-data.yml: Fixed stale biyuanshe.github.io/Fake-Open-Source-wiki URL → goodaction-hub.github.io/GoodAction-data

Data Directory

  • data/events.ymldata/activities.yml (empty, to be populated during future data migration)
  • data/competitions.yml and data/conferences.yml deleted (all activities consolidated into activities.yml)
  • Added empty data/restaurants.yml

Repository Labels (settings.yml)

Replaced event label with activity, conference, competition; added restaurant label.

Original prompt

This section details on the original issue you should resolve

<issue_title>搭建 GoodActionHub 独立数据仓库</issue_title>
<issue_description>### Task description

  1. 基于 https://github.com/GoodAction-Hub/GoodAction-Hub.github.io/tree/main/data 的数据结构,修改现有的一个 issue 模板,并新建两个模板
  2. https://github.com/GoodAction-Hub/GoodAction-Hub.github.io/blob/main/README.md 中关于数据结构的文字移到本项目 Read Me

Reward currency

TQT $

Reward amount

45

Reward payer

水歌 tech-query@fcc-cd.dev

Task source

https://open-source-bazaar.feishu.cn/record/AXlFrW6U9eBYz9cLoo3cRLTsnjh</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…, and data structure

Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Copilot AI changed the title [WIP] Update issue templates and move data structure description Set up GoodAction Hub standalone data repository Mar 9, 2026
@TechQuery TechQuery marked this pull request as ready for review March 9, 2026 17:42
Copy link
Copy Markdown
Member

@TechQuery TechQuery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

给 activity 表单增加一项“类型”下拉框,选项分别为 meetupconferencecompetition,这样就可以把三个表单合为一个,因为其它项都是一样的。

Comment thread README.md
Comment thread .github/ISSUE_TEMPLATE/activity.yml Outdated
Comment thread .github/ISSUE_TEMPLATE/activity.yml Outdated
Comment thread .github/ISSUE_TEMPLATE/activity.yml Outdated
Comment thread .github/ISSUE_TEMPLATE/activity.yml Outdated
Comment thread .github/ISSUE_TEMPLATE/activity.yml Outdated
Comment thread .github/ISSUE_TEMPLATE/activity.yml
Comment thread .github/ISSUE_TEMPLATE/activity.yml Outdated
…mplify form fields

Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 9, 2026

给 activity 表单增加一项“类型”下拉框,选项分别为 meetupconferencecompetition,这样就可以把三个表单合为一个,因为其它项都是一样的。

已在 2fedd18 中实现:删除了单独的 conference.ymlcompetition.yml,并在 activity.yml 中添加了"活动类型"下拉框,选项为 meetupconferencecompetition

Comment thread README.md
Comment thread README.md Outdated
Comment thread README.md
Comment thread README.md Outdated
Comment thread .github/ISSUE_TEMPLATE/activity.yml Outdated
…inner hint first, inspiration section

Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
…ser, update workflow

Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Copy link
Copy Markdown
Member

@TechQuery TechQuery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

数据结构来源仓库的美食数据 也需要遵照同样的模式,来实现收集表单和数据解析工作流。

Comment thread README.md
Comment thread .github/ISSUE_TEMPLATE/activity.yml Outdated
…o default value

Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 9, 2026

数据结构来源仓库的[美食数据](https://github.com/GoodAction-Hub/GoodAction-Hub.github.io/blob/main/README.md#%E5%A6%82%E4%BD%95%E6%B7%BB%E5%8A%A0%E7%BE%8E%E9%A3%9F%E5%9C%B0%E6%97%A0%E9%9A%...

已在 4a61892 中实现:

  1. .github/ISSUE_TEMPLATE/restaurant.yml:新增餐厅提交表单,字段包括唯一 ID、简介、无障碍特色服务(逗号分隔)、特色美食、社会价值、地址、GPS 纬度/经度;餐厅官方名称作为 Issue 标题。
  2. data/restaurants.yml:新建空的餐厅数据文件。
  3. .github/scripts/save-restaurant.sh:新增解析脚本,将表单字段写入 data/restaurants.yml,features 字段按逗号拆分为 YAML 数组。
  4. .github/workflows/submit-restaurant.yml:新建工作流,由 restaurant label 触发,解析表单字段并自动创建 PR。
  5. settings.yml:新增 restaurant label。
  6. README.md:功能入口新增"提交餐厅"链接,新增餐厅数据说明节与数据结构示例。

Comment thread .github/ISSUE_TEMPLATE/restaurant.yml Outdated
Comment thread .github/ISSUE_TEMPLATE/restaurant.yml Outdated
Comment thread .github/scripts/save-restaurant.sh Outdated
Comment thread data/competitions.yml Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
…les, restructure README

Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Comment thread .github/scripts/save-restaurant.sh Outdated
…ve scripts

Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Comment thread data/activities.yml
…a migration

Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
@TechQuery TechQuery added the feature New feature or request label Mar 9, 2026
@TechQuery TechQuery changed the title Set up GoodAction Hub standalone data repository feat: Set up GoodAction Hub standalone data repository Mar 9, 2026
@TechQuery TechQuery merged commit 6db50c5 into main Mar 9, 2026
@TechQuery TechQuery deleted the copilot/update-issue-templates-and-readme branch March 9, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

搭建 GoodActionHub 独立数据仓库

2 participants