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

Print immutable action package details in set up job logs #3645

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

heavymachinery
Copy link
Contributor

Soon the server will begin to respond with additional details about the package when an immutable action is downloaded. If the package details are available, we want to print them in the Set up job logs so it is clear when a workflow run used an immutable action.

Related internal tracking issue

@heavymachinery heavymachinery marked this pull request as ready for review January 9, 2025 18:07
@heavymachinery heavymachinery requested a review from a team as a code owner January 9, 2025 18:07
@heavymachinery heavymachinery force-pushed the heavymachinery/immutable-actions-logs branch from d30f5ea to ea2794d Compare January 9, 2025 18:32
Comment on lines +113 to +125
private static ActionDownloadPackageDetails? ToServerData(ActionDownloadPackageDetailsResponse? actionDownloadPackageDetails)
{
if (actionDownloadPackageDetails == null)
{
return null;
}

return new ActionDownloadPackageDetails
{
Version = actionDownloadPackageDetails.Version,
ManifestDigest = actionDownloadPackageDetails.ManifestDigest
};
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Here's a more concise way to write this method:

Suggested change
private static ActionDownloadPackageDetails? ToServerData(ActionDownloadPackageDetailsResponse? actionDownloadPackageDetails)
{
if (actionDownloadPackageDetails == null)
{
return null;
}
return new ActionDownloadPackageDetails
{
Version = actionDownloadPackageDetails.Version,
ManifestDigest = actionDownloadPackageDetails.ManifestDigest
};
}
private static ActionDownloadPackageDetails? ToServerData(ActionDownloadPackageDetailsResponse? actionDownloadPackageDetails) =>
actionDownloadPackageDetails == null ? null : new ActionDownloadPackageDetails
{
Version = actionDownloadPackageDetails.Version,
ManifestDigest = actionDownloadPackageDetails.ManifestDigest
};

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