-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
website用のJSONファイルをダウンロードするボタンを追加 #2489
Conversation
commit: cloudnativedaysjp/dreamkast@76d4c42 Co-authored-by: GitHub Action <[email protected]>
Simplecov Report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ReviewAppのCNDW2024やCNDS2024 (seedが入ってる) で試したけど、空配列が落ちてくるだけになってる
[
]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 8 changed files in this pull request and generated 1 comment.
Files not reviewed (3)
- app/views/admin/speakers/index.html.erb: Evaluated as low risk
- app/views/admin/talks/index.html.erb: Evaluated as low risk
- lib/tasks/render_json_for_website.rake: Evaluated as low risk
Comments suppressed due to low confidence (6)
app/views/admin/talks/export_talks_for_website.json.jbuilder:3
- The naming convention for JSON keys should be consistent. Rename
conferenceId
toconference_id
for consistency.
json.conferenceId(talk.conference.id)
app/views/admin/talks/export_talks_for_website.json.jbuilder:4
- The naming convention for JSON keys should be consistent. Rename
trackId
totrack_id
for consistency.
json.trackId(talk.track_id)
app/controllers/admin/speakers_controller.rb:64
- [nitpick] The logic here could be simplified and made more readable. Consider refactoring to improve readability.
proposal_item.proposal_item_configs.map { |config| [VideoAndSlidePublished::ALL_OK, VideoAndSlidePublished::ONLY_VIDEO].include?(config.key.to_i) }.any? && talk.archived?
app/views/admin/speakers/export_speakers_for_website.json.jbuilder:5
- The key 'jobTitle' is inconsistent with other naming conventions. It should be 'job_title'.
json.jobTitle(speaker.job_title)
app/views/admin/speakers/export_speakers_for_website.json.jbuilder:7
- The key 'githubId' is inconsistent with other naming conventions. It should be 'github_id'.
json.githubId(speaker.github_id)
app/views/admin/speakers/export_speakers_for_website.json.jbuilder:8
- The key 'twitterId' is inconsistent with other naming conventions. It should be 'twitter_id'.
json.twitterId(speaker.twitter_id)
query = { show_on_timetable: true, conference_id: conference.id } | ||
@talks = Talk.includes([:conference, :conference_day, :talk_time, :talk_difficulty, :talk_category, :talks_speakers, :video, :speakers, :proposal]).where(query) | ||
@talks = if %w[cndt2020 cndo2021].include?(conference.abbr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable 'conference' is used but not defined within the method. It should be '@conference'.
query = { show_on_timetable: true, conference_id: conference.id } | |
@talks = Talk.includes([:conference, :conference_day, :talk_time, :talk_difficulty, :talk_category, :talks_speakers, :video, :speakers, :proposal]).where(query) | |
@talks = if %w[cndt2020 cndo2021].include?(conference.abbr) | |
query = { show_on_timetable: true, conference_id: @conference.id } | |
@talks = Talk.includes([:conference, :conference_day, :talk_time, :talk_difficulty, :talk_category, :talks_speakers, :video, :speakers, :proposal]).where(query) | |
@talks = if %w[cndt2020 cndo2021].include?(@conference.abbr) |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
あー確かに?同一ファイルの他のメソッドだと @conference
で呼んでるね
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SecuredAdminにconferenceメソッドがあるので@conferenceじゃなくてOK。
Seedだと必要なデータが入ってない(ProposalItemsがない)ので、セッション登録して、ConfrenceDay・Trackに紐付ける必要がある |
adminからダウンロード可能にした