Skip to content

Commit

Permalink
add git config
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardfoyle committed Apr 2, 2024
1 parent 857ba89 commit 730bc30
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/components/git_commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,12 @@ export const getTagsAtCommit = async (commitHash: string) => {
const { stdout: tagsString } = await $`git tag --points-at ${commitHash}`;
return tagsString.split(EOL).filter((line) => line.trim().length > 0);
};

/**
* Configure the git user email and name
*/
export const configure = async () => {
// eslint-disable-next-line spellcheck/spell-checker
await $`git config user.email "github-actions[bot]@users.noreply.github.com"`;
await $`git config user.name "github-actions[bot]"`;
};
3 changes: 3 additions & 0 deletions scripts/deprecate_release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { EOL } from 'os';
import { parseArgs } from 'util';
import {
commitAllChanges,
configure,
getTagsAtCommit,
isCleanWorkingTree,
push,
Expand Down Expand Up @@ -140,6 +141,8 @@ const distTag = distTagMatch?.groups?.distTag ?? 'latest';

const prBranch = `restore_release/${previousReleaseCommitHash}`;

await configure();

await switchToBranch(prBranch);

// using checkout instead of restore because we want to restore this directory but not remove files that have been added since
Expand Down

0 comments on commit 730bc30

Please sign in to comment.