Skip to content
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

Merge dev into main - v0.3.0 #2

Merged
merged 94 commits into from
Jan 11, 2023
Merged

Merge dev into main - v0.3.0 #2

merged 94 commits into from
Jan 11, 2023

Conversation

MLBZ521
Copy link
Owner

@MLBZ521 MLBZ521 commented Jan 11, 2023

Merging the dev branch into the main branch.

Major new feature: Slack Slash Commands

* Encountered an exception on the PkgBot side that was caught and therefor, wasn't posted to Slack
  * Adding method to account for this -- which its use will need to be expanded through the rest of the project
* Starting to break out logic from the `/autopkg/receive` endpoint
Not sure what I was thinking here...
Previous variable's value was not unique (it was `ack`); at least log something of note here.
Fix to allow direct use of the endpoint
* Removed Brackets as they were not needed as they were already included in the return from `brick_update_trust_error_msg`
* However, this function would end up overwriting the existing message and didn't allow it to be "retried"; this should at least add the buttons back so it can be tried again
Properly handle `verify_trust_info` events when the `autopkg/verify-trust/recipe/{recipe_id}` endpoint is called directly via the API
This Bug Fix fixes use of the endpoint for internal calls (e.g. from `bot.receive`)
Ensure something is returned when calling endpoint internally so that calling code can handle the result.
  * Previously, nothing was returned
Standardize:
  * type/instance checking
  * Return verbiage in HTTPException
Update and add missing arguments in doc strings
+ Added required logic to support running `autopkg update-trust-info <recipe>` via a Slack slash command
This will make it easier to pass arguments to this task and not have to worry (as much) about affecting other existing tasks
Replacing some if/elif conditionals with Switch-Case statements
This caused the /api page to fail to load in FastAPI: `verb: str = Literal["disable", "enable", "repo-add", "run", "update-trust-info", "verify-trust-info", "version"]`
Updated recipe error message to thread message when error content is larger than supported "max_content_size"
+ Added a response to `/pkgbot help` to return information on the supported slash cmd options
Tweaked a few existing uses as well
* Added the `JamfPackageUploader` output summary (`Output.jamfpackageuploader_summary_result.data`) to the parsing logic to look for keys instead of only `Input`.
* Minor cleanup and improvements
This was prevent the automative schedule task from running
Register Tortoise ORM (load the database) before mounting APIRouters as this could cause endpoints/functions to fail to retrieve data if execute before the database is available
+ Fixing the `bind` keyword
  - It's _not_ `namebind`
+ Updated the ingress checks to match new methodology
Ensure an error message is posted in addition to the ephemeral message when requested via Slack Slash cmd
@MLBZ521 MLBZ521 merged commit 010eb78 into main Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant