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

feat!: change-case v2 #141

Merged
merged 5 commits into from
May 24, 2024
Merged

feat!: change-case v2 #141

merged 5 commits into from
May 24, 2024

Conversation

mshanemc
Copy link
Collaborator

@mshanemc mshanemc commented May 24, 2024

  • use esm
  • deprecate/hide the check command (we don't use it, creating the case checks the moratorium)
  • use the "new" v2 API. It simplifies the close process and also requires different date/time stuff.

See https://salesforce-internal.slack.com/archives/G02K6C90RBJ/p1716552999650839

QA:
I did this one from local CLI. You'll need the tooling releases user, not your normal GUS uers (you can't create a Build)
https://gus.lightning.force.com/lightning/r/Case/500EE00001DVqC6YAL/view

./bin/run.js create -c Salesforce.SF_Off_Core.DeveloperTools.NPM -i 500B0000005YEOkIAO -o [the tooling release user] --location https://github.com/forcedotcom/change-case-management --release change-case-management.[some unique identifier, we use usually timestamps in CI]

Then take the resulting ID and close

./bin/run.js check -c S -i [the id] -o [the tooling release user]

there's a real NUT covering how we use this in CI

@W-15845325@

@mshanemc mshanemc requested a review from a team as a code owner May 24, 2024 16:26
@@ -1,43 +1,19 @@
# check.description
# flags.changecaseid.summary
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

messages are moved to file-per-command like our normal pattern

"wireit": "^0.9.5"
"@oclif/plugin-command-snapshot": "^5.1.9",
"@salesforce/cli-plugins-testkit": "^5.3.5",
"@salesforce/dev-scripts": "^9.1.2",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using devScripts removes a lot of devDeps

@@ -25,7 +24,9 @@ export type CheckResult = {
type: string;
};
export default class Check extends SfCommand<CheckResult> {
public static readonly summary = messages.getMessage('check.description');
public static readonly deprecated = true;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't use this command

}

this.log(`Release ${closeResult.results[0].id} set to ${status}.`);
const closeCase = async (status: string, changecaseid: string, conn: Connection): Promise<string[]> => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the new API stops all the implementation steps as part of close endpoint

src/commands/close.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@iowillhoit iowillhoit merged commit 736242b into main May 24, 2024
9 checks passed
@iowillhoit iowillhoit deleted the sm/api-v2-check branch May 24, 2024 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants