Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions .github/skills/create-issue/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
---
name: create-issue
description: Creates GitHub issues for the package repository. Use when asked to create, file, or open a GitHub issue, or when planning new features or functions that need to be tracked.
compatibility: Requires the `gh` CLI and an authenticated GitHub session.
---

# Create a GitHub issue

Use `gh api graphql` with the `createIssue` mutation to create issues. This sets the issue type in a single step. Write the body to a temp file first, then pass it via `$(cat ...)`.

## Looking up IDs

The hardcoded IDs below are correct for this repo as of 2026-03-02. If they ever change, or if you're working in a fork or a repo other than "wranglezone/datawrap", re-run these queries to get fresh values (updating owner and name if necessary).

```bash
# Repository node ID
gh api graphql -f query='{ repository(owner: "wranglezone", name: "datawrap") { id } }'

# Available issue type IDs
gh api graphql -f query='{ repository(owner: "wranglezone", name: "datawrap") { issueTypes(first: 20) { nodes { id name } } } }'
```

## Issue type

Choose the type that best fits the issue:

| Type | ID | Use for |
|---|---|---|
| Feature | `IT_kwDODjbzj84BwJRW` | New exported functions or capabilities |
| Bug | `IT_kwDODjbzj84BwJRV` | Something broken or incorrect |
| Documentation | `IT_kwDODjbzj84BwprI` | Docs-only changes |
| Task | `IT_kwDODjbzj84BwJRU` | Maintenance, refactoring, chores |
Comment thread
jonthegeek marked this conversation as resolved.

## Issue title

Titles use conventional commit prefixes:

- `feat: my_function()` — new exported function or feature
- `fix: short description` — bug fix
- `docs: short description` — documentation
- `chore: short description` — maintenance or task

## Issue body structure

Which sections to include depends on the issue type:

| Section | Feature | Bug | Documentation | Task |
|---|---|---|---|---|
| `## Summary` | ✓ | ✓ | ✓ | ✓ |
| `## Details` | optional | optional | optional | optional |
| `## Proposed signature` | ✓ | — | — | — |
| `## Behavior` | ✓ | ✓ | — | — |
| `## References` | optional | optional | optional | optional |

### `## Summary` (all types)

A single user story sentence (no other content in this section):

```markdown
> As a [role], in order to [goal], I would like to [feature].
```

Example:

```markdown
## Summary

> As a data wrangler, in order to share information about my dataset, I would like to create a simple data dictionary based on my dataset.
```

### `## Details` (optional, all types)

For information that's important to capture but doesn't fit naturally into any other section. Use sparingly — if the content belongs in `## Behavior`, `## Proposed signature`, or `## References`, put it there instead.

### `## Proposed signature` (Feature only)

The proposed R function signature, arguments table, and return value description:

````markdown
## Proposed signature

```r
function_name(arg1, arg2)
```

**Arguments**

- `arg1` (`TYPE`) — Description.
- `arg2` (`TYPE`) — Description.

**Returns** a `TYPE` with description.
````
Comment thread
jonthegeek marked this conversation as resolved.

### `## Behavior` (Feature and Bug)

- **Feature**: bullet points describing expected behavior, edge cases, and any internal helpers to implement as part of this issue.
- **Bug**: describe the current (broken) behavior, the expected behavior, and steps to reproduce if known.

### `## References` (optional, all types)

Only include when there are specific reference implementations, external URLs, or related code to link to. Omit it entirely when there are none.

## Creating the issue

```bash
gh api graphql \
-f query='mutation($repoId:ID!, $title:String!, $body:String!, $typeId:ID!) {
createIssue(input:{repositoryId:$repoId, title:$title, body:$body, issueTypeId:$typeId}) {
issue { url }
}
}' \
-f repoId="R_kgDORb_Ktg" \
-f title="feat: my_function()" \
-f body="$(cat /tmp/issue_body.md)" \
-f typeId="IT_kwDODjbzj84BwJRW"
```
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
| `R/datawrap-package.R` | Auto-generated package-level documentation; do not edit |
| `tests/testthat/` | Test suite; mirrors `R/` structure |
| `man/` | Generated Rd files; do not edit manually |
| `.github/skills/` | Agent skill files (document, search-code) |
| `.github/skills/` | Agent skill files |
| `DESCRIPTION` | Package metadata and dependencies |
| `NAMESPACE` | Exports; auto-generated by `devtools::document()` |

Expand Down Expand Up @@ -59,6 +59,7 @@ Skills in @.github/skills should be loaded when the user triggers them.
------------------------|------------------------------------------------|
| document functions | @.github/skills/document/SKILL.md |
| search / rewrite code | @.github/skills/search-code/SKILL.md |
| create github issues | @.github/skills/create-issue/SKILL.md |

## File Organization

Expand Down
3 changes: 0 additions & 3 deletions tests/testthat/test-placeholder.R

This file was deleted.