Skip to content

Commit f7d5b61

Browse files
author
Dhwaneet Bhatt
authored
Merge pull request #60 from postmanlabs/release/v1.6.0
Release version v1.6.0
2 parents 218d7d9 + 695afe7 commit f7d5b61

File tree

9 files changed

+3547
-109
lines changed

9 files changed

+3547
-109
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Draft new release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: The version you want to release. Must be a valid semver version.
8+
required: true
9+
type: string
10+
11+
jobs:
12+
draft-new-release:
13+
if: startsWith(github.event.inputs.version, 'v')
14+
name: Draft a new release
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: write
18+
pull-requests: write
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v3
23+
24+
- name: Create release branch
25+
run: git checkout -b release/${{ github.event.inputs.version }}
26+
27+
- name: Update changelog
28+
uses: thomaseizinger/[email protected]
29+
with:
30+
version: ${{ github.event.inputs.version }}
31+
32+
- name: Initialize mandatory git config
33+
run: |
34+
git config user.name "GitHub Actions"
35+
git config user.email [email protected]
36+
37+
- name: Bump version
38+
run: npm version ${{ github.event.inputs.version }} --git-tag-version false
39+
40+
- name: Commit changelog and manifest files
41+
id: make-commit
42+
run: |
43+
git add CHANGELOG.md package.json package-lock.json
44+
git commit --message "Prepare release ${{ github.event.inputs.version }}"
45+
echo "::set-output name=commit::$(git rev-parse HEAD)"
46+
47+
- name: Push new branch
48+
run: git push origin release/${{ github.event.inputs.version }}
49+
50+
- name: Create pull request for master
51+
uses: thomaseizinger/[email protected]
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
with:
55+
head: release/${{ github.event.inputs.version }}
56+
base: master
57+
title: "Release version ${{ github.event.inputs.version }}"
58+
reviewers: ${{ github.actor }}
59+
body: |
60+
Hi @${{ github.actor }}!
61+
62+
This PR was created in response to a manual trigger of the release workflow here: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}.
63+
I've updated the changelog and bumped the versions in the manifest files in this commit: ${{ steps.make-commit.outputs.commit }}.
64+
65+
- name: Create pull request for develop
66+
uses: thomaseizinger/[email protected]
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
with:
70+
head: release/${{ github.event.inputs.version }}
71+
base: develop
72+
title: "Release version ${{ github.event.inputs.version }}"
73+
reviewers: ${{ github.actor }}
74+
body: |
75+
Hi @${{ github.actor }}!
76+
77+
This PR was created in response to a manual trigger of the release workflow here: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}.
78+
I've updated the changelog and bumped the versions in the manifest files in this commit: ${{ steps.make-commit.outputs.commit }}.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "Publish new release"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
types:
8+
- closed
9+
10+
jobs:
11+
release:
12+
name: Publish new release
13+
runs-on: ubuntu-latest
14+
# only merged pull requests that begin with 'release/' or 'hotfix/' must trigger this job
15+
if: github.event.pull_request.merged == true &&
16+
(contains(github.event.pull_request.head.ref, 'release/') || contains(github.event.pull_request.head.ref, 'hotfix/'))
17+
permissions:
18+
contents: write
19+
20+
steps:
21+
- name: Extract version from branch name (for release branches)
22+
if: contains(github.event.pull_request.head.ref, 'release/')
23+
run: |
24+
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
25+
VERSION=${BRANCH_NAME#release/}
26+
27+
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
28+
29+
- name: Extract version from branch name (for hotfix branches)
30+
if: contains(github.event.pull_request.head.ref, 'hotfix/')
31+
run: |
32+
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
33+
VERSION=${BRANCH_NAME#hotfix/}
34+
35+
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
36+
37+
- name: Create Release
38+
uses: thomaseizinger/[email protected]
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
with:
42+
target_commitish: ${{ github.event.pull_request.merge_commit_sha }}
43+
tag_name: ${{ env.RELEASE_VERSION }}
44+
name: ${{ env.RELEASE_VERSION }}
45+
draft: false
46+
prerelease: false

.github/workflows/test.yaml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
name: Test
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches: [develop, master]
6+
pull_request:
47

58
jobs:
69
Unit-Tests:
7-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
node-version: [12.x, 16.x, 18.x]
814
steps:
915
- name: Get Code
1016
uses: actions/checkout@v3
11-
- name: Setup Node JS
12-
uses: actions/setup-node@v1
17+
- name: Use Node.js ${{ matrix.node-version }}
18+
uses: actions/setup-node@v3
1319
with:
14-
node-version: '12.x'
15-
- name: Install dependencies
16-
run: npm install
17-
- name: Run tests
18-
run: npm run test
20+
node-version: ${{ matrix.node-version }}
21+
- run: npm ci
22+
- run: npm test

CHANGELOG.md

Lines changed: 74 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,110 @@
11
# cURL to Postman Importer Changelog
22

3-
#### v1.5.0 (March 31, 2023)
4-
* Fixed an issue where request generation failed for certain bash operators.
5-
* Fixed an issue where cURL with comments described was converted incorrectly.
3+
## [Unreleased]
4+
5+
## [v1.6.0] - 2023-04-17
6+
7+
### Added
8+
9+
- Add url validation in validate and convert functions
10+
- GitHub Actions for Release management.
11+
12+
### Changed
13+
14+
- Bumped up minimum Node version to 12.
15+
- Unit tests now run on Node versions 12, 16 and 18.
16+
17+
## [v1.5.0] - 2023-03-31
18+
19+
- Fixed an issue where request generation failed for certain bash operators.
20+
- Fixed an issue where cURL with comments described was converted incorrectly.
21+
22+
## Previous Releases
23+
24+
Newer releases follow the [Keep a Changelog](https://keepachangelog.com) format.
625

726
#### v1.4.0 (March 17, 2023)
8-
* Fixed issue [#7895](https://github.com/postmanlabs/postman-app-support/issues/7895) where cURL with no specific method defined for formdata type of body were not converted correctly.
27+
28+
- Fixed issue [#7895](https://github.com/postmanlabs/postman-app-support/issues/7895) where cURL with no specific method defined for formdata type of body were not converted correctly.
929

1030
#### v1.3.0 (March 02, 2023)
11-
* Fix for [#8087](https://github.com/postmanlabs/postman-app-support/issues/8087) - Add support to convert digest and NTLM auth types
31+
32+
- Fix for [#8087](https://github.com/postmanlabs/postman-app-support/issues/8087) - Add support to convert digest and NTLM auth types
1233

1334
#### v1.2.0 (February 07, 2023)
14-
* Fix an issue where a correct error is thrown if curl string has invalid args
35+
36+
- Fix an issue where a correct error is thrown if curl string has invalid args
1537

1638
#### v1.1.3 (February 03, 2023)
17-
* Fixed issue [#5182](https://github.com/postmanlabs/postman-app-support/issues/5182) where cURL in Windows cmd formats were not imported correctly.
39+
40+
- Fixed issue [#5182](https://github.com/postmanlabs/postman-app-support/issues/5182) where cURL in Windows cmd formats were not imported correctly.
1841

1942
#### v1.1.2 (January 10, 2023)
20-
* Changed regex to check for prefix space in url with query parameters for given curl string
43+
44+
- Changed regex to check for prefix space in url with query parameters for given curl string
2145

2246
#### v1.1.1 (June 2, 2022)
23-
* Updated how error was handled in case of malformed URL.
47+
48+
- Updated how error was handled in case of malformed URL.
2449

2550
#### v1.1.0 (May 16, 2022)
26-
* Fixes #8433 - non-apostrophed ('...') url with multiple params support in cURL import.
51+
52+
- Fixes #8433 - non-apostrophed ('...') url with multiple params support in cURL import.
2753

2854
#### v1.0.0 (October 18, 2021)
29-
* Fixed issue where file references were not present in imported cURL.◊
30-
* Fixed issue where formdata value were not un-escaped correctly.
31-
* Fixed issue where raw formdata string with boundary were not converted as formdata body.
32-
* Fixed issue where escaped single character sequence were not correctly represented in request body.
33-
* Fixed issue where some characters were not escaped correctly.
34-
* Updated README with installation and use cases and added LICENSE.
35-
* Added script for automating release process.
55+
56+
- Fixed issue where file references were not present in imported cURL.◊
57+
- Fixed issue where formdata value were not un-escaped correctly.
58+
- Fixed issue where raw formdata string with boundary were not converted as formdata body.
59+
- Fixed issue where escaped single character sequence were not correctly represented in request body.
60+
- Fixed issue where some characters were not escaped correctly.
61+
- Updated README with installation and use cases and added LICENSE.
62+
- Added script for automating release process.
3663

3764
#### 0.5.1: Apr 29, 2020
38-
* Added getMetaData function in root exports
65+
66+
- Added getMetaData function in root exports
3967

4068
#### 0.5.0: Apr 29, 2020
41-
* Added a function to get meta data from a curl command.
69+
70+
- Added a function to get meta data from a curl command.
4271

4372
#### 0.4.0: Apr 21, 2020
44-
* Fix for https://github.com/postmanlabs/postman-app-support/issues/8292 - --data-urlencode now successfully imports body
73+
74+
- Fix for <https://github.com/postmanlabs/postman-app-support/issues/8292> - --data-urlencode now successfully imports body
4575

4676
#### 0.3.0: Mar 27, 2020
47-
* Fix for https://github.com/postmanlabs/postman-app-support/issues/7806 - -X argument parses method correcrtly, not interfere with any other args
77+
78+
- Fix for <https://github.com/postmanlabs/postman-app-support/issues/7806> - -X argument parses method correcrtly, not interfere with any other args
4879

4980
#### 0.2.0: Mar 11, 2020
50-
* Fix for https://github.com/postmanlabs/postman-app-support/issues/7895 - --data-raw now successfully imports body
81+
82+
- Fix for <https://github.com/postmanlabs/postman-app-support/issues/7895> - --data-raw now successfully imports body
5183

5284
#### 0.1.0: Nov 22, 2019
53-
* Fix for https://github.com/postmanlabs/postman-app-support/issues/2791 - not escaping single quotes correctly in the cURL commands
54-
* Fix for https://github.com/postmanlabs/postman-app-support/issues/7390 - removing unnecessary options from the cURL commands
85+
86+
- Fix for <https://github.com/postmanlabs/postman-app-support/issues/2791> - not escaping single quotes correctly in the cURL commands
87+
- Fix for <https://github.com/postmanlabs/postman-app-support/issues/7390> - removing unnecessary options from the cURL commands
5588

5689
#### 0.0.5: Sep 3, 2019
57-
* Fix for https://github.com/postmanlabs/curl-to-postman/issues/1 - cURL commands with `$` prepended to arguments not importing correctly
58-
* Fix for https://github.com/postmanlabs/curl-to-postman/issues/2 - the importer was using -X to determine method, not -d or --head
59-
* Fix for https://github.com/postmanlabs/curl-to-postman/issues/4 - Data parameters are added to the URL if the method is determined to be GET, PUT, or HEAD
90+
91+
- Fix for <https://github.com/postmanlabs/curl-to-postman/issues/1> - cURL commands with `$` prepended to arguments not importing correctly
92+
- Fix for <https://github.com/postmanlabs/curl-to-postman/issues/2> - the importer was using -X to determine method, not -d or --head
93+
- Fix for <https://github.com/postmanlabs/curl-to-postman/issues/4> - Data parameters are added to the URL if the method is determined to be GET, PUT, or HEAD
6094

6195
#### 0.0.4: June 5, 2019
62-
* Updated dependency versions
63-
* Updated lockfile for [email protected]
96+
97+
- Updated dependency versions
98+
- Updated lockfile for [email protected]
6499

65100
#### 0.0.3: May 29, 2019
66-
* First public (beta) release
67-
* Conforming to the internal Postman plugin interface
68-
* Fixes for Github issues - 4770,3623,3135,4018,5737,5286, among others
101+
102+
- First public (beta) release
103+
- Conforming to the internal Postman plugin interface
104+
- Fixes for Github issues - 4770,3623,3135,4018,5737,5286, among others
105+
106+
[Unreleased]: https://github.com/postmanlabs/curl-to-postman/compare/v1.6.0...HEAD
107+
108+
[v1.6.0]: https://github.com/postmanlabs/curl-to-postman/compare/v1.5.0...v1.6.0
109+
110+
[v1.5.0]: https://github.com/postmanlabs/curl-to-postman/compare/1.4.0...1.5.0

0 commit comments

Comments
 (0)