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

# PRs semanais de atualização de dependências

export const UseCaseHero = ({title, description, prompt, category, features, devinUrl, agent, intent, playbookId, type}) => {
  const encodedPrompt = encodeURIComponent(prompt || '');
  const tag = 'docs-use-case-gallery';
  const utm = 'utm_source=docs&utm_medium=use-case-gallery&utm_campaign=hero-cta';
  const agentParams = (agent ? '&agent=' + agent : '') + (intent ? '&intent=' + intent : '') + (playbookId ? '&playbookId=' + playbookId : '');
  const devinHref = type === 'schedule' ? 'https://app.devin.ai/settings/schedules/create?' + utm + agentParams + (prompt ? '&prompt=' + encodedPrompt : '') : type === 'review' ? 'https://app.devin.ai/review?' + utm : agent === 'ada' ? 'https://app.devin.ai/search?' + utm + '&noSubmit=true' + (prompt ? '&prompt=' + encodedPrompt : '') : devinUrl ? devinUrl.includes('?') ? devinUrl + '&' + utm + agentParams : devinUrl + '?' + utm + agentParams : prompt ? 'https://app.devin.ai/?tags=' + tag + '&' + utm + agentParams + '&prompt=' + encodedPrompt : 'https://app.devin.ai/?' + utm + agentParams;
  const buttonLabel = type === 'schedule' ? 'Schedule in Devin ↗' : type === 'review' ? 'Set Up Devin Review ↗' : agent === 'advanced' ? 'Try in Devin ↗' : agent === 'dana' ? 'Try in Dana ↗' : agent === 'ada' ? 'Try in Ask Devin ↗' : 'Try in Devin ↗';
  const featureList = features ? features.split(',').map(f => f.trim()) : [];
  return <div className="uc-hero">
      <div className="uc-hero-inner">
        <div className="uc-hero-left">
          <h1 className="uc-hero-title">{title}</h1>
          <p className="uc-hero-desc">{description}</p>
          <div>
            <a href={devinHref} target="_blank" rel="noopener noreferrer" className="try-in-devin-btn">
              {buttonLabel}
            </a>
          </div>
        </div>
        <div className="uc-hero-meta">
          <div className="uc-meta-item">
            <span className="uc-meta-label">Author</span>
            <span className="uc-meta-value">Cognition</span>
          </div>
          <div className="uc-meta-item">
            <span className="uc-meta-label">Category</span>
            <span className="uc-meta-value">{category}</span>
          </div>
          {featureList.length > 0 && <div className="uc-meta-item">
              <span className="uc-meta-label">Features</span>
              <span className="uc-meta-value">{featureList.join(', ')}</span>
            </div>}
        </div>
      </div>
    </div>;
};

export const PromptBlock = ({children, type, agent, intent, playbookId}) => {
  var utm = 'utm_source=docs&utm_medium=use-case-gallery&utm_campaign=prompt-block';
  var tag = 'docs-use-case-gallery';
  var agentParams = (agent ? '&agent=' + agent : '') + (intent ? '&intent=' + intent : '') + (playbookId ? '&playbookId=' + playbookId : '');
  var label = type === 'schedule' ? 'Schedule in Devin' : type === 'playbook' ? 'Create Playbook' : type === 'knowledge' ? 'Add to Knowledge' : agent === 'advanced' ? 'Try in Devin' : agent === 'dana' ? 'Try in Dana' : agent === 'ada' ? 'Try in Ask Devin' : 'Try in Devin';
  var buildUrl = function (text) {
    var encoded = encodeURIComponent(text);
    if (type === 'schedule') return 'https://app.devin.ai/settings/schedules/create?' + utm + agentParams + '&prompt=' + encoded;
    if (type === 'playbook') return 'https://app.devin.ai/settings/playbooks/create?' + utm + '&body=' + encoded;
    if (type === 'knowledge') return 'https://app.devin.ai/knowledge?' + utm + '&body=' + encoded;
    if (agent === 'ada') return 'https://app.devin.ai/search?' + utm + '&noSubmit=true&prompt=' + encoded;
    return 'https://app.devin.ai/?tags=' + tag + '&' + utm + agentParams + '&prompt=' + encoded;
  };
  const ref = React.useRef(null);
  const [href, setHref] = React.useState('#');
  React.useEffect(() => {
    if (!ref.current) return;
    var codeEl = ref.current.querySelector('pre code');
    if (codeEl) {
      var text = codeEl.textContent.trim();
      if (text) setHref(buildUrl(text));
    }
    var header = ref.current.querySelector('[data-component-part="code-block-header"]');
    if (header && !header.querySelector('.prompt-block-devin-link')) {
      var link = document.createElement('a');
      link.href = href;
      link.target = '_blank';
      link.rel = 'noopener noreferrer';
      link.className = 'prompt-block-devin-link';
      link.style.cssText = 'display:inline-flex;align-items:center;gap:6px;text-decoration:none;color:#fff;font-size:11px;font-weight:500;padding:4px 10px;border-radius:6px;white-space:nowrap;background:#317CFF;transition:background 0.2s;margin-left:8px;';
      link.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg> ' + label;
      link.onmouseenter = function () {
        link.style.background = '#2968D9';
      };
      link.onmouseleave = function () {
        link.style.background = '#317CFF';
      };
      header.appendChild(link);
    }
    var existingLink = ref.current.querySelector('.prompt-block-devin-link');
    if (existingLink && href !== '#') existingLink.href = href;
  });
  return <div className="prompt-block" ref={ref}>{children}</div>;
};

<UseCaseHero title="PRs semanais de atualização de dependências" description="Agende uma sessão semanal do Devin para encontrar pacotes desatualizados, executar seus testes e abrir PRs de atualização." prompt="Verifique se há pacotes npm desatualizados. Atualize todas as versões de patch e minor em um único PR — execute a suíte de testes e inclua uma tabela com as alterações. Para qualquer atualização de versão major, abra um PR separado com notas sobre breaking changes retiradas do changelog." category="Automações" features="Agendamentos" type="schedule" />

<div className="uc-detail-wrapper">
  <Tip>Não quer configurar isso manualmente? Cole um link para esta página em uma sessão do Devin e peça para ele configurar tudo para você.</Tip>

  <Steps>
    <Step title="Crie um agendamento semanal">
      Abra [app.devin.ai](https://app.devin.ai/?utm_source=docs\&utm_medium=use-case-gallery) e vá para **Settings > Schedules**. Clique em **Create schedule** e configure:

      * **Frequency:** Weekly — por exemplo, toda segunda-feira às 7:00 AM UTC (`0 7 * * 1`)
      * **Prompt:** Cole o prompt de atualização de dependências abaixo

      <PromptBlock type="schedule">
        ```txt Weekly dependency update prompt theme={null}
        Check for outdated npm packages in the acme/frontend repo. For each:
        1. Update all patch and minor versions together in a single PR.
           Run the full test suite and include a summary table of changes.
        2. For each major version bump, open a separate PR with:
           - A summary of breaking changes from the package changelog
           - Any code modifications needed for compatibility
           - The updated lockfile
        3. Run `npm audit` and flag any packages with known vulnerabilities.
        ```
      </PromptBlock>

      Se você usa um [Playbook](/pt-BR/product-guides/creating-playbooks) sobre como sua equipe lida com atualizações de dependências (por exemplo, sempre executar `npm run build` após atualizar, ou pular `devDependencies`), anexe-o ao agendamento para que cada execução siga o mesmo processo.
    </Step>

    <Step title="Adicione Knowledge para orientar as atualizações">
      Nem todo pacote deve ser atualizado automaticamente. Vá para **Settings > Knowledge** e adicione entradas que digam ao Devin o que não deve ser atualizado ou o que deve ser tratado com cuidado:

      * `Do not update react past v18 — we're mid-migration to v19 on a separate branch.`
      * `Always pin @types/node to match our Node.js version (20.x).`
      * `Skip eslint-plugin-import — it conflicts with our custom lint config.`
      * `Our test command is npm run test:ci, not npm test.`

      Essas entradas de [Knowledge](/pt-BR/product-guides/knowledge) persistem em todas as execuções agendadas, então o Devin respeita suas restrições sem que você precise repeti-las no prompt.
    </Step>

    <Step title="Revise o que o Devin entrega">
      Toda segunda-feira, o Devin verifica seu repositório em busca de pacotes desatualizados e abre PRs em seu nome. Uma semana típica pode produzir:

      **PR #1 — Atualizações seguras (patch + minor):**

      ```
      ## Dependency Updates — Week of Feb 10

      | Package         | From    | To      | Type  |
      |-----------------|---------|---------|-------|
      | axios           | 1.6.2   | 1.6.8   | patch |
      | react-query     | 5.17.0  | 5.22.1  | minor |
      | tailwindcss     | 3.4.1   | 3.4.6   | patch |
      | typescript      | 5.3.3   | 5.3.5   | patch |

      All 847 tests passing. No vulnerabilities found by npm audit.
      ```

      **PR #2 — Major bump (separado, com notas):**

      ```
      ## Major Update: zod 3.x → 4.0.0

      Breaking changes (from CHANGELOG):
      - `z.object().strict()` is now the default behavior
      - `z.enum` requires at least one value
      - Removed deprecated `.check()` method

      Code changes in this PR:
      - Updated 3 schema files to remove explicit `.strict()` calls
      - Added fallback value to empty enum in src/schemas/status.ts
      ```

      O Devin executa sua suíte de testes para cada PR de forma independente, para que você possa fazer merge do lote seguro imediatamente e reservar tempo para revisar as atualizações de versão principal.
    </Step>

    <Step title="Itere e expanda">
      Quando seu agendamento semanal estiver em execução, você pode refiná-lo com o tempo. Responda a qualquer sessão agendada para dar instruções de acompanhamento ao Devin:

      <PromptBlock>
        ```txt Handle a major update theme={null}
        Go ahead with the zod v3 to v4 migration. Check the migration guide at
        https://zod.dev/v4 and update all schema files accordingly.
        ```
      </PromptBlock>

      <PromptBlock>
        ```txt Expand to backend deps theme={null}
        Also check for outdated Python packages in the acme/backend repo using pip.
        Update all compatible versions and open a separate PR. Run pytest before submitting.
        ```
      </PromptBlock>

      **Dicas para manter tudo fluindo bem:**

      * **Separe frontend e backend** — Se o seu repositório tiver ambos, crie dois agendamentos para que cada PR permaneça focado e fácil de revisar.
      * **Deixe o CI rodar completamente antes de fazer o merge** — Mesmo atualizações minor aparentemente seguras podem introduzir bugs sutis. O Devin executa seus testes, mas seu pipeline completo de CI adiciona outra camada de confiança.
      * **Verifique a página [Schedules](/pt-BR/product-guides/scheduled-sessions)** para monitorar o histórico de execuções, pausar um agendamento durante um code freeze ou ajustar a expressão cron.
    </Step>
  </Steps>
</div>
