From 32aceb58ae1c6e3222f9b737f279d27b13fca8cd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 9 Apr 2026 20:31:09 +0000 Subject: [PATCH 1/2] Initial plan From 4e9feb0a7b02da932deaf5337666428b5e1d5ae0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 9 Apr 2026 20:34:20 +0000 Subject: [PATCH 2/2] Add GitHub Action to update example_data when convert_output.R changes Agent-Logs-Url: https://github.com/nmfs-ost/stockplotr/sessions/16147f90-2416-4af0-a517-a1d297703e33 Co-authored-by: Schiano-NOAA <125507018+Schiano-NOAA@users.noreply.github.com> --- .github/workflows/update-example-data.yml | 37 +++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/update-example-data.yml diff --git a/.github/workflows/update-example-data.yml b/.github/workflows/update-example-data.yml new file mode 100644 index 00000000..95dc205a --- /dev/null +++ b/.github/workflows/update-example-data.yml @@ -0,0 +1,37 @@ +# Update example data when convert_output.R changes +name: update-example-data +on: + push: + branches: [main] + paths: + - 'R/convert_output.R' + workflow_dispatch: +jobs: + update-example-data: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::usethis, local::. + + - name: Update example data + run: | + example_data <- stockplotr::convert_output(file = "inst/extdata/Report.sso") + usethis::use_data(example_data, overwrite = TRUE) + shell: Rscript {0} + + - name: Commit and push updated example data + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git add data/example_data.rda + git diff --cached --quiet || git commit -m "chore: update example_data from convert_output.R changes (triggered by $(git log -1 --pretty=format:'%h %s' HEAD)) [skip ci]" + git push