Skip to content

Commit 80be479

Browse files
authored
Merge pull request #225 from contentstack/staging
Staging to Master merge
2 parents 48869fc + 73ab53e commit 80be479

File tree

7 files changed

+348
-367
lines changed

7 files changed

+348
-367
lines changed

.github/workflows/check-branch.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'Check Branch'
1+
name: "Check Branch"
22

33
on:
44
pull_request:
@@ -8,13 +8,13 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Comment PR
11-
if: github.base_ref == 'master' && github.head_ref != 'next'
11+
if: github.base_ref == 'master' && github.head_ref != 'staging'
1212
uses: thollander/actions-comment-pull-request@v2
1313
with:
1414
message: |
15-
We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the next branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch.
15+
We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the staging branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch.
1616
- name: Check branch
17-
if: github.base_ref == 'master' && github.head_ref != 'next'
17+
if: github.base_ref == 'master' && github.head_ref != 'staging'
1818
run: |
19-
echo "ERROR: We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the next branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch."
19+
echo "ERROR: We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the staging branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch."
2020
exit 1

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ tap-html.html
1212
coverage
1313
.env
1414
.dccache
15-
dist/*
15+
dist/*
16+
*.log

README.md

+21-20
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,14 @@ To get a single entry, you need to specify the content type as well as the ID of
136136
```javascript
137137
const Query = Stack.ContentType('blog').Entry("<entry_uid>");
138138

139-
Query.fetch()
140-
.then(function success(entry) {
141-
console.log(entry.get('title')); // Retrieve field value by providing a field's uid
142-
console.log(entry.toJSON()); // Convert the entry result object to JSON
143-
}, function error(err) {
144-
// err object
145-
})
139+
Query
140+
.toJSON()
141+
.fetch()
142+
.then(function success(entry) {
143+
console.log(entry.get('title')); // Retrieve field value by providing a field's uid
144+
}, function error(err) {
145+
// err object
146+
})
146147
```
147148

148149
To retrieve multiple entries of a content type, you need to specify the content type uid. You can also specify search parameters to filter results.
@@ -151,19 +152,19 @@ To retrieve multiple entries of a content type, you need to specify the content
151152
const Query = Stack.ContentType('blog').Query();
152153

153154
Query
154-
.where("title", "welcome")
155-
.includeContentType()
156-
.includeCount()
157-
.toJSON()
158-
.find()
159-
.then(function success(result) {
160-
// result is array where -
161-
// result[0] =&gt; entry objects
162-
// result[result.length-1] =&gt; entry objects count included only when .includeCount() is queried.
163-
// result[1] =&gt; schema of the content type is included when .includeContentType() is queried.
164-
}, function error(err) {
165-
// err object
166-
})
155+
.where("title", "welcome")
156+
.includeContentType()
157+
.includeCount()
158+
.toJSON()
159+
.find()
160+
.then(function success(result) {
161+
// result is array where -
162+
// result[0] =&gt; entry objects
163+
// result[result.length-1] =&gt; entry objects count included only when .includeCount() is queried.
164+
// result[1] =&gt; schema of the content type is included when .includeContentType() is queried.
165+
}, function error(err) {
166+
// err object
167+
})
167168
```
168169

169170
#### Cache Policies

0 commit comments

Comments
 (0)