-
Notifications
You must be signed in to change notification settings - Fork 30
Remove tj-actions usage, eventhough we had it pinned as gitref #753
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes the dependency on tj-actions and refactors command execution logic in the repository sourcing code while updating the conditions in the preview build workflow.
- Refactored usage of Exec(), ExecIn(), and related command execution methods in RepositorySourcesFetcher.cs
- Removed the tj-actions/changed-files step and simplified conditional checks in the preview-build workflow
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/docs-assembler/Sourcing/RepositorySourcesFetcher.cs | Updated Exec and ExecIn APIs by removing the redundant "name" parameter and switching to ExecArguments and Proc.Exec |
.github/workflows/preview-build.yml | Eliminated tj-actions/changed-files usage and simplified conditions for checkout, deployment, and documentation build steps |
Comments suppressed due to low confidence (2)
src/docs-assembler/Sourcing/RepositorySourcesFetcher.cs:136
- The removal of the ConsoleLineHandler from the ExecIn method means that diagnostic logging context previously provided by the 'name' parameter is no longer available. Consider verifying that this change in error reporting and logging detail is intentional, or reintroduce context to assist with debugging.
var result = Proc.Exec(arguments);
.github/workflows/preview-build.yml:61
- With the removal of the changed-files check, the workflow conditions for pull request events have been simplified. Ensure that this change does not lead to unintended triggering of jobs when there are no relevant file changes.
if: startsWith(github.event_name, 'pull_request')
_logger.LogInformation("Pull: {Name}\t{Repository}\t{RelativePath}", name, repository, relativePath); | ||
// --allow-unrelated-histories due to shallow clones not finding a common ancestor | ||
ExecIn(name, checkoutFolder, "git", "pull", "--depth", "1", "--allow-unrelated-histories", "--no-ff"); | ||
ExecIn(checkoutFolder, "git", "pull", "--depth", "1", "--allow-unrelated-histories", "--no-ff"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated but is a fix for: https://github.com/elastic/docs-internal-workflows/actions/runs/13865451267
This will do a full docs build even for PR's that do not change docs. However because we run reasonably fast the impact is limited.
We do want to restore some checks so we don't always upload to S3 for the preview environment which might take a bit longer.
NOTE: the actions repo itself now 404's (maybe as a precaution by github)