refactor(preview-comment)!: add deprecation notice with blog post (#207)

This commit is contained in:
Cedric van Putten authored and Cedric van Putten committed 2023-02-20 15:12:27 +01:00
1 parent ae5d1a1954
commit d2b3e6c784
4 files changed
+15 -1

No files matched your search

+1
View File
@@ -20789,6 +20789,7 @@ function commentInput() {
}
executeAction(commentAction);
async function commentAction(input = commentInput()) {
(0,core.warning)('Expo publish is deprecated, but will be suported until 2024. Read more: https://blog.expo.dev/sunsetting-expo-publish-and-classic-updates-6cb9cd295378');
const project = await projectInfo(input.project);
if (!project.owner) {
project.owner = await projectOwner();
+2
View File
@@ -32,6 +32,8 @@
<br />
> Expo publish is deprecated, but will be supported until 2024. ([read more](https://blog.expo.dev/sunsetting-expo-publish-and-classic-updates-6cb9cd295378))
## What's inside?
This (sub)action allows you to comment on pull requests containing Expo QR codes.
+5 -1
View File
@@ -1,4 +1,4 @@
import { getBooleanInput, getInput, setOutput, info } from '@actions/core';
import { getBooleanInput, getInput, setOutput, info, warning } from '@actions/core';
import { projectDeepLink, projectInfo, projectLink, projectOwner, projectQR } from '../expo';
import { createIssueComment, pullContext } from '../github';
@@ -26,6 +26,10 @@ export function commentInput() {
executeAction(commentAction);
export async function commentAction(input = commentInput()) {
warning(
'Expo publish is deprecated, but will be suported until 2024. Read more: https://blog.expo.dev/sunsetting-expo-publish-and-classic-updates-6cb9cd295378'
);
const project = await projectInfo(input.project);
if (!project.owner) {
project.owner = await projectOwner();
+7
View File
@@ -63,6 +63,13 @@ describe(commentAction, () => {
jest.mocked(expo.projectOwner).mockResolvedValue('fakeuser');
});
it('warns users for deprecated publish', async () => {
await commentAction({ ...input });
expect(core.warning).toBeCalledWith(
'Expo publish is deprecated, but will be suported until 2024. Read more: https://blog.expo.dev/sunsetting-expo-publish-and-classic-updates-6cb9cd295378'
);
});
it('resolves project info by project path', async () => {
await commentAction({ ...input, project: 'fake/path' });
expect(expo.projectInfo).toBeCalledWith('fake/path');