fix(cli): fix patched workflow files and examples#6
Conversation
CI Summary
Release - PassedTest this PR Download artifact (GitHub CLI required): gh run download 21878389335 -n cli-preview-0.0.0-pr.6 -R paritytech/dotns-sdkInstall globally:
Verify: dotns --helpDeploy Example — Passed
Labelspkg: cli, dependencies |
| if [[ -n "$CLI_ARTIFACT" ]]; then | ||
| npm install -g ./cli-artifact/dotns-cli-*.tgz | ||
| else | ||
| gh release download "$CLI_VERSION" -p "*.tgz" -R "$GITHUB_REPOSITORY" |
There was a problem hiding this comment.
This seems fine but why was "$GITHUB_REPOSITORY" problematic?
There was a problem hiding this comment.
nvm this makes sense as $GITHUB_REPOSITORY will be for the local github repo, which may not be this one.
There was a problem hiding this comment.
deploy.yml is a reusable workflow, when mark3t (the team im helping deploy to bulletin) calls it, $GITHUB_REPOSITORY resolves to the caller's repo (paritytech/mark3t), not paritytech/dotns-sdk. So gh release download would look for the CLI .tgz on the wrong repo and fail. Hardcoding ensures it always pulls from the right place regardless of who calls the workflow.
| - name: Transfer to dotns | ||
| run: gh issue transfer "$ISSUE_URL" paritytech/dotns | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
Claude tells me
The workflow uses secrets.GITHUB_TOKEN to transfer issues to paritytech/dotns, but the default GITHUB_TOKEN is scoped to the current repository only. Cross-repo operations like gh issue transfer to a different repo typically require a PAT with broader permissions. This workflow will likely fail at runtime with a 403.
But I suppose we will find out if and how it fails. What was your vission with the transfer to dotns step here?
There was a problem hiding this comment.
Your right i was trying to see if it would work but we can change or remove it i was trying to make it that all issues created are transferred to the dotns repo instead of having issues scattered
Description
This PR fixes a patch we needed during the previous PR where we hardcoded the cli to use a version which was built for the PR and not the latest. We also introduce new workflow examples
Type
Package
@dotns/cliRelated Issues
Fixes
Code
bun run lintpassesbun run formatpassesbun run typecheckpassesDocumentation
Breaking Changes
Breaking changes:
Testing
None