nf-core-bot

The nf-core-bot can automate code fixes and other actions in pull requests. You trigger these commands by commenting on the PR with specific keywords.

Danger

Command availability varies by repository. Check the repository’s .github/workflows/ directory to see which bot commands are configured.

Available commands

@nf-core-bot fix linting

When prettier reports code formatting issues, you can automatically fix them by commenting:

@nf-core-bot fix linting

This will start a GitHub Actions workflow that will:

  1. React with 👀
  2. Run prettier
  3. Commit changes
  4. Push them to the repository
  5. React with 👍🏻 if everything goes well

@nf-core-bot update gpu snapshot

To update outdated nf-test snapshots for GPU-based tests, comment on the PR:

@nf-core-bot update gpu snapshot

Without a path, the bot updates the snapshots of the GPU tests related to the changes in the PR. It finds tests tagged gpu or gpu_highmem.

To limit the update to specific tests, add a path and, optionally, an extra tag:

@nf-core-bot update gpu snapshot path: $PATH tag: $TAG
  • $PATH is a test file, a directory, or a glob below a component, for example:
    • modules/nf-core/parabricks/applybqsr/tests/main.nf.test
    • modules/nf-core/parabricks/rnafq2bam/tests
    • modules/nf-core/parabricks/*
  • $TAG is an nf-test tag to run in addition to gpu, for example gpu_highmem.

The command must be on its own line, in lowercase, with a space after path: and tag:, and path: before tag:. Paths must start with modules/nf-core/<name> or subworkflows/nf-core/<name>.

The workflow will:

  1. React with 👀
  2. Run the selected tests with --update-snapshot on a GPU runner (a larger one for gpu_highmem tests)
  3. Commit and push the changed snapshots

If the command is invalid, no tests match, or a step fails, the bot reacts with 👎. Check the workflow run for details.

Note

The bot only updates existing snapshot files and only changes snapshots of the tests that were run.

Info

Available for: nf-core/modules.

@nf-core-bot update changelog

To update the auto-generated changelog entry with a new PR title, comment:

@nf-core-bot update changelog $NEW_TITLE

This updates the changelog entry using the PR title, or the value of $NEW_TITLE if provided.

Info

Available for nf-core/tools.

@nf-core-bot update snapshots

When Textual snapshot tests fail (from tests/pipelines/test_crate_app.py), an HTML report is generated and uploaded as an artifact. To automatically update the snapshots, comment:

@nf-core-bot update snapshots
Warning

Always review the HTML report to verify the changes are expected before merging.

Info

Available for nf-core/tools.