Closes#13324
Previously, `expectedReviewers` were not built for draft PRs, (they were
left empty) which meant the code for determining whether a PR should get
the #g-ceo label didn't work for PRs that began their life as draft PRs.
- Deduplicate config for DRI vs CODEOWNERS (this eliminates extra
notifications folks were receiving)
- auto-remove #g-ceo and #handbook labels when appropriate
- improve comments
- reevaluate and potentially request review from others when PR is
edit…ed
- plus two optimizations to avoid tricking/testing the github api with
duplicate reviewers and empty reviewers
https://github.com/fleetdm/confidential/issues/3146
To test this works:
- sam should be able to change ceo handbook and be autoapproved
- mike submitting a PR to the ceo handbook should request review from
Sam but auto-approve for mike
- Jarod's use case of creating an article should now work, even if his
PR contains images
.
---------
Co-authored-by: Mike McNeil <[email protected]>
# Checklist for submitter
If some of the following don't apply, delete the relevant line.
- [ ] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [ ] Documented any API changes (docs/Using-Fleet/REST-API.md or
docs/Contributing/API-for-contributors.md)
- [ ] Documented any permissions changes
- [ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.
- [ ] Added/updated tests
- [ ] Manual QA for all new/changed functionality
- For Orbit and Fleet Desktop changes:
- [ ] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md)).
# Checklist for submitter
If some of the following don't apply, delete the relevant line.
- [ ] Changes file added for user-visible changes in `changes/` or
`orbit/changes/`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [ ] Documented any API changes (docs/Using-Fleet/REST-API.md or
docs/Contributing/API-for-contributors.md)
- [ ] Documented any permissions changes
- [ ] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [ ] Added support on fleet's osquery simulator `cmd/osquery-perf` for
new osquery data ingestion features.
- [ ] Added/updated tests
- [ ] Manual QA for all new/changed functionality
- For Orbit and Fleet Desktop changes:
- [ ] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
- [ ] Auto-update manual QA, from released version of component to new
version (see [tools/tuf/test](../tools/tuf/test/README.md))
Changes:
- Updated the request to the OpenAI API in `receive-from-github.js` to
send a request to the `chat/completions/` API and updated the request
body to be compatible with the `/chat/` API.
(https://platform.openai.com/docs/api-reference/chat/create)
Upgrade to GPT-4. Increase max tokens 4x up to 8000 (aka the maximum
character length of issue description that it can pontificate about in
the form of a short haiku)
.
Changes:
- Updated `receive-from-github.js` to only send requests to freeze and
unfreeze the Fleet repo when the PR it is checking is from the
fleetdm/fleet repo.
Changes:
- Updated the `receive-from-github` webhook to tolerate failed requests
to the Merge Freeze API. If a request fails, the webhook logs a warning
and continues as if the main branch is not frozen.
---------
Co-authored-by: Mike McNeil <[email protected]>
Changes:
- Updated the conditional statement that determines if we will be
notified in Slack to filter out commit comments and deleted comments
from Fleet team members with uppercase letters in their GitHub
usernames.
Improve https://github.com/fleetdm/fleet/pull/9336 providing default
settings similar to the OpenAI playground, including a higher
temperature and number of maximum tokens. Also fixes prefix trimming.
This improves https://github.com/fleetdm/fleet/pull/9336 by eliminating
junk text and encouraging better replies. Uses an h1 to emphasize the
issue title, so that short issues don't get weird and truncated, and the
bot reply stays focused on the main point of the issue.