Skip to content

Commit

Permalink
fix: review
Browse files Browse the repository at this point in the history
  • Loading branch information
jeripeierSBB committed Oct 28, 2024
1 parent 99e3ad8 commit 3df5615
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maintenance-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
if: needs.cherry_pick.outputs.failed_release_version
- name: Update maintenance issue
if: needs.cherry_pick.outputs.failed_release_version
run: node --no-warnings=ExperimentalWarning --loader ts-node/esm/transpile-only scripts/update-maintenance-issue.mts
run: yarn ts-hooks scripts/update-maintenance-issue.ts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FAILED_RELEASE: ${{ needs.cherry_pick.outputs.failed_release_version }}
2 changes: 1 addition & 1 deletion .github/workflows/maintenance-cherry-pick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:

- name: Update maintenance issue
if: needs.cherry_pick.outputs.failed_branches
run: node --no-warnings=ExperimentalWarning --loader ts-node/esm/transpile-only scripts/update-maintenance-issue.mts
run: yarn ts-hooks scripts/update-maintenance-issue.ts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
release-type: node
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
# The short ref name of the branch or tag that triggered
# the workflow run. For example, `main` or `1.x`
target-branch: ${{ github.ref_name }}
- name: Release Info
run: echo "$RELEASE_OUTPUT"
env:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { Octokit } from 'octokit';
import { fileURLToPath } from 'url';

import { Octokit } from 'octokit';

const maintenanceIssueNumber = 3176;

const githubToken = process.env['GITHUB_TOKEN'];
const pullRequestNumber = parseInt(process.env['PR_NUMBER']!, 10);
const failedBranches = process.env['FAILED_BRANCHES']?.split(' ').join(', ');
Expand All @@ -13,7 +16,7 @@ const repoConfig = {

const issuePath = {
...repoConfig,
issue_number: 3176,
issue_number: maintenanceIssueNumber,
};

const prPath = {
Expand All @@ -22,12 +25,12 @@ const prPath = {
};

class MaintenanceIssueUpdater {
constructor(
public constructor(
private _octokit: Octokit,
private _now: Date,
) {}

async run() {
public async run(): Promise<void> {
if (!failedBranches && !failedReleaseVersion) {
throw new Error(
`Unable to update maintenance issue.
Expand Down

0 comments on commit 3df5615

Please sign in to comment.