Skip to content
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

Merged
merged 1 commit into from
Mar 5, 2025

Conversation

takaishi
Copy link
Contributor

adminからダウンロード可能にした

image

image

@gitops-for-cloudnativedays gitops-for-cloudnativedays bot added the reviewapps Build ReviewApp environment automatically if this label is granted label Feb 21, 2025
@takaishi takaishi marked this pull request as ready for review February 21, 2025 14:30
@takaishi takaishi self-assigned this Feb 21, 2025
@takaishi takaishi requested a review from a team February 21, 2025 14:31
gitops-for-cloudnativedays bot pushed a commit to cloudnativedaysjp/dreamkast-infra that referenced this pull request Feb 21, 2025
gitops-for-cloudnativedays bot added a commit to cloudnativedaysjp/dreamkast-infra that referenced this pull request Feb 21, 2025
Copy link

Copy link

Simplecov Report

Covered Threshold
61.1% 60%

Copy link
Collaborator

@jacopen jacopen left a 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が入ってる) で試したけど、空配列が落ちてくるだけになってる

[

]

@jacopen jacopen requested a review from Copilot February 23, 2025 08:41
Copy link

@Copilot Copilot AI left a 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 to conference_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 to track_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)

Comment on lines +54 to +56
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)
Copy link
Preview

Copilot AI Feb 23, 2025

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'.

Suggested change
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.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Copy link
Collaborator

Choose a reason for hiding this comment

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

あー確かに?同一ファイルの他のメソッドだと @conference で呼んでるね

Copy link
Contributor Author

Choose a reason for hiding this comment

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

SecuredAdminにconferenceメソッドがあるので@conferenceじゃなくてOK。

@takaishi
Copy link
Contributor Author

ReviewAppのCNDW2024やCNDS2024 (seedが入ってる) で試したけど、空配列が落ちてくるだけになってる

Seedだと必要なデータが入ってない(ProposalItemsがない)ので、セッション登録して、ConfrenceDay・Trackに紐付ける必要がある

@takaishi takaishi requested a review from jacopen February 27, 2025 13:28
@github-actions github-actions bot removed the reviewapps Build ReviewApp environment automatically if this label is granted label Mar 3, 2025
@jacopen jacopen merged commit ff5a743 into main Mar 5, 2025
7 checks passed
@jacopen jacopen deleted the chore/download-json branch March 5, 2025 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants