Skip to content

feat: default .use_skill() data argument to list()#16

Merged
jonthegeek merged 4 commits intomainfrom
copilot/add-default-data-argument-to-use-skill
Mar 20, 2026
Merged

feat: default .use_skill() data argument to list()#16
jonthegeek merged 4 commits intomainfrom
copilot/add-default-data-argument-to-use-skill

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 20, 2026

data in .use_skill() was required, forcing callers with no whisker variables to pass data = list() explicitly.

Changes

  • R/use_skill.R: Add data = list() as the default for .use_skill()'s data parameter
  • R/use_skill_document.R: Drop now-redundant data = list() from the .use_skill("document", ...) call
  • tests/testthat/test-use_skill.R: Add test exercising .use_skill() without data
# Before: skills with no template variables required an explicit empty list
.use_skill("document", data = list(), open = FALSE)

# After: default kicks in
.use_skill("document", open = FALSE)
Original prompt

This section details on the original issue you should resolve

<issue_title>feat: default .use_skill() data argument to list()</issue_title>
<issue_description>The data argument of .use_skill() (in R/use_skill.R and the corresponding test file) currently doesn't have a default. Add a default, list(), so that skills without whisker variables don't need to explicitly pass data = list(). Make sure the .use_skill() tests work and there's 100% coverage. Update invocation of .use_skill() (use_skill_document() in R/use_skill_document.R) to avoid passing data = list() (use the default, ie don't specify data).</issue_description>

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


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Co-authored-by: jonthegeek <33983824+jonthegeek@users.noreply.github.com>
Agent-Logs-Url: https://github.com/api2r/pkgskills/sessions/3b9d40c5-9d0d-42b6-8d54-82ea9540a9d0
Copilot AI changed the title [WIP] Add default .use_skill() data argument to list() feat: default .use_skill() data argument to list() Mar 20, 2026
Copilot AI requested a review from jonthegeek March 20, 2026 19:04
Copy link
Copy Markdown
Contributor

@jonthegeek jonthegeek left a comment

Choose a reason for hiding this comment

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

@copilot Implement these changes.

Copilot AI requested a review from jonthegeek March 20, 2026 19:08
Copilot stopped work on behalf of jonthegeek due to an error March 20, 2026 19:08
@jonthegeek jonthegeek marked this pull request as ready for review March 20, 2026 19:08
Copy link
Copy Markdown
Contributor

@jonthegeek jonthegeek left a comment

Choose a reason for hiding this comment

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

Fixed.

@jonthegeek jonthegeek enabled auto-merge (squash) March 20, 2026 19:16
@jonthegeek jonthegeek merged commit 466c2e9 into main Mar 20, 2026
9 checks passed
@jonthegeek jonthegeek deleted the copilot/add-default-data-argument-to-use-skill branch March 20, 2026 19:17
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.

feat: default .use_skill() data argument to list()

2 participants