mirror of
https://github.com/expo/expo-github-action.git
synced 2026-11-15 17:32:45 -10:00
refactor(preview-comment)!: add deprecation notice with blog post (#207)
This commit is contained in:
1 parent
ae5d1a1954
commit
d2b3e6c784
4 files changed
+15
-1
No files matched your search
@@ -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();
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in new issue
Block a user