Skip to content

Conversation

@DevTKSS
Copy link
Contributor

@DevTKSS DevTKSS commented May 2, 2025

GitHub Issue (If applicable): closes #

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature

What is the current behavior?

  • Script allows only importing from uno github url, which makes it difficult (for me not possible) for non-team contributors to validate the PR if it includes doc changes that would be best to build locally
  • while it takes one simple paramter, its not following current PS v7.5 structure with begin-process-end and the function the current code contains lies mid in the executed code which leaves unclear when its called (at this line or maybe only if called by name?) seperated this below the main function to clear this up.
  • using alias instead of Get-... Set-... is not recommended from PSAnalyzer so updated this.

What is the new behavior?

  • Added a parameter that extends the script capabilities to use the custom github url and not only (until now) the sha to import.
  • Changed the PS to advanced script, not only for brevity than also to future allow Verbose, Debug cmdlet and Testing this script
  • Changed alias to current recommended

PR Checklist

Please check if your PR fulfills the following requirements:

  • Docs have been added/updated which fit documentation template (for bug fixes / features)
  • Unit Tests and/or UI Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Validated PR Screenshots Compare Test Run results.
  • Contains NO breaking changes => to be evaluated, but I dont think its a breaking change
  • Associated with an issue (GitHub or internal) and uses the automatic close keywords.
  • Commits must be following the Conventional Commits specification.

Other information

Problem this need a last bit of help with:
after running the main script, when it returns to the known _Test.ps1 the Script executing path does not match coming from the Location change in the main script for importing the externals.
thats most likly just a quick fix but I do not know.

causing problems for most of my docs PR, e.g.:

Internal Issue (If applicable):

DevTKSS added 6 commits May 2, 2025 12:42
…repositories

chore: Updated pwsh alias to recommended pwsh syntax
chore: Added and implement custom url parameter to ctor of script, to enable contributor url acceptance of the script when its not listed at the depending uno repo so far
…le testing it

chore: update from alias usage to recommended full qualified functions

# Conflicts:
#	build/cSpell.json
@DevTKSS
Copy link
Contributor Author

DevTKSS commented May 2, 2025

@kazo0 @agneszitte tryed to fix the import script, but this need a last bit of help to be ready

@kazo0
Copy link
Contributor

kazo0 commented May 11, 2025

@jeromelaban I'm not sure if this is something we'd want to change? However, what would be the easiest way for @DevTKSS to be able to test their docs changes locally given that they are on a fork?

I was imagining that they would be able to change this line:

$uno_git_url = "https://github.com/unoplatform/"
to point to their fork url instead and they could comment out the unneeded repos from here:
"uno.wasm.bootstrap" = "main"
"uno.themes" = "master"
"uno.toolkit.ui" = "main"
"uno.check" = "main"
"uno.xamlmerge.task" = "main"
"figma-docs" = "main"
"uno.resizetizer" = "main"
"uno.uitest" = "master"
"uno.extensions" = "main"
"workshops" = "master"
"uno.samples" = "master"
"uno.chefs" = "main"

@DevTKSS
Copy link
Contributor Author

DevTKSS commented May 11, 2025

@kazo0 so like do it in a two step thing? but that would potentially fail because after the import, the docfx and dotnet-serve command is called right after, so this will defintly fail. And currently, when I maybe did already run this once (and its telling me the branch with the sha of my fork is not on the uno-origin (of corse not ;) ) ) then on second run where I maybe would have added another commit to fix links, then it is failing because the repo (no matter which) is already existing at external, directory, so maybe this part of the problem would require a clean up before checking out again? meaning the checkouts of the uno-origin, non fork external imports if unclear worded.

@DevTKSS
Copy link
Contributor Author

DevTKSS commented May 11, 2025

currently that partial import would fail also because the docfx would attempt to resolve all links no matter if it might be the first of two import steps, which is of corse not possible until all externals are there. Or do you see another possible workaround to tell it to not to this or run a second run with the other url? thats just what I tryed to introduce with this, to provide the other url(s) which would essentially just need one url, because mostly we only have one account at the time.

mkdir articles\external -ErrorAction Continue
}

Push-Location articles\external
Copy link
Member

Choose a reason for hiding this comment

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

It's best to avoid cosmetic changes with functional changes. Could you make a PR only with the custom git change?

@DevTKSS DevTKSS closed this Jul 4, 2025
@DevTKSS DevTKSS deleted the feat(import-external-docs)-allow-contributor-url-for-import branch July 5, 2025 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants