Compare commits

...
7 Commits
Author SHA1 Message Date
github-actions[bot] 6f58fe53ba v1.1.0 2022-01-07 15:43:11 +00:00
github-actions[bot]andgithub-actions[bot] f4afbea27e Version Packages (#129)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-01-07 16:41:51 +01:00
Jack LeslieandMitchell Hamilton d3db9eceaf Added setupGitUser option to enable or disable setting up a default git user (#131)
* custom git user option

* Create two-dolls-promise.md

* Update two-dolls-promise.md

* change input name and update default

* Update .changeset/two-dolls-promise.md

Co-authored-by: Mitchell Hamilton <mitchell@hamil.town>
2022-01-07 15:27:29 +01:00
Mateusz Burzyński e0c51a52b8 Fix changeset author attribution 2021-12-23 11:31:32 +01:00
Mateusz BurzyńskiandDhruvdutt Jadhav 19373036c4 Setup the git user in the local config instead of the global one (#128)
* Update gitUtils.ts

* add changeset

Co-authored-by: Dhruvdutt Jadhav <dhruvdutt.jadhav@razorpay.com>
2021-12-23 11:21:40 +01:00
Mateusz Burzyński 37c2edd85b Fixed the checkout repo step in ci.yml 2021-11-26 14:18:16 +01:00
Mitchell Hamilton 5556dd0a57 Reference specific versions of other actions (#122) 2021-11-26 10:23:11 +01:00
9 changed files with 1206 additions and 17 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ jobs:
steps: steps:
- name: Checkout Repo - name: Checkout Repo
- uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Use Node.js 14 - name: Use Node.js 14
uses: actions/setup-node@v1 uses: actions/setup-node@v1
+8
View File
@@ -1,5 +1,13 @@
# @changesets/action # @changesets/action
## 1.1.0
### Minor Changes
- [#128](https://github.com/changesets/action/pull/128) [`1937303`](https://github.com/changesets/action/commit/19373036c4bad4b0183344b6f2623a3b0e42da6c) Thanks [@dhruvdutt](https://github.com/dhruvdutt)! - Setup the git user in the local config instead of the global one.
* [#131](https://github.com/changesets/action/pull/131) [`d3db9ec`](https://github.com/changesets/action/commit/d3db9eceaf41d42c56d5370d504c86851627188f) Thanks [@jacklesliewise](https://github.com/jacklesliewise)! - Added `setupGitUser` option to enable or disable setting up a default git user
## 1.0.0 ## 1.0.0
### Major Changes ### Major Changes
+7 -6
View File
@@ -10,6 +10,7 @@ This action for [Changesets](https://github.com/atlassian/changesets) creates a
- version - The command to update version, edit CHANGELOG, read and delete changesets. Default to `changeset version` if not provided - version - The command to update version, edit CHANGELOG, read and delete changesets. Default to `changeset version` if not provided
- commit - The commit message to use. Default to `Version Packages` - commit - The commit message to use. Default to `Version Packages`
- title - The pull request title. Default to `Version Packages` - title - The pull request title. Default to `Version Packages`
- setupGitUser - Sets up the git user for commits as `"github-actions[bot]"`. Default to `true`
### Outputs ### Outputs
@@ -36,13 +37,13 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Repo - name: Checkout Repo
uses: actions/checkout@master uses: actions/checkout@v2
with: with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0 fetch-depth: 0
- name: Setup Node.js 12.x - name: Setup Node.js 12.x
uses: actions/setup-node@master uses: actions/setup-node@v2
with: with:
node-version: 12.x node-version: 12.x
@@ -73,13 +74,13 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Repo - name: Checkout Repo
uses: actions/checkout@master uses: actions/checkout@v2
with: with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0 fetch-depth: 0
- name: Setup Node.js 12.x - name: Setup Node.js 12.x
uses: actions/setup-node@master uses: actions/setup-node@v2
with: with:
node-version: 12.x node-version: 12.x
@@ -142,12 +143,12 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Repo - name: Checkout Repo
uses: actions/checkout@master uses: actions/checkout@v2
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup Node.js 12.x - name: Setup Node.js 12.x
uses: actions/setup-node@master uses: actions/setup-node@v2
with: with:
node-version: 12.x node-version: 12.x
+4
View File
@@ -17,6 +17,10 @@ inputs:
title: title:
description: The pull request title. Default to `Version Packages` description: The pull request title. Default to `Version Packages`
required: false required: false
setupGitUser:
description: Sets up the git user for commits as `"github-actions[bot]"`. Default to `true`
required: false
default: true
outputs: outputs:
published: published:
description: A boolean value to indicate whether a publishing is happened or not description: A boolean value to indicate whether a publishing is happened or not
+1165
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@changesets/action", "name": "@changesets/action",
"version": "1.0.0", "version": "1.1.0",
"main": "dist/index.js", "main": "dist/index.js",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
@@ -21,7 +21,7 @@
"release": "node ./scripts/release.js" "release": "node ./scripts/release.js"
}, },
"dependencies": { "dependencies": {
"@actions/core": "^1.2.4", "@actions/core": "^1.3.0",
"@actions/exec": "^1.1.0", "@actions/exec": "^1.1.0",
"@actions/github": "^4.0.0", "@actions/github": "^4.0.0",
"@babel/core": "^7.13.10", "@babel/core": "^7.13.10",
-2
View File
@@ -4,13 +4,11 @@ import { execWithOutput } from "./utils";
export const setupUser = async () => { export const setupUser = async () => {
await exec("git", [ await exec("git", [
"config", "config",
"--global",
"user.name", "user.name",
`"github-actions[bot]"`, `"github-actions[bot]"`,
]); ]);
await exec("git", [ await exec("git", [
"config", "config",
"--global",
"user.email", "user.email",
`"github-actions[bot]@users.noreply.github.com"`, `"github-actions[bot]@users.noreply.github.com"`,
]); ]);
+6 -2
View File
@@ -14,8 +14,12 @@ const getOptionalInput = (name: string) => core.getInput(name) || undefined;
return; return;
} }
console.log("setting git user"); let setupGitUser = core.getBooleanInput('setupGitUser');
await gitUtils.setupUser();
if (setupGitUser) {
console.log("setting git user");
await gitUtils.setupUser();
}
console.log("setting GitHub credentials"); console.log("setting GitHub credentials");
await fs.writeFile( await fs.writeFile(
+13 -4
View File
@@ -2,10 +2,12 @@
# yarn lockfile v1 # yarn lockfile v1
"@actions/core@^1.2.4": "@actions/core@^1.3.0":
version "1.2.4" version "1.6.0"
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.2.4.tgz#96179dbf9f8d951dd74b40a0dbd5c22555d186ab" resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.6.0.tgz#0568e47039bfb6a9170393a73f3b7eb3b22462cb"
integrity sha512-YJCEq8BE3CdN8+7HPZ/4DxJjk/OkZV2FFIf+DlZTC/4iBlzYCD5yjRR6eiOS5llO11zbRltIRuKAjMKaWTE6cg== integrity sha512-NB1UAZomZlCV/LmJqkLhNTqtKfFXJZAUPcfl/zqG7EfsQdeUJtaWO98SGbuQ3pydJ3fHl2CvI/51OKYlCYYcaw==
dependencies:
"@actions/http-client" "^1.0.11"
"@actions/exec@^1.1.0": "@actions/exec@^1.1.0":
version "1.1.0" version "1.1.0"
@@ -24,6 +26,13 @@
"@octokit/plugin-paginate-rest" "^2.2.3" "@octokit/plugin-paginate-rest" "^2.2.3"
"@octokit/plugin-rest-endpoint-methods" "^4.0.0" "@octokit/plugin-rest-endpoint-methods" "^4.0.0"
"@actions/http-client@^1.0.11":
version "1.0.11"
resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-1.0.11.tgz#c58b12e9aa8b159ee39e7dd6cbd0e91d905633c0"
integrity sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==
dependencies:
tunnel "0.0.6"
"@actions/http-client@^1.0.8": "@actions/http-client@^1.0.8":
version "1.0.8" version "1.0.8"
resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-1.0.8.tgz#8bd76e8eca89dc8bcf619aa128eba85f7a39af45" resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-1.0.8.tgz#8bd76e8eca89dc8bcf619aa128eba85f7a39af45"