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

refactor: separate main and sample logic #47

Merged
merged 3 commits into from
Feb 18, 2022

Conversation

ImJohnMDaniel
Copy link
Contributor

Change allows for proper separation of "main" logic from the "sample" logic.

This supports the ability for someone to fork/clone the repo and setup the project as an unlocked package without the need to also package the sample code

Description

General best practice suggests that sample logic should be separate from main/primary logic. This change achieves that and provides an easy approach to allow someone to package the codebase in an unlocked package.

Motivation and Context

How Has This Been Tested?

  • Create a scratch org
  • Push this code to a scratch org using command sfdx force:source:push
  • If push is successful, then the test passes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

… logic.

This supports the abillity for someone to fork/clone the repo and setup the project as an unlocked package without the need to also package the sample code
@ImJohnMDaniel
Copy link
Contributor Author

I can see that the validation checks have failed but I am not certain what needs to be changed. Any guidance on this would be appreciated

@victorgz
Copy link
Collaborator

Hi @ImJohnMDaniel , thanks for contributing to the project !

We've some linting processes to ensure that all the contributions follow some rules & conventions. Some weeks ago, we've included conventional commits in the project, so you need to ensure that your commits and the title of the pull request follow that standard. We're using specifically the angular convention.

For example, you could refactor your PR title to
refactor: separate main and sample logic in packageDirectories

And the same things for the two commits that you've pushed

@ImJohnMDaniel ImJohnMDaniel changed the title Separation of "main" logic from "sample" logic in packageDirectories refactor: separate main and sample logic in packageDirectories Apr 24, 2021
@scolladon scolladon requested a review from victorgz October 28, 2021 08:53
@victorgz victorgz mentioned this pull request Jan 17, 2022
6 tasks
@ImJohnMDaniel ImJohnMDaniel changed the title refactor: separate main and sample logic in packageDirectories refactor: separate main and sample logic Jan 30, 2022
@ImJohnMDaniel
Copy link
Contributor Author

@scolladon and @victorgz -- can you let me know what else needs to be done in order for this PR to approved? Thanks

@victorgz
Copy link
Collaborator

victorgz commented Jan 31, 2022

Hi @ImJohnMDaniel , thanks for your contribution and sorry for the late reply ! We've been disconnected some with other projets so there has not been a lot of activity here.

I've just approved the changes, however it seems to be a problem with the Github actions coming from a forked repository. There are some secret tokens used by the actions (whicih obviously are not available in your forked repo) and the actions are executed with your user in the context of our repo. It seems to be a known issue by Github.

I'm gonna try some workarounds and let you know ASAP

@ImJohnMDaniel
Copy link
Contributor Author

@victorgz, Thanks for the update. Let me know if you need anything more from me. Cheers!

@victorgz victorgz merged commit ec13192 into SalesforceLabs:master Feb 18, 2022
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.

2 participants