From 15d2f2cc37dfd0f6c5c6389bbfe44b8aa79f4150 Mon Sep 17 00:00:00 2001 From: Rachael Wright-Munn Date: Thu, 4 Dec 2025 14:25:28 +0000 Subject: [PATCH 1/3] Create a dev environment for GitHub Copilot --- .github/workflows/copilot-setup-steps.yml | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/copilot-setup-steps.yml diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml new file mode 100644 index 000000000..a0bd032bc --- /dev/null +++ b/.github/workflows/copilot-setup-steps.yml @@ -0,0 +1,46 @@ +name: Setup Development Environment for GitHub Copilot + + +# Automatically run the setup steps when they are changed to allow for easy validation, and +# allow manual testing through the repository's "Actions" tab +on: + workflow_dispatch: + push: + paths: + - .github/workflows/copilot-setup-steps.yml + pull_request: + paths: + - .github/workflows/copilot-setup-steps.yml + +jobs: + # The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot. + copilot-setup-steps: + runs-on: ubuntu-latest + + # Only let github read the repository contents + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v5 + with: + fetch-depth: 30 # Fetch past 30 commits, so reasonable amount of commit context is included + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + + - name: Run bin/setup + run: bin/setup --skip-server + + - name: Validate setup + run: | + echo "Testing database connectivity..." + bundle exec rails runner \ + "puts 'Database connection: OK'; \ + puts 'User count: ' + User.count.to_s" + + echo "Running code style validation..." + bundle exec standardrb From 46444c34f6e6669859f8fb98845e9e63e22585a2 Mon Sep 17 00:00:00 2001 From: Rachael Wright-Munn Date: Thu, 4 Dec 2025 14:53:53 +0000 Subject: [PATCH 2/3] Catch error in seeds when the authorization is not present. --- db/seeds.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/db/seeds.rb b/db/seeds.rb index addc098ac..34da0051d 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -437,4 +437,8 @@ Rake::Task["backfill:speaker_participation"].invoke Rake::Task["backfill:event_involvements"].invoke Rake::Task["speakerdeck:set_usernames_from_slides_url"].invoke -Rake::Task["contributors:fetch"].invoke +begin + Rake::Task["contributors:fetch"].invoke +rescue ApplicationClient::Unauthorized => e + puts "Skipping fetching contributors: #{e.message}" +end From 4de960927ddd2c85cecf734c9b111f062a661551 Mon Sep 17 00:00:00 2001 From: Rachael Wright-Munn Date: Thu, 4 Dec 2025 19:01:22 +0000 Subject: [PATCH 3/3] Ignore cached gemfiles when creating commits --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 008a884f8..1fbcd2455 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,9 @@ # or operating system, you probably want to add a global ignore instead: # git config --global core.excludesfile '~/.gitignore_global' -# Ignore bundler config. +# Ignore bundler config and cache /.bundle +vendor/bundle/ # Ignore all logfiles and tempfiles. /log/*