New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@minkimcello/georgia

Package Overview
Dependencies
Maintainers
1
Versions
325
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@minkimcello/georgia - npm Package Compare versions

Comparing version 1.9.4-9238d1f to 1.9.4-93690ff

2

package.json
{
"name": "@minkimcello/georgia",
"version": "1.9.4-9238d1f",
"version": "1.9.4-93690ff",
"author": {

@@ -5,0 +5,0 @@ "name": "Min Kim",

# When PR is Created
## Actions
1. **\*NEW*** `georgia/sha-version` generates new package version using SHA. *(Updates below in Notes)*
- Click [here](https://github.com/taras/georgia/tree/release-1.0.0/.github/actions/sha-version) to see how the action works.
- Click [here](https://github.com/minkimcello/shamalamadingdong.git) to see how the action works.

@@ -10,3 +10,3 @@ 2. `actions/npm` to publish

## Notes
## Updates
### sha-version

@@ -17,7 +17,15 @@ - `checkout` with ref arg, `head_ref` to ensure we get the latest commit of pull request.

- Issues:
- If multiple commits are pushed too close to each other, the publishing/commenting is done on the latest commit which is okay except it causes an error for trying to publish the same thing multiple times.
- `GITHUB_SHA` is the commit that triggers the workflow but it doesn't correlate with any of the commits in the PR.
- `git log`ing will always return the latest.
# When PR is Merged
## Actions
1. **\*NEW*** `georgia/filter-by-commit` to prevent the workflow from running if commit message matches the argument of this action. We're passing in `skip-action` to accommodate the auto-commit's message.
- Click [here](https://github.com/taras/georgia/tree/release-1.0.0/.github/actions/filter-by-commit) to see how the action works.
~~1. **\*NEW*** `georgia/filter-by-commit` to prevent the workflow from running if commit message matches the argument of this action. We're passing in `skip-action` to accommodate the auto-commit's message.
- Click [here](https://github.com/taras/georgia/tree/release-1.0.0/.github/actions/filter-by-commit) to see how the action works.~~
1. `actions/bin/filter` to run workflow on PRs that are merged.
- This whole workflow only runs when a PR is closed.
2. **\*NEW*** `georgia/fetch-pr-labels` retrieves and exports labels of the most recently-merged PR as an output to be accessible elsewhere in the workflow.

@@ -36,3 +44,17 @@ - Click [here](https://github.com/minkimcello/js-action) to see how the action works.

## Updates
### actions/bin/filter
- prevents non-merged closed PRs from running this workflow
### fetch-pr-labels
- now that the workflow runs on the PR itself, we can retrieve the labels using the PR number from the context to ensure accuracy
### commit and push
- no longer need to fetch and updated branch to use BASE_REF.
### publishing
- had to be kept in this workflow because commits that are triggered from the workflow does not trigger another workflow. this used to happen before but does not happen anymore. might be a quiet update.
## Notes
By creating our own actions, we've made this workflow much more modular and re-usable.

@@ -43,59 +65,64 @@

```yaml
publish:
name: Commit & Publish
runs-on: ubuntu-latest
needs: tests
steps:
- uses: actions/checkout@v1
- name: Commit & Publish
run: |
if [[ "$(git log -1 --pretty=%B)" =~ "[ci skip]" ]]
then
echo Skipping because this commit is automated
else
# git setup
git remote set-url origin https://${GITHUB_TOKEN}:x-oauth-basic@github.com/${GITHUB_REPOSITORY}.git
git fetch origin +refs/heads/*:refs/heads/*
branch=$(printf "%s\n" "${GITHUB_REF#*refs\/heads\/}")
git checkout $branch
if [ "${#SEMVER_USER_NAME}" -ne "0" -a "${#SEMVER_USER_EMAIL}" -ne "0" ]
then
git_config_email=$SEMVER_USER_NAME
git_config_name=$SEMVER_USER_EMAIL
on:
push:
branches:
- release-*
jobs:
publish:
name: Commit & Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Commit & Publish
run: |
if [[ "$(git log -1 --pretty=%B)" =~ "[ci skip]" ]]
then
echo Skipping because this commit is automated
else
git_config_email="`node -e \"console.log(require('./package.json').author.email)\"`"
git_config_name="`node -e \"console.log(require('./package.json').author.name)\"`"
fi
git config user.email $git_config_email
git config user.name $git_config_name
# install hub
wget https://github.com/github/hub/releases/download/v2.12.3/hub-linux-amd64-2.12.3.tgz
tar -zxvf hub-linux-amd64-2.12.3.tgz
cd hub-linux-amd64-2.12.3
sudo ./install && cd ..
labels=$(hub pr list -s merged -L 1 -f %L)
# use labels to decide how to increment and publish
if [[ "$labels" =~ "major" ]]
then
echo Skipping because major release should be published manually
else
if [[ "$labels" =~ "minor" ]]
# git setup
git remote set-url origin https://${GITHUB_TOKEN}:x-oauth-basic@github.com/${GITHUB_REPOSITORY}.git
git fetch origin +refs/heads/*:refs/heads/*
branch=$(printf "%s\n" "${GITHUB_REF#*refs\/heads\/}")
git checkout $branch
if [ "${#SEMVER_USER_NAME}" -ne "0" -a "${#SEMVER_USER_EMAIL}" -ne "0" ]
then
npm version minor --no-git-tag-version
git_config_email=$SEMVER_USER_NAME
git_config_name=$SEMVER_USER_EMAIL
else
npm version patch --no-git-tag-version
git_config_email="`node -e \"console.log(require('./package.json').author.email)\"`"
git_config_name="`node -e \"console.log(require('./package.json').author.name)\"`"
fi
git add package.json
current="`node -e \"console.log(require('./package.json').version)\"`"
git commit -m "Release version $current [ci skip]"
git push origin HEAD
echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > ~/.npmrc
npm publish --access=public
git config user.email $git_config_email
git config user.name $git_config_name
# install hub
wget https://github.com/github/hub/releases/download/v2.12.3/hub-linux-amd64-2.12.3.tgz
tar -zxvf hub-linux-amd64-2.12.3.tgz
cd hub-linux-amd64-2.12.3
sudo ./install && cd ..
labels=$(hub pr list -s merged -L 1 -f %L)
# use labels to decide how to increment and publish
if [[ "$labels" =~ "major" ]]
then
echo Skipping because major release should be published manually
else
if [[ "$labels" =~ "minor" ]]
then
npm version minor --no-git-tag-version
else
npm version patch --no-git-tag-version
fi
git add package.json
current="`node -e \"console.log(require('./package.json').version)\"`"
git commit -m "Release version $current [ci skip]"
git push origin HEAD
echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" > ~/.npmrc
npm publish --access=public
fi
fi
fi
env:
GITHUB_TOKEN: ${{ secrets.MK_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
SEMVER_USER_NAME: ${{ secrets.SEMVER_USER_NAME }}
SEMVER_USER_EMAIL: ${{ secrets.SEMVER_USER_EMAIL }}
env:
GITHUB_TOKEN: ${{ secrets.MK_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
SEMVER_USER_NAME: ${{ secrets.SEMVER_USER_NAME }}
SEMVER_USER_EMAIL: ${{ secrets.SEMVER_USER_EMAIL }}
```

@@ -105,39 +132,57 @@

```yaml
publish:
name: Commit & Publish
runs-on: ubuntu-latest
needs: tests
steps:
- uses: actions/checkout@v1
- name: Filter by Commit Message
uses: taras/georgia/.github/actions/filter-by-commit@release-1.0.0
with:
filter: skip-actions
on:
pull_request:
branches:
- release-*
types:
- closed
- name: list labels of last merged pr
uses: minkimcello/js-action@master
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: npm version using label variable set from previous step
uses: actions/npm@master
with:
args: version $NPM_VERSION --no-git-tag-version # see below
jobs:
filter:
name: filter
runs-on: ubuntu-latest
steps:
- uses: actions/bin/filter@master
with:
args: "merged true"
- name: commit and push to repo
uses: taras/georgia/.github/actions/git-push@release-1.0.0
with:
add: package.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: publish
uses: actions/npm@master
with:
args: publish --access=public
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
commit:
name: commit
runs-on: ubuntu-latest
needs: filter
steps:
- uses: actions/checkout@v1
with:
ref: ${{ github.head_ref }}
# --no-git-tag-version is necessary to prevent it from triggering a commit
- name: list labels of last merged pr
uses: frontside/label-retriever@master
id: pr-labels
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: filter separately (beta)
uses: frontside/label-sorter@master
id: filter-labels
with:
LABELS: ${{ steps.pr-labels.outputs.labels }}
- name: npm version using label variable
uses: actions/npm@master
with:
args: version $NPM_VERSION --no-git-tag-version
- name: commit and push to repo
uses: frontside/git-push@master
with:
add: package.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: publish
uses: actions/npm@master
with:
args: publish --access=public
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
```

@@ -150,5 +195,4 @@

2. customize test procedures in the two workflows (temporary solution)
2. customize test procedures in the two workflows
3. copy/paste the two workflow files.
- all the actions are called from the repo and not locally so they should work as-is.
3. copy/paste the two workflow files.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc