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

feat: automatically generate .sauced.yaml file #137

Merged
merged 20 commits into from
Sep 10, 2024

Conversation

zeucapua
Copy link
Contributor

@zeucapua zeucapua commented Sep 4, 2024

Description

Two modes of generating:

  • Automatic

    • Each found email will be attributed to the given Git name
  • Interactive

    • Each found email will prompt the user to set the name it should be attributed to
    • The attribution name can be different from the email's Git name
    • Multiple emails can be attributed to one user
    • Can ignore an email with Ctrl+I

Related Tickets & Documents

Closes #97

Mobile & Desktop Screenshots/Recordings

Steps to QA

  1. Run just build
  2. Run ./build/pizza generate config
  3. Use the -o/--output-path flag to set a directory
  4. Use the -i/--interactive flag to attribute each email manually

Tier (staff will fill in)

  • Tier 1
  • Tier 2
  • Tier 3
  • Tier 4

[optional] What gif best describes this PR or how it makes you feel?

dramatic-chipmunk-gif

@jpmcb
Copy link
Member

jpmcb commented Sep 6, 2024

PSA: you'll want to rebase on beta to get the latest linter config from #148

@zeucapua zeucapua marked this pull request as ready for review September 9, 2024 18:42
@zeucapua zeucapua requested a review from a team September 9, 2024 18:43
Copy link
Member

@jpmcb jpmcb left a comment

Choose a reason for hiding this comment

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

Great stuff! Just a few small nits and this is ready to go! Seriously, huge lift. Great work 🐹

go.mod Outdated Show resolved Hide resolved
cmd/generate/config/output.go Outdated Show resolved Hide resolved
cmd/generate/config/output.go Outdated Show resolved Hide resolved
cmd/generate/config/output.go Outdated Show resolved Hide resolved
cmd/generate/config/config.go Outdated Show resolved Hide resolved
cmd/generate/config/config.go Show resolved Hide resolved
cmd/generate/config/config.go Outdated Show resolved Hide resolved
cmd/generate/config/config.go Outdated Show resolved Hide resolved
cmd/generate/config/config.go Outdated Show resolved Hide resolved
cmd/generate/config/config.go Outdated Show resolved Hide resolved
Copy link
Member

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

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

Having an existing .sauced.yaml, it regenerated it, but the missing premable in comments got removed. Not sure if that's from our template, but just mentioning it.

When regenerating the .sauced.yaml, if one is detected (non-interactive mode) potentially mention it before they proceed.

Also, not sure how far back we're looking by default in the git history, but I see Anush, one of our interns in the list.

CleanShot 2024-09-10 at 13 50 41

Also, we should skip known bot accounts, i.e. any account ending in [bot].

Copy link
Member

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

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

This is working really great @zeucapua! Small change request.

cmd/generate/config/config.go Outdated Show resolved Hide resolved
cmd/generate/config/spec.go Outdated Show resolved Hide resolved
cmd/generate/config/spec.go Show resolved Hide resolved
Copy link
Member

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

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

🚢

@zeucapua
Copy link
Contributor Author

zeucapua commented Sep 10, 2024

Having an existing .sauced.yaml, it regenerated it, but the missing premable in comments got removed. Not sure if that's from our template, but just mentioning it.

When regenerating the .sauced.yaml, if one is detected (non-interactive mode) potentially mention it before they proceed.

Also, not sure how far back we're looking by default in the git history, but I see Anush, one of our interns in the list.

CleanShot 2024-09-10 at 13 50 41

Also, we should skip known bot accounts, i.e. any account ending in [bot].

These can be in a future PR:

  • Warn of existence/use existing .sauced.yaml config
  • Add a --range to how far to check commit logs
  • Add a preamble eg pizza generate codeowners on the .sauced.yaml file!
  • Ignore [bot] contributors

Should I make issues?

@zeucapua zeucapua merged commit b5bc04e into beta Sep 10, 2024
9 checks passed
@jpmcb
Copy link
Member

jpmcb commented Sep 10, 2024

Should I make issues?

Yes, I was going to say: let's followup any additional feedback / bugs in new issues and PRs

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.

Feature: Auto generate a .sauced.yaml file
3 participants