Skip to content

Commit

Permalink
Fixed Action Condition when Goto used (#16)
Browse files Browse the repository at this point in the history
- Updated Action to start with 1
- Updated Batch to start with 1
- Updated tag ci-cd to run only affected
  • Loading branch information
dharmesh-hemaram authored Oct 7, 2023
1 parent 1876498 commit 1e53ebd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
PUBLIC_URL=${{needs.EnvSetup.outputs.PUBLIC_URL}}
RELEASE_VERSION=${{needs.EnvSetup.outputs.RELEASE_VERSION}}
parallel-commands-on-agents: |
npx nx run-many --target=build --parallel=3 --exclude='tag:puppeteer'
npx nx affected --target=build --parallel=3 --exclude='tag:puppeteer'
final-commands: |
TARGET_FILE="./dist/apps/acf-extension/manifest.json"
# Use an if-else statement to check if the file exists.
Expand Down
2 changes: 1 addition & 1 deletion apps/acf-extension/src/content_scripts/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Actions = (() => {
};

const checkStatement = async (actions: Array<Action>, action: Action) => {
const actionStatus = actions.map((action) => action.status).filter((status): status is string => !!status);
const actionStatus = actions.map((action) => action.status ?? ACTION_STATUS.SKIPPED);
const result = await Statement.check(actionStatus, action.statement);
return result;
};
Expand Down
4 changes: 2 additions & 2 deletions apps/acf-extension/src/content_scripts/batch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const BatchProcessor = (() => {
if (batch.repeat) {
if (batch.repeat > 0) {
for (let i = 0; i < batch.repeat; i += 1) {
console.group(`${LOGGER_LETTER} #${i + 1}`);
console.group(`${LOGGER_LETTER} #${i + 2}`);
if (batch?.repeatInterval) {
await wait(batch?.repeatInterval, `${LOGGER_LETTER} Repeat`, batch.repeat, '<interval>');
}
Expand Down Expand Up @@ -55,7 +55,7 @@ const BatchProcessor = (() => {

const start = async (actions: Array<Action>, batch?: Batch) => {
try {
console.group(`${LOGGER_LETTER} #0`);
console.group(`${LOGGER_LETTER} #1`);
await Actions.start(actions, 0);
console.groupEnd();
if (batch) {
Expand Down

0 comments on commit 1e53ebd

Please sign in to comment.