Skip to content

Commit 757f1b7

Browse files
ktootsGitHub Enterprise
authored andcommitted
FRIDGE-469 Change default branch naming (#391)
1 parent 3d2653f commit 757f1b7

File tree

3 files changed

+79
-65
lines changed

3 files changed

+79
-65
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: build
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request:
88
branches:
9-
- master
9+
- main
1010

1111
jobs:
1212
build:

.github/workflows/release.yml

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

3-
on:
3+
on:
44
workflow_dispatch:
55
inputs:
66
releaseVersion:
7-
description: 'Release Version'
7+
description: "Release Version"
88
required: true
99
developmentVersion:
10-
description: 'Next Development Version'
10+
description: "Next Development Version"
1111
required: true
12-
12+
1313
jobs:
1414
release:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@master
17+
- uses: actions/checkout@main
1818
- uses: actions/setup-node@v1
1919
with:
2020
node-version: 12.x
21-
registry-url: 'https://registry.npmjs.org'
22-
- name : Bump to release version
21+
registry-url: "https://registry.npmjs.org"
22+
- name: Bump to release version
2323
run: |
2424
git config user.name flexrouting+ci
2525
git config user.email flexrouting+ci@twilio.com
@@ -32,15 +32,15 @@ jobs:
3232
git add -f dist
3333
git commit -m "${{ github.event.inputs.releaseVersion }}"
3434
git tag ${{ github.event.inputs.releaseVersion }}
35-
git push origin HEAD:master --tags
35+
git push origin HEAD:main --tags
3636
git checkout -B gh-pages
3737
find . -mindepth 1 -maxdepth 1 \( -name .gitignore -o -name node_modules -o -name dist -o -name .git \) -prune -o -exec rm -rf {} +
3838
mv dist/docs/* .
3939
rm -rf dist
4040
git add .
4141
git commit -am "${{ github.event.inputs.releaseVersion }}"
4242
git push origin gh-pages --force
43-
git checkout master
43+
git checkout main
4444
yarn publish --new-version "${{ github.event.inputs.releaseVersion }}"
4545
env:
4646
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
@@ -49,7 +49,7 @@ jobs:
4949
runs-on: ubuntu-latest
5050
needs: [release]
5151
steps:
52-
- uses: actions/checkout@master
52+
- uses: actions/checkout@main
5353
- uses: actions/setup-node@v1
5454
with:
5555
node-version: 12.x
@@ -58,10 +58,10 @@ jobs:
5858
run: |
5959
git config user.name flexrouting+ci
6060
git config user.email flexrouting+ci@twilio.com
61-
git pull origin HEAD:master
61+
git pull origin HEAD:main
6262
yarn version --new-version "${{ github.event.inputs.developmentVersion }}" --no-git-tag-version
63-
git pull origin HEAD:master
63+
git pull origin HEAD:main
6464
git add .
6565
git rm -rf dist
6666
git commit -m "${{ github.event.inputs.developmentVersion }}"
67-
git push origin HEAD:master --force
67+
git push origin HEAD:main --force

README.md

Lines changed: 64 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -10,84 +10,99 @@ TaskRouter is Twilio's skills based routing system. With this library, you can m
1010

1111
This version of TaskRouter SDK can be used with Twilio Flex and TaskRouter standalone instances.
1212

13-
Installation
14-
------------
13+
## Installation
1514

1615
### NPM
1716

1817
```
1918
npm install twilio-taskrouter
2019
```
2120

22-
Usage
23-
-----
21+
## Usage
2422

2523
The following is a simple example showing a Worker waiting for Reservations.
2624
For more information, refer to the
2725
[API Docs](//twilio.github.io/twilio-taskrouter.js/index.html).
2826

2927
```js
30-
const TaskRouter = require('twilio-taskrouter');
31-
const Twilio = require('twilio');
28+
const TaskRouter = require("twilio-taskrouter");
29+
const Twilio = require("twilio");
3230
const AccessToken = Twilio.jwt.AccessToken;
3331
const TaskRouterGrant = AccessToken.TaskRouterGrant;
3432

35-
const accountSid = '';
36-
const signingKeySid = '';
37-
const signingKeySecret = '';
38-
const workspaceSid = '';
39-
const workerSid = '';
40-
41-
const token = createAccessToken(accountSid, signingKeySid, signingKeySecret, workspaceSid, workerSid);
33+
const accountSid = "";
34+
const signingKeySid = "";
35+
const signingKeySecret = "";
36+
const workspaceSid = "";
37+
const workerSid = "";
38+
39+
const token = createAccessToken(
40+
accountSid,
41+
signingKeySid,
42+
signingKeySecret,
43+
workspaceSid,
44+
workerSid
45+
);
4246
const alice = new TaskRouter.Worker(token);
4347

44-
alice.on('ready', readyAlice => {
45-
console.log(`Worker ${readyAlice.sid} is now ready for work`);
48+
alice.on("ready", (readyAlice) => {
49+
console.log(`Worker ${readyAlice.sid} is now ready for work`);
4650
});
4751

48-
alice.on('reservationCreated', reservation => {
49-
console.log(`Reservation ${reservation.sid} has been created for ${alice.sid}`);
50-
console.log(`Task attributes are: ${reservation.task.attributes}`);
52+
alice.on("reservationCreated", (reservation) => {
53+
console.log(
54+
`Reservation ${reservation.sid} has been created for ${alice.sid}`
55+
);
56+
console.log(`Task attributes are: ${reservation.task.attributes}`);
5157

52-
reservation.on('accepted', acceptedReservation => {
53-
console.log(`Reservation ${acceptedReservation.sid} was accepted.`);
54-
});
58+
reservation.on("accepted", (acceptedReservation) => {
59+
console.log(`Reservation ${acceptedReservation.sid} was accepted.`);
60+
});
5561

56-
reservation.accept().then(acceptedReservation => {
62+
reservation
63+
.accept()
64+
.then((acceptedReservation) => {
5765
console.log(`Reservation status is ${acceptedReservation.status}`);
58-
}).catch((err) => {
66+
})
67+
.catch((err) => {
5968
console.log(`Error: ${err}`);
6069
});
6170
});
6271

63-
function createAccessToken(accountSid, signingKeySid, signingKeySecret, workspaceSid, workerSid) {
64-
const taskRouterGrant = new TaskRouterGrant({
65-
workerSid: workerSid,
66-
workspaceSid: workspaceSid,
67-
role: 'worker'
68-
});
69-
70-
const accessToken = new AccessToken(accountSid, signingKeySid, signingKeySecret);
71-
accessToken.addGrant(taskRouterGrant);
72-
accessToken.identity = 'alice';
73-
74-
return accessToken.toJwt();
72+
function createAccessToken(
73+
accountSid,
74+
signingKeySid,
75+
signingKeySecret,
76+
workspaceSid,
77+
workerSid
78+
) {
79+
const taskRouterGrant = new TaskRouterGrant({
80+
workerSid: workerSid,
81+
workspaceSid: workspaceSid,
82+
role: "worker",
83+
});
84+
85+
const accessToken = new AccessToken(
86+
accountSid,
87+
signingKeySid,
88+
signingKeySecret
89+
);
90+
accessToken.addGrant(taskRouterGrant);
91+
accessToken.identity = "alice";
92+
93+
return accessToken.toJwt();
7594
}
76-
7795
```
7896

79-
Changelog
80-
---------
97+
## Changelog
8198

82-
See [CHANGELOG.md](https://github.com/twilio/twilio-taskrouter.js/blob/master/CHANGELOG.md).
99+
See [CHANGELOG.md](https://github.com/twilio/twilio-taskrouter.js/blob/main/CHANGELOG.md).
83100

84-
License
85-
-------
101+
## License
86102

87-
See [LICENSE.md](https://github.com/twilio/twilio-taskrouter.js/blob/master/LICENSE.md).
103+
See [LICENSE.md](https://github.com/twilio/twilio-taskrouter.js/blob/main/LICENSE.md).
88104

89-
Building
90-
--------
105+
## Building
91106

92107
Fork and clone the repository. Use npm to install node 8 (other versions may run into problems).
93108

@@ -111,19 +126,18 @@ Before commits, be sure to validate by running:
111126
make lint
112127
```
113128

114-
Testing
115-
------------
129+
## Testing
130+
116131
- Create a twilio account
117132
- copy ./test/integration_test_setup/.env.example to ./test/integration_test_setup/.env
118133
- set ACCOUNT_SID, AUTH_TOKEN, SIGNING_KEY_SID, SIGNING_KEY_SECRET
119134
- Run ./test/integration_test_setup/RunIntegrationTestLocal.sh this will create everything needed for running E2E tests and run the tests
120135

121-
Test with Sample App
122-
------------
136+
## Test with Sample App
137+
123138
- See [README.md](sample-app/README.md)
124139

125-
Contributing
126-
------------
140+
## Contributing
127141

128142
Bug fixes welcome! If you're not familiar with the GitHub pull
129143
request/contribution process, [this is a nice tutorial](https://gun.io/blog/how-to-github-fork-branch-and-pull-request/).

0 commit comments

Comments
 (0)