Skip to content

Commit 8d86144

Browse files
committed
Remove npm script and update demo docs to use renovate CLI directly
- Remove renovate:jest npm script from package.json - Update demo documentation to be more general about renovate CLI usage - Include example command with GitHub token setup - Make documentation less specific to Jest, more broadly applicable
1 parent b84705a commit 8d86144

File tree

2 files changed

+44
-20
lines changed

2 files changed

+44
-20
lines changed

backend/catalog/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"build": "tsc",
1010
"test": "jest",
1111
"setup": "./scripts/setup.sh",
12-
"renovate:jest": "echo 'Creating Jest v30 pull request...' && cd /workspaces/gitpodflix-demo && RENOVATE_TOKEN=$GH_CLI_TOKEN renovate --platform=github gitpod-samples/gitpodflix-demo"
1312
},
1413
"dependencies": {
1514
"express": "^4.18.2",

demos/fixing-renovate-dependencies.md

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,42 @@ This demo shows how to use Renovate to create pull requests for dependency updat
66

77
- Access to a Gitpod environment with this repository
88
- GitHub CLI token configured (`GH_CLI_TOKEN` environment variable)
9-
- Renovate CLI installed (included in the devcontainer)
9+
- Renovate CLI is pre-installed in the devcontainer
1010

1111
## Steps to Replicate
1212

1313
### 1. Create a Renovate Pull Request
1414

15-
Navigate to the catalog service directory and run the renovate Jest command:
15+
The Renovate CLI is available in this environment and can be used to scan for dependency updates. The repository includes a `renovate.json` configuration that focuses on Jest dependencies.
16+
17+
To create a pull request for dependency updates, you can run:
1618

1719
```bash
18-
cd backend/catalog
19-
npm run renovate:jest
20-
```
20+
# Set the GitHub token for Renovate
21+
export RENOVATE_TOKEN=$GH_CLI_TOKEN
2122

22-
This command will:
23+
# Run Renovate to scan and create pull requests
24+
renovate --platform=github gitpod-samples/gitpodflix-demo
25+
```
2326

27+
This will:
2428
- Use the existing `renovate.json` configuration
25-
- Create a pull request specifically for Jest dependency updates
26-
- Target Jest upgrades that may introduce breaking changes
29+
- Scan for dependency updates (currently configured for Jest)
30+
- Create pull requests for available updates
31+
- Target upgrades that may introduce breaking changes
2732

2833
### 2. Review the Pull Request
2934

30-
After the command completes, check the GitHub repository for the newly created pull request. The PR will contain:
31-
32-
- Updated Jest dependencies
33-
- Breaking changes that need to be addressed
35+
After the command completes, check the GitHub repository for newly created pull requests. The PRs will contain:
36+
- Updated dependencies
37+
- Changelog information about breaking changes
38+
- Details about what needs to be addressed
3439

3540
### 3. Resolve Breaking Changes with AI
3641

3742
You have several options to get AI assistance for resolving the breaking changes:
3843

3944
#### Option A: Using GitHub CLI
40-
4145
```bash
4246
# Get PR details and diff
4347
gh pr view <PR_NUMBER> --json body,title,files
@@ -47,23 +51,44 @@ gh pr diff <PR_NUMBER>
4751
```
4852

4953
#### Option B: Manual Context Gathering
50-
5154
1. Copy the PR description and diff manually
5255
2. Include relevant test files that might be affected
53-
3. Construct a prompt asking for help with Jest migration
56+
3. Construct a prompt asking for help with dependency migration
5457

5558
#### Option C: Direct File Analysis
56-
5759
1. Review the failing tests after merging the PR
5860
2. Copy error messages and affected code
59-
3. Ask AI to help fix the deprecated Jest matchers
61+
3. Ask AI to help fix compatibility issues
6062

6163
## Example AI Prompt
6264

6365
```
64-
I have a Jest upgrade from v29 to v30 that's causing test failures due to deprecated matchers. Here are the failing tests:
66+
I have a dependency upgrade that's causing test failures due to breaking changes. Here are the failing tests and error messages:
6567
6668
[Include test file contents and error messages]
6769
68-
Please help me update the deprecated Jest matchers to their v30 equivalents.
70+
Please help me update the code to be compatible with the new version.
6971
```
72+
73+
## Renovate Configuration
74+
75+
The repository includes a `renovate.json` file that can be customized to target specific dependencies or change update behavior. You can modify this configuration to:
76+
- Target different packages
77+
- Change update frequency
78+
- Adjust PR creation settings
79+
- Enable/disable specific dependency types
80+
81+
## Expected Outcomes
82+
83+
- Pull requests with dependency updates
84+
- Understanding of how to use AI to resolve breaking changes
85+
- Updated code compatible with new dependency versions
86+
- Successful test suite execution after fixes
87+
88+
## Notes for Sales Engineers
89+
90+
- This demonstrates real-world dependency management scenarios
91+
- Shows how AI can assist with breaking changes during upgrades
92+
- Highlights the importance of having good test coverage
93+
- Illustrates the collaborative workflow between automated tools and AI assistance
94+
- Renovate CLI provides flexibility for different scanning and update strategies

0 commit comments

Comments
 (0)