-
Notifications
You must be signed in to change notification settings - Fork 3
docs: Document first-approval trigger mode for GitHub PRs #348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
promptless
wants to merge
3
commits into
main
Choose a base branch
from
promptless/github-pr-first-approval-mode
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+26
−8
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,32 +10,50 @@ import Info from '@components/fern/Info.astro'; | |
| import Note from '@components/fern/Note.astro'; | ||
| import Warning from '@components/fern/Warning.astro'; | ||
|
|
||
| Promptless automatically monitors your GitHub repositories for new pull requests. When a PR is opened, the system analyzes the changes to determine if documentation updates are needed. | ||
| Promptless monitors your GitHub repositories for pull requests. You can choose when documentation updates trigger: when a PR is opened or when it receives its first approval. | ||
|
|
||
| ## Trigger Modes | ||
|
|
||
| GitHub PR triggers support two modes: | ||
|
|
||
| ### Opened (Default) | ||
|
|
||
| Triggers when a pull request is opened. This works well for teams that want documentation suggestions ready alongside code changes, giving reviewers time to evaluate both. | ||
|
|
||
| ### First Approval | ||
|
|
||
| Triggers when a pull request receives its first approval from a reviewer. Use this mode when you want documentation updates to start only after code has been reviewed, so Promptless analyzes final changes rather than work in progress. | ||
|
|
||
| <Info> | ||
| The first-approval mode only triggers once per PR—on the first approval. Subsequent approvals or re-approvals after requested changes do not trigger additional documentation updates. | ||
| </Info> | ||
|
|
||
|
|
||
| ## How It Works | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PR #2827 implements replay blocking for first-approval pipelines. Added note documenting that replay is not available for first-approval triggers. |
||
|
|
||
| When a pull request is opened in your monitored repositories: | ||
| When a pull request event occurs in your monitored repositories (either opened or first approval, depending on your configuration): | ||
|
|
||
| 1. **Automatic Detection**: Promptless receives notification of the new PR | ||
| 2. **Analysis**: The system processes the code diff, PR title, and PR description to understand the context | ||
| 3. **Relevance Assessment**: Promptless determines if the changes require documentation updates | ||
| 4. **Suggestion Creation**: If relevant, Promptless creates documentation suggestions | ||
|
|
||
| <Note> | ||
| Information from PRs is processed in real-time and not stored by Promptless. The analysis happens only when the PR is created or updated. | ||
| Information from PRs is processed in real-time and not stored by Promptless. The analysis happens only when the configured trigger event occurs. | ||
| </Note> | ||
|
|
||
| ## Configuration | ||
|
|
||
| Configure GitHub PR triggers in your [project settings](https://app.gopromptless.ai/projects): | ||
|
|
||
| 1. Select GitHub as your trigger source | ||
| 2. Choose which repositories to monitor | ||
| 3. Optionally configure directory-specific triggers (see below) | ||
| 4. Set auto-publish preferences | ||
| 2. Choose the trigger mode: **When PR opens** (default) or **After first approval** | ||
| 3. Choose which repositories to monitor | ||
| 4. Optionally configure directory-specific triggers (see below) | ||
| 5. Set auto-publish preferences | ||
|
|
||
| <Frame> | ||
| <img src="/assets/github-project.png" alt="GitHub project configuration showing trigger repository selection" /> | ||
| <Frame caption="GitHub PR trigger configuration with timing options"> | ||
| <img src="https://promptless-customer-doc-assets.s3.us-east-2.amazonaws.com/docs-images/org_2lvkgU9erOFxYhtEVVC0ymPrPdF/github-pr-trigger-mode-27bc0fb4.png" alt="Edit Project modal showing PR trigger timing dropdown with 'When PR opens' and 'After first approval' options" /> | ||
| </Frame> | ||
|
|
||
| ## Directory-Specific Triggers | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR #2827 adds
options.github_pr_trigger_modewith "opened" (default) and "first_approval" modes for GitHub-family pipelines. The trigger mode section documents these two options and explains when first-approval triggers (on first active PR approval) vs when opened triggers (on PR open).Source: https://github.com/Promptless/promptless/pull/2827