Skip to content

Commit

Permalink
[eas-cli] use branch mapping utility fn (#2186)
Browse files Browse the repository at this point in the history
* [eas-cli] use branch mapping utility fn

* update CHANGELOG.md
  • Loading branch information
quinlanj authored Jan 18, 2024
1 parent da42962 commit 72c28d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ This is the log of notable changes to EAS CLI and related packages.

### 🧹 Chores

- Use branch mapping utility fn. ([#2186](https://github.com/expo/eas-cli/pull/2186) by [@quinlanj](https://github.com/quinlanj))

## [6.1.0](https://github.com/expo/eas-cli/releases/tag/v6.1.0) - 2024-01-18

### 🎉 New features
Expand Down
12 changes: 6 additions & 6 deletions packages/eas-cli/src/commands/channel/edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import { print } from 'graphql';
import gql from 'graphql-tag';

import { selectBranchOnAppAsync } from '../../branch/queries';
import { hasEmptyBranchMap, hasStandardBranchMap } from '../../channel/branch-mapping';
import {
getAlwaysTrueBranchMapping,
hasEmptyBranchMap,
hasStandardBranchMap,
} from '../../channel/branch-mapping';
import { selectChannelOnAppAsync } from '../../channel/queries';
import EasCommand from '../../commandUtils/EasCommand';
import { ExpoGraphqlClient } from '../../commandUtils/context/contextUtils/createGraphqlClient';
Expand Down Expand Up @@ -124,11 +128,7 @@ export default class ChannelEdit extends EasCommand {

const channel = await updateChannelBranchMappingAsync(graphqlClient, {
channelId: existingChannel.id,
// todo: move branch mapping logic to utility
branchMapping: JSON.stringify({
data: [{ branchId: branch.id, branchMappingLogic: 'true' }],
version: 0,
}),
branchMapping: JSON.stringify(getAlwaysTrueBranchMapping(branch.id)),
});

if (json) {
Expand Down

0 comments on commit 72c28d4

Please sign in to comment.