Skip to content

Commit 3be5a74

Browse files
committed
fix: use Object.defineProperty to override context.repo getter
1 parent a64e656 commit 3be5a74

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/strands-command.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,11 @@ jobs:
8787
uses: actions/github-script@v8
8888
with:
8989
script: |
90-
// When dispatched from a fork, point API calls at the upstream repo
90+
// When dispatched from a fork, override the repo getter to point at upstream
9191
if (context.eventName === 'workflow_dispatch' && context.repo.owner !== 'aws') {
92-
context.repo = { owner: 'aws', repo: 'agentcore-cli' };
92+
Object.defineProperty(context, 'repo', {
93+
get: () => ({ owner: 'aws', repo: 'agentcore-cli' })
94+
});
9395
}
9496
const processInputs = require('./.github/scripts/javascript/process-inputs.cjs');
9597
const inputs = {

0 commit comments

Comments
 (0)