Skip to content
Nosy
Docs menuGitHub Action

03 Connect

GitHub Action

A weekly, model-free run of nosy weekly. It writes a summary to the job page, and posts or commits only if you turn that on.

Set it up

  1. Once, on your machine: npx github:nosy-hq/nosy setup ., then commit pm/sources.json. In CI the repo path is rewritten to the workspace. That change stays on the runner.
  2. Copy this file to .github/workflows/nosy.yml in your product's repo. No secret is needed: there is no model key.
# .github/workflows/nosy.yml — Nosy's weekly, model-free loop. No model key needed, no charge.
# First, once, locally: `npx github:nosy-hq/nosy setup .` → commit pm/sources.json.
name: Nosy
on:
  schedule:
    - cron: "0 6 * * 1"   # every Monday 06:00 UTC
  workflow_dispatch:

permissions:
  contents: read           # change to write if you set commit: "true" or roadmap: "true" below
  pull-requests: read      # change to write if you set roadmap: "true" (it opens or updates one PR)
  issues: read

jobs:
  nosy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0     # peek reads git history
      - uses: nosy-hq/nosy@main
        with:
          slack-webhook: ${{ secrets.NOSY_SLACK_WEBHOOK }}      # optional
          discord-webhook: ${{ secrets.NOSY_DISCORD_WEBHOOK }}  # optional
          commit: "false"   # "true" makes the Action commit pm/state/ and pm/page.html and push them. pm/state/ can hold issue and PR text.
          roadmap: "false"  # "true" proposes ROADMAP.md as a pull request each week (updates the open one). Needs pm/sources.json "roadmap": {}, permissions contents: write + pull-requests: write, and the repo setting that lets Actions create pull requests.
  • fetch-depth: 0 is required: peek reads git history.
  • It runs every Monday at 06:00 UTC, and by hand from the Actions tab.
  • uses: nosy-hq/nosy@main runs whatever is on the default branch. In a shared repo, pin a release tag instead, for example nosy-hq/nosy@v0.21.1.

Inputs

Inputs of the Nosy weekly Action
InputDefaultWhat it does
pmpmPath to the pm/ folder. It needs pm/sources.json.
since7dHow far back peek reads: 7d, 30d, YYYY-MM-DD or a git ref.
slack-webhook(empty)Slack incoming webhook URL, from a secret. Empty: no Slack message.
discord-webhook(empty)Discord webhook URL, from a secret. Empty: no Discord message.
page-url(empty)Public URL of the decision page (GitHub Pages, say), linked from the message.
commitfalse"true" commits pm/state/ and pm/page.html to the current branch and pushes.
roadmapfalse"true" runs roadmap --pr --yes after the loop: it opens, or updates, one pull request that edits the Nosy block of ROADMAP.md. It runs only when pm/sources.json has a roadmap key. See below.

One output: page, the path of the decision page.

Permissions

contents: read, pull-requests: read and issues: read are enough. Change contents to write only if you set commit: "true" or roadmap: "true". The roadmap input also needs pull-requests: write, and the repository setting that lets Actions create pull requests. The Action reads issues and PRs with the job's own GITHUB_TOKEN.

What it posts and commits, and when

  • Always: runs nosy weekly and writes this week's “Psst…” message into the job summary. Anyone who can read the run can read it.
  • With a webhook: also posts that message to Slack or Discord. See Slack and Discord.
  • With commit: "true": commits pm/state/ and pm/page.html as nosy[bot] and pushes. pm/state/ can hold issue and PR text (what it holds), so the example leaves this off. For a page that stays up, turn on GitHub Pages and pass its address as page-url.
  • What does not fail the job: in the weekly step, a finding (exit 2) becomes a notice and a step that could not run (exit 1) a warning. A missing or broken pm/sources.json does fail it.

The Action runs the counting only. Rival research and the spec drafts need your agent: see the weekly loop.

The roadmap input

Set roadmap: "true" and the Action runs roadmap --pr --yes after the weekly loop. It is on only if you turn it on twice: the input, and a roadmap key in pm/sources.json ("roadmap": {} is enough). Without the key it skips and says so in a notice.

  • Permissions: contents: write and pull-requests: write for the job's own token, and the repository setting that lets Actions create pull requests.
  • What it does: pushes a branch and opens one pull request that edits only the Nosy block of ROADMAP.md. The next week it updates that pull request instead of opening another. Merging is the approval. It prints the pull request address in the job summary.
  • A Projects board: an organization’s Projects v2 board usually can’t be read with the job’s own token. It needs read:project, which that token usually lacks. In the Action, use labels or milestones as the roadmap source, or run nosy roadmap locally. If a source can’t be read, the block is built from the evidence alone and says so (more).
  • A failure does not fail the job. It becomes a warning.

Turn on Slack or Discord

Create an incoming webhook in the channel's settings. Save its URL as a repository secret: NOSY_SLACK_WEBHOOK or NOSY_DISCORD_WEBHOOK. The example already passes both, so an unset secret means no message. Nosy sends only. It never reads chat.

Common errors

  • pm/sources.json is missing. Run npx github:nosy-hq/nosy setup . on your machine and commit the file.
  • pm/sources.json is not valid JSON. Fix the spot it names, or create the file again with setup.
  • Few or no commits in the report. The checkout is shallow. Set fetch-depth: 0.
  • The last step fails to push. commit: "true" needs contents: write.
  • The roadmap step shows a warning. The warning carries the last line of Nosy’s output. Check that the job has contents: write and pull-requests: write, and that the repository setting that lets Actions create pull requests is on.
  • could not add pm/state (a warning). The folder is git-ignored. Remove it from .gitignore or leave commit off.
  • The job is green but says something needs a look. That is the notice for exit code 2, not a failure. The steps marked ! in the log say what.

More: Help Center.