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

Refinement and Documentation of macOS TTPs #60

Merged
merged 41 commits into from
Sep 12, 2023
Merged

Conversation

l50
Copy link
Contributor

@l50 l50 commented Sep 4, 2023

I accidentally hosed #37, so here's a new one:

Proposed Changes

  • Move macOS TTPs into relevant directories
  • Create docs for every macOS TTP
  • Add arguments to macOS TTPs (where needed)
  • Bug fixes

Related Issue(s)

N/A

Testing

Every TTP was run after changes were made.

Documentation

Added README to every macOS TTP

Screenshots/GIFs (optional)

N/A

Checklist

  • Ran mage runprecommit locally and fixed any issues that arose.
  • Curated your commit(s) so they are legible and easy to read and understand.
  • 🚀

@l50 l50 requested a review from cedowens September 4, 2023 00:31
@l50 l50 enabled auto-merge (squash) September 4, 2023 00:47
@l50 l50 added the area/pre-commit Changes made to pre-commit hooks label Sep 5, 2023
Copy link
Contributor

@d3sch41n d3sch41n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have native builtin support for cleanup execution that is composable with ttp:, LIFO, and can be disabled as needed with --no-cleanup - what's the issue that requires re-implementing it with args?

image

@l50
Copy link
Contributor Author

l50 commented Sep 6, 2023

We have native builtin support for cleanup execution that is composable with ttp:, LIFO, and can be disabled as needed with --no-cleanup - what's the issue that requires re-implementing it with args?

Good call, I didn't remember we had that option. I'll update the PR.

@TTPForge-bot TTPForge-bot added area/github Changes made to github actions area/asdf Changes made to asdf resources labels Sep 7, 2023
@TTPForge-bot TTPForge-bot removed area/github Changes made to github actions area/asdf Changes made to asdf resources labels Sep 7, 2023
@TTPForge-bot TTPForge-bot added area/github Changes made to github actions area/asdf Changes made to asdf resources labels Sep 7, 2023
l50 added 12 commits September 6, 2023 18:57
- Updated README to reflect removal of `use_swift` argument.
- Modified launchagent.swift to support a generic shell script, rather than just opening Calculator.
- Enhanced the YAML to handle the default script creation if not provided.
- Streamlined error handling in the Swift code.
- Adjusted cleanup logic in the YAML.
…scripts with Swift.

- Updated the README to reflect changes and use cases.
- Added missing loginitem TTP
- Update linting rule to allow unordered nested lists
l50 added 2 commits September 8, 2023 15:37
- Fixed bug with creating the plist file
- Updated the README.md file to include a default example with no arguments
- Improved error handling and added informative print statements for better debugging.
- Fixed warnings in loginitem.swift
- Fixed warnings that were viable to fix in cleanuploginitem.swift
- Updated the README.md file to include a default example with no arguments
- Improved error handling and added informative print statements for better debugging.
l50 added 3 commits September 11, 2023 12:33
… Handling (facebookincubator#61)

* Add missing set -e

* Add pre-commit hook to append "Authored-by" to commit messages

- Created a new script `.hooks/add-authored-by.sh` which:
  - Checks if git is installed.
  - Verifies if the `user.name` and `user.email` git configurations are set.
  - Appends the "Authored-by" line to the commit message.

- Updated `.pre-commit-config.yaml` to include this script as a `commit-msg` stage hook.

* Ensure duplicate signatures aren't possible

* Add additional error checking

Authored-by: Jayson Grace <jayson.e.grace@gmail.com>

* Remove unimplemented mage function

Authored-by: Jayson Grace <jayson.e.grace@gmail.com>

* Removed commented code

Authored-by: Jayson Grace <jayson.e.grace@gmail.com>

* Update prettier version and add commit-msg hook installation

- Bump prettier version from v3.0.2 to v3.0.3 in pre-commit config.
- Enhance `magefiles/magefile.go` to:
  - Import required modules for file path handling and system utilities.
  - Implement a new `installCommitMsgHook` function that ensures the `commit-msg` hook is set up.
  - Integrate the `installCommitMsgHook` within the `RunPreCommit` function to automate its execution.

Authored-by: Jayson Grace <jayson.e.grace@gmail.com>
- Added expect script back to capture output
- Added additional instructions to TTP pre-requisites
@TTPForge-bot TTPForge-bot added area/github Changes made to github actions area/mage labels Sep 11, 2023
Copy link
Contributor

@cedowens cedowens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and LGTM!

l50 added 3 commits September 11, 2023 12:47
- Can't have `set -e` in either section, otherwise it will error out.
- Resolves bug in remove-quarantine-attrib TTP
Copy link
Contributor

@cedowens cedowens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and LGTM!

@l50 l50 merged commit 853f56c into facebookincubator:main Sep 12, 2023
@TTPForge-bot TTPForge-bot removed area/github Changes made to github actions area/mage labels Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/pre-commit Changes made to pre-commit hooks cla signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants