> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scanoss.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set a project's pull-request controls

> Replaces the project's pull-request controls. Every control is required: this is a complete snapshot, not a patch, so a client sends back what it read. `summary_comment` decides when the Earnie summary comment appears; `inline_severity_floor` and `inline_comment_cap` shape the inline review. The four noise controls decide which pull requests are scanned at all — drafts, bot authors, base branches and changed paths. None of them changes a verdict. Policy evaluation, the gate and the `Earnie` check run are unaffected, and nothing here retroactively adds or removes anything on pull requests already scanned. Refused with `409 settings_locked` when the organization has locked these controls; change them at `/v1/organization/pr-feedback` instead. `locked` and `source` in the body are read-only and ignored.



## OpenAPI

````yaml /api-reference/earnie/platform-openapi.json put /v1/projects/{projectId}/pr-feedback
openapi: 3.0.3
info:
  title: Earnie Organization Settings API
  description: >-
    Read your organization, and read or change scan configuration, automatic
    scanning, pull request feedback, and local hook settings.
  version: 1.0.0
servers:
  - url: https://{tenant}.earnie.dev
    description: Your Earnie deployment
    variables:
      tenant:
        default: your-company
        description: >-
          Your organization's Earnie address, as shown in your browser when you
          sign in.
security:
  - bearerAuth: []
paths:
  /v1/projects/{projectId}/pr-feedback:
    parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
    put:
      tags:
        - organization
      summary: Set a project's pull-request controls
      description: >-
        Replaces the project's pull-request controls. Every control is required:
        this is a complete snapshot, not a patch, so a client sends back what it
        read. `summary_comment` decides when the Earnie summary comment appears;
        `inline_severity_floor` and `inline_comment_cap` shape the inline
        review. The four noise controls decide which pull requests are scanned
        at all — drafts, bot authors, base branches and changed paths. None of
        them changes a verdict. Policy evaluation, the gate and the `Earnie`
        check run are unaffected, and nothing here retroactively adds or removes
        anything on pull requests already scanned. Refused with `409
        settings_locked` when the organization has locked these controls; change
        them at `/v1/organization/pr-feedback` instead. `locked` and `source` in
        the body are read-only and ignored.
      operationId: PutV1ProjectPRFeedback
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PRFeedbackSettings'
      responses:
        '200':
          description: The updated pull-request feedback setting.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PRFeedbackSettings'
        '400':
          description: >-
            A missing control, one outside its allowed range, or a projectId
            that is not a valid UUID (`invalid_body`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient permissions (requires scanconfig:write)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Project not found in the caller's organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            The organization has locked these controls (`settings_locked`).
            Change them at `/v1/organization/pr-feedback`. The project's own
            stored settings are untouched and take effect again if the lock is
            released.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    PRFeedbackSettings:
      type: object
      description: >-
        Per-project pull-request controls. Presentation controls govern how much
        Earnie says about a pull request it scanned; noise controls govern which
        pull requests are worth scanning at all. Neither governs what a scan
        concludes: no control here reaches policy evaluation, the gate, a
        finding state or a verdict, so no setting on this object can turn a
        `block` into a `pass`.
      required:
        - summary_comment
        - inline_severity_floor
        - inline_comment_cap
        - draft_pull_requests
        - bot_authors
        - base_branch_filter
        - path_filters
      properties:
        summary_comment:
          type: string
          enum:
            - always
            - on_failure_only
          description: >-
            `always` posts the summary on every terminal verdict, success
            included — the default, and what a project with no stored setting
            reads. `on_failure_only` refreshes an existing summary comment but
            never creates one on a passing gate: a pull request that has never
            failed gets no comment, while one that did stops showing a stale red
            verdict.
        inline_severity_floor:
          type: string
          enum:
            - critical
            - high
            - medium
            - low
            - info
          description: >-
            Lowest finding severity eligible for an inline review comment.
            Defaults to `medium`; lower-severity findings remain visible in
            Earnie and in the pull-request summary.
        inline_comment_cap:
          type: integer
          minimum: 0
          maximum: 10
          description: >-
            Maximum inline comments in one COMMENT review. Defaults to 10;
            overflow remains in the pull-request summary. Zero disables inline
            placement without changing policy evaluation or the check.
        draft_pull_requests:
          type: string
          enum:
            - scan
            - skip
          description: >-
            What to do with a draft pull request. `scan` — the default, and what
            Earnie did before this control existed — scans it like any other.
            `skip` leaves it unscanned until it is marked ready for review, at
            which point the provider's `ready_for_review` event scans it.
        bot_authors:
          type: string
          enum:
            - scan
            - skip
          description: >-
            What to do with a pull request opened by a provider bot account — a
            dependency updater, release automation, a code generator. `scan` is
            the default. `skip` leaves them unscanned, which on repositories
            where bots open most pull requests is the largest single source of
            check noise.
        base_branch_filter:
          type: array
          items:
            type: string
          maxItems: 50
          description: >-
            Allow-list of base-branch patterns. A pull request targeting a
            branch none of them matches is not scanned. EMPTY MEANS EVERY BASE
            BRANCH, not none. Patterns support exact names, `*`, `?`, `[]`, and
            `prefix/**` for a whole namespace.
        path_filters:
          type: array
          items:
            type: string
          maxItems: 50
          description: >-
            Allow-list of changed-file patterns. A pull request is scanned only
            when it touches at least one matching file. EMPTY MEANS EVERY PATH.
            Earnie scans when it cannot be sure the filter excludes the change:
            if the provider will not say which files changed, or answers a
            truncated list with no match, the pull request is scanned anyway — a
            filter may only suppress a scan on evidence.
        locked:
          type: boolean
          readOnly: true
          description: >-
            Whether these values come from an organization lock rather than from
            the project. When true, `PUT` on this resource is refused with `409
            settings_locked` and the values are changed at
            `/v1/organization/pr-feedback`. Ignored in a request body.
        source:
          type: string
          enum:
            - default
            - project
            - organization
          readOnly: true
          description: >-
            Where the effective answer came from: `organization` for a locked
            organization layer, `project` for the project's own stored settings,
            `default` when neither exists. Ignored in a request body.
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An Earnie API key, sent as `Authorization: Bearer sk_earnie_...`. Create
        one under Settings > API keys. The key's scopes decide which operations
        it may call.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.