Skip to content

Commit d2b3e6c

Browse files
committed
refactor(preview-comment)!: add deprecation notice with blog post (#207)
1 parent ae5d1a1 commit d2b3e6c

4 files changed

Lines changed: 15 additions & 1 deletion

File tree

build/preview-comment/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20789,6 +20789,7 @@ function commentInput() {
2078920789
}
2079020790
executeAction(commentAction);
2079120791
async function commentAction(input = commentInput()) {
20792+
(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');
2079220793
const project = await projectInfo(input.project);
2079320794
if (!project.owner) {
2079420795
project.owner = await projectOwner();

preview-comment/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232

3333
<br />
3434

35+
> Expo publish is deprecated, but will be supported until 2024. ([read more](https://blog.expo.dev/sunsetting-expo-publish-and-classic-updates-6cb9cd295378))
36+
3537
## What's inside?
3638

3739
This (sub)action allows you to comment on pull requests containing Expo QR codes.

src/actions/preview-comment.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getBooleanInput, getInput, setOutput, info } from '@actions/core';
1+
import { getBooleanInput, getInput, setOutput, info, warning } from '@actions/core';
22

33
import { projectDeepLink, projectInfo, projectLink, projectOwner, projectQR } from '../expo';
44
import { createIssueComment, pullContext } from '../github';
@@ -26,6 +26,10 @@ export function commentInput() {
2626
executeAction(commentAction);
2727

2828
export async function commentAction(input = commentInput()) {
29+
warning(
30+
'Expo publish is deprecated, but will be suported until 2024. Read more: https://blog.expo.dev/sunsetting-expo-publish-and-classic-updates-6cb9cd295378'
31+
);
32+
2933
const project = await projectInfo(input.project);
3034
if (!project.owner) {
3135
project.owner = await projectOwner();

tests/actions/preview-comment.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ describe(commentAction, () => {
6363
jest.mocked(expo.projectOwner).mockResolvedValue('fakeuser');
6464
});
6565

66+
it('warns users for deprecated publish', async () => {
67+
await commentAction({ ...input });
68+
expect(core.warning).toBeCalledWith(
69+
'Expo publish is deprecated, but will be suported until 2024. Read more: https://blog.expo.dev/sunsetting-expo-publish-and-classic-updates-6cb9cd295378'
70+
);
71+
});
72+
6673
it('resolves project info by project path', async () => {
6774
await commentAction({ ...input, project: 'fake/path' });
6875
expect(expo.projectInfo).toBeCalledWith('fake/path');

0 commit comments

Comments
 (0)