Generating a description for a pull request

With Code Assistant, you can automatically generate descriptions for new pull requests, as well as add and replace descriptions in previously created ones.

Tip

You can set the rules Code Assistant will follow to generate descriptions in the AGENTS.md file at the repository root.

Generating a description when creating a pull request

When creating a pull request, under Description, select Generate with AI.

Code Assistant will add the description after creating your pull request.

Description generation may take a while.

Generating a description in an existing pull request

  1. Open the SourceCraft home page.
  2. On the Home tab, under Your craftspace, navigate to Repositories.
  3. Select a repository.
  4. Under Code on the repository page, go to Pull requests.
  5. Select a pull request.
  6. Under Description, click Generate with AI.

Updating a description in an existing pull request

  1. Open the SourceCraft home page.
  2. On the Home tab, under Your craftspace, navigate to Repositories.
  3. Select a repository.
  4. Under Code on the repository page, go to Pull requests.
  5. Select a pull request.
  6. Under Description, click Regenerate.

Configuring rules for descriptions

  1. Add AGENTS.md to the repository root directory.

    If the file already exists, open it and click Edit.

  2. In AGENTS.md, define the requirements for Code Assistant, like this:

    When creating a PR description, use this phrase: _What a wonderful code_.
    
  3. Click Commit changes.

  4. In the window that opens, configure the settings and confirm your changes.