Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(workflow): update fig autocomplete workflow #2679

Merged
merged 12 commits into from Mar 4, 2024
7 changes: 5 additions & 2 deletions .github/workflows/promote-release.yml
Expand Up @@ -58,8 +58,6 @@ jobs:
sudo apt-get install -y awscli
aws configure set preview.cloudfront true
- run: ./scripts/postrelease/invalidate_cdn_cache
## Calls publish-to-fig-autocomplete workflow during post release jobs
- uses: ./.github/workflows/publish-to-fig-autocomplete.yml

release-homebrew:
needs: [ invalidate-cdn-cache ]
Expand All @@ -82,3 +80,8 @@ jobs:
- uses: actions/checkout@v3
- run: yarn --immutable --network-timeout 1000000
- run: ./scripts/postrelease/change_management

create-fig-autocomplete-pr:
if: fromJSON(inputs.isStableRelease)
## Calls publish-to-fig-autocomplete workflow during post release jobs
uses: ./.github/workflows/publish-to-fig-autocomplete.yml
10 changes: 6 additions & 4 deletions .github/workflows/publish-to-fig-autocomplete.yml
Expand Up @@ -6,19 +6,20 @@ on:

jobs:
push-to-fig-autocomplete:
runs-on: ubuntu-latest
runs-on: pub-hk-ubuntu-22.04-small
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn
- run: yarn --immutable --network-timeout 1000000
- name: Install Fig Oclif Plugin
run: ./bin/run plugins:install @fig/oclif-complete@2
- name: Build Heroku CLI
run: yarn build
- name: Generate Fig Spec
run: ./bin/run generate-fig-spec > spec.ts
- name: Get heroku version
- name: Get Heroku Version
id: cli-version
run: echo "version=$(./bin/run --version | sed -rn 's/^heroku\/([0-9\.]+).*$/\1/p')"
- name: Create Fig Autocomplete PR
Expand All @@ -30,3 +31,4 @@ jobs:
integration: oclif
diff-based-versioning: true
new-spec-version: ${{ steps.cli-version.outputs.version }}
pr-body: Automated PR for latest Heroku CLI release
4 changes: 3 additions & 1 deletion packages/addons-v5/package.json
Expand Up @@ -50,7 +50,9 @@
"reporter": "list",
"recursive": true,
"check-leaks": true,
"require": ["./test/init.js"],
"require": [
"./test/init.js"
],
zwhitfield3 marked this conversation as resolved.
Show resolved Hide resolved
"timeout": 180000
},
"repository": "heroku/cli",
Expand Down
4 changes: 3 additions & 1 deletion packages/ci-v5/package.json
Expand Up @@ -54,7 +54,9 @@
"license": "MIT",
"main": "index.js",
"mocha": {
"require": ["test/test-setup.js"],
"require": [
"test/test-setup.js"
],
"recursive": true,
"reporter": "dot",
"timeout": 180000
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/package.json
Expand Up @@ -6,6 +6,7 @@
"bin": "./bin/run",
"bugs": "https://github.com/heroku/cli/issues",
"dependencies": {
"@fig/complete-oclif": "^2.0.0",
"@heroku-cli/color": "1.1.14",
"@heroku-cli/command": "^10.0.0",
"@heroku-cli/command-v9": "npm:@heroku-cli/command@^9.0.2",
Expand Down Expand Up @@ -155,6 +156,7 @@
],
"commands": "./lib/commands",
"plugins": [
"@fig/complete-oclif",
"@oclif/plugin-legacy",
"@heroku-cli/plugin-addons-v5",
"@heroku-cli/plugin-apps-v5",
Expand Down
1 change: 1 addition & 0 deletions packages/cli/test/acceptance/commands-output.ts
Expand Up @@ -124,6 +124,7 @@ export default `\u001B[1m Command Summary
features:disable disables an app feature
features:enable enables an app feature
features:info display information about a feature
generate-fig-spec Generate a Fig completion spec
git:clone clones a heroku app to your local machine at DIRECTORY (defaults to app name)
git:remote adds a git remote to an app repo
help Display help for heroku.
Expand Down
4 changes: 3 additions & 1 deletion packages/container-registry-v5/package.json
Expand Up @@ -51,7 +51,9 @@
"license": "ISC",
"main": "index.js",
"mocha": {
"require": ["./test/helpers.js"],
"require": [
"./test/helpers.js"
],
"reporter": "list",
"recursive": true,
"timeout": 180000
Expand Down
4 changes: 3 additions & 1 deletion packages/oauth-v5/package.json
Expand Up @@ -47,7 +47,9 @@
],
"license": "ISC",
"mocha": {
"require": ["./test/init.js"],
"require": [
"./test/init.js"
],
"recursive": true,
"timeout": 180000
},
Expand Down
4 changes: 3 additions & 1 deletion packages/orgs-v5/package.json
Expand Up @@ -67,7 +67,9 @@
"license": "ISC",
"main": "index.js",
"mocha": {
"require": ["./test/helpers.js"],
"require": [
"./test/helpers.js"
],
"recursive": true,
"timeout": 180000
},
Expand Down
6 changes: 4 additions & 2 deletions packages/pg-v5/package.json
Expand Up @@ -56,9 +56,11 @@
],
"license": "ISC",
"main": "index.js",
"mocha":{
"mocha": {
"recursive": true,
"require": ["./test/init.js"],
"require": [
"./test/init.js"
],
"timeout": 180000
},
"repository": "heroku/cli",
Expand Down
4 changes: 3 additions & 1 deletion packages/redis-v5/package.json
Expand Up @@ -43,7 +43,9 @@
"license": "ISC",
"main": "index.js",
"mocha": {
"require": ["./test/init.js"],
"require": [
"./test/init.js"
],
"reporter": "list",
"recursive": true,
"exit": true,
Expand Down
4 changes: 3 additions & 1 deletion packages/run-v5/package.json
Expand Up @@ -53,7 +53,9 @@
],
"license": "ISC",
"mocha": {
"require": ["./test/init.js"],
"require": [
"./test/init.js"
],
"recursive": true,
"timeout": 180000,
"exit": true
Expand Down
4 changes: 3 additions & 1 deletion packages/spaces/package.json
Expand Up @@ -46,7 +46,9 @@
"license": "ISC",
"main": "index.js",
"mocha": {
"require": ["./test/helpers.js"],
"require": [
"./test/helpers.js"
],
"reporter": "list",
"recursive": true,
"timeout": 180000
Expand Down
20 changes: 20 additions & 0 deletions yarn.lock
Expand Up @@ -1099,6 +1099,16 @@ __metadata:
languageName: node
linkType: hard

"@fig/complete-oclif@npm:^2.0.0":
version: 2.0.0
resolution: "@fig/complete-oclif@npm:2.0.0"
dependencies:
"@oclif/core": ^2.8.11
prettier: ^3.1.1
checksum: c7b148073456723cd85baaab5179a667c8078fb317ea03e184523ac9164ac4ff8f80452006c527e9c4340b08467fe480a2046554a5e6ca75b2e3aa1f27cac8da
languageName: node
linkType: hard

"@gar/promisify@npm:^1.0.1, @gar/promisify@npm:^1.1.3":
version: 1.1.3
resolution: "@gar/promisify@npm:1.1.3"
Expand Down Expand Up @@ -10886,6 +10896,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "heroku@workspace:packages/cli"
dependencies:
"@fig/complete-oclif": ^2.0.0
"@heroku-cli/color": 1.1.14
"@heroku-cli/command": ^10.0.0
"@heroku-cli/command-v9": "npm:@heroku-cli/command@^9.0.2"
Expand Down Expand Up @@ -15547,6 +15558,15 @@ __metadata:
languageName: node
linkType: hard

"prettier@npm:^3.1.1":
version: 3.2.5
resolution: "prettier@npm:3.2.5"
bin:
prettier: bin/prettier.cjs
checksum: 2ee4e1417572372afb7a13bb446b34f20f1bf1747db77cf6ccaf57a9be005f2f15c40f903d41a6b79eec3f57fff14d32a20fb6dee1f126da48908926fe43c311
languageName: node
linkType: hard

"pretty-bytes@npm:^5.3.0":
version: 5.6.0
resolution: "pretty-bytes@npm:5.6.0"
Expand Down