Skip to content

Commit

Permalink
[command] npm run release
Browse files Browse the repository at this point in the history
  • Loading branch information
8398a7 committed Nov 22, 2021
2 parents b17d9de + 538f8cb commit c9ff874
Show file tree
Hide file tree
Showing 12 changed files with 7,767 additions and 12 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16.13.0
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm install
- run: npm ci
- run: npm run all
env:
GITHUB_TOKEN: ${{ github.token }}
Expand All @@ -30,6 +33,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v2
with:
node-version: 16.13.0
- uses: actions/cache@v2
with:
path: ~/.npm
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/uncommitted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm ci
- uses: actions/setup-node@v2
with:
node-version: 16.13.0
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm install
- run: npm ci
- run: npm run release
- name: check for uncommitted changes
run: |
Expand Down
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16.13.0
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,13 @@ steps:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: always()
```
## Require Permissions
If you are explicitly specifying permissions, must grant `contents` and `actions`.

```yaml
permissions:
contents: read
actions: read
```
2 changes: 1 addition & 1 deletion __tests__/fixtures/repos.commits.get.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@
"patch": "@@ -29,7 +29,7 @@\n....."
}
]
}
}
2 changes: 1 addition & 1 deletion __tests__/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export const pullRequest = (): Field => {
let value;
if (context.eventName.startsWith('pull_request')) {
value =
'<https://github.com/8398a7/action-slack/pull/123|Add pullRequest field #123>';
'<https://github.com/8398a7/action-slack/pull/123|Add pullRequest field &amp; escaping &lt;, &gt; #123>';
} else {
value = 'n/a';
}
Expand Down
4 changes: 2 additions & 2 deletions __tests__/pull_request.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe.each`
github.context.payload = {
pull_request: {
html_url: 'https://github.com/8398a7/action-slack/pull/123',
title: 'Add pullRequest field',
title: 'Add pullRequest field & escaping <, >',
number: 123,
head: { sha },
},
Expand All @@ -90,7 +90,7 @@ describe.each`
payload.attachments[0].color = 'good';
expect(await client.prepare(msg)).toStrictEqual(payload);
expect(process.env.AS_PULL_REQUEST).toStrictEqual(
'<https://github.com/8398a7/action-slack/pull/123|Add pullRequest field #123>',
'<https://github.com/8398a7/action-slack/pull/123|Add pullRequest field &amp; escaping &lt;, &gt; #123>',
);
});
});
4 changes: 2 additions & 2 deletions dist/index.js

Large diffs are not rendered by default.

Loading

0 comments on commit c9ff874

Please sign in to comment.