-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: repo init + github release (#1)
- Loading branch information
Showing
23 changed files
with
11,416 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/ @ianaya89 @ndom91 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
I hereby confirm that I followed the code guidelines found at [engineering guidelines](https://www.notion.so/checkly/Engineering-Guidelines-a3a165a203a04dc1a112f0e26b2f2d3f) | ||
|
||
## ⚙️ Affected Components | ||
* [ ] Commands | ||
* [ ] Modules | ||
* [ ] Services | ||
* [ ] SDK | ||
|
||
<!-- You can erase any parts of this template not applicable to your Pull Request. --> | ||
### 📝 Notes for the Reviewer | ||
<!-- Anything the reviewer should pay extra attention to. --> | ||
|
||
### 🏗️ New Dependency Submission | ||
<!-- Please explain here why we need the new dependency. --> | ||
|
||
### 🎟 Affected Issue | ||
<!-- | ||
If you write `"Fixes"` or `"Closes"` before the issue link like so: | ||
``` | ||
Fixes #359 | ||
``` | ||
the connected issue will be automatically closed once the PR is merged and help with maintenance of the library 😊 | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
sdk: | ||
- sdk/**/* | ||
|
||
commands: | ||
- src/commands/**/* | ||
|
||
modules: | ||
- src/modules/**/* | ||
|
||
services: | ||
- src/services/**/* | ||
|
||
core: | ||
- src/**/*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Number of days of inactivity before an issue becomes stale | ||
daysUntilStale: 60 | ||
# Number of days of inactivity before a stale issue is closed | ||
daysUntilClose: 7 | ||
# Issues with these labels will never be considered stale | ||
exemptLabels: | ||
- pinned | ||
- security | ||
- priority | ||
- bug | ||
# Label to use when marking an issue as stale | ||
staleLabel: stale | ||
# Comment to post when marking an issue as stale. Set to `false` to disable | ||
markComment: > | ||
Hi there! It looks like this issue hasn't had any activity for a while. | ||
It will be closed if no further activity occurs. If you think your issue | ||
is still relevant, feel free to comment on it to keep it open. | ||
Thanks! | ||
# Comment to post when closing a stale issue. Set to `false` to disable | ||
closeComment: > | ||
Hi there! It looks like this issue hasn't had any activity for a while. | ||
To keep things tidy, I am going to close this issue for now. | ||
If you think your issue is still relevant, just leave a comment | ||
and I will reopen it. | ||
Thanks! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: PR Labeler | ||
|
||
on: | ||
- pull_request_target | ||
|
||
jobs: | ||
triage: | ||
name: Triage | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/labeler@main | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
- 'next' | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Init | ||
uses: actions/checkout@v2 | ||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14.x' | ||
- name: Dependencies | ||
uses: bahmutov/npm-install@v1 | ||
- name: Build | ||
run: npm run build | ||
- name: Run tests | ||
run: npm test | ||
release-branch: | ||
name: Publish branch | ||
runs-on: ubuntu-latest | ||
needs: test | ||
if: ${{ github.event_name == 'push' }} | ||
steps: | ||
- name: Init | ||
uses: actions/checkout@v2 | ||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14.x' | ||
- name: Dependencies | ||
uses: bahmutov/npm-install@v1 | ||
- name: Retrieve information from package.json | ||
uses: myrotvorets/[email protected] | ||
id: ver | ||
- name: Publish to npm and GitHub | ||
run: npx semantic-release@17 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
# Slack FAILURE alert | ||
- name: Slack Failure Notification | ||
if: ${{ failure() }} | ||
uses: rtCamp/action-slack-notify@v2 | ||
env: | ||
SLACK_USERNAME: Checkly Github Bot | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
SLACK_CHANNEL: mac | ||
SLACK_ICON: https://github.com/checkly.png?size=48 | ||
SLACK_COLOR: ${{ job.status }} | ||
SLACK_TITLE: ':red_circle: Create Branch Release Failed' | ||
SLACK_MESSAGE: ${{ steps.ver.outputs.packageName }}@${{ steps.ver.outputs.packageVersion }} by ${{ github.actor }} | ||
SLACK_FOOTER: '' | ||
# Slack SUCCESS alert | ||
- name: Slack Success Notification | ||
if: ${{ success() }} | ||
uses: rtCamp/action-slack-notify@v2 | ||
env: | ||
SLACK_USERNAME: Checkly Github Bot | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
SLACK_CHANNEL: mac | ||
SLACK_ICON: https://github.com/checkly.png?size=48 | ||
SLACK_COLOR: ${{ job.status }} | ||
SLACK_TITLE: ':kebab_parrot: Created Branch Release Succeeded' | ||
SLACK_MESSAGE: ${{ steps.ver.outputs.packageName }}@${{ steps.ver.outputs.packageVersion }} by ${{ github.actor }} | ||
SLACK_FOOTER: '' | ||
release-pr: | ||
name: Publish PR | ||
runs-on: ubuntu-latest | ||
needs: test | ||
if: ${{ github.event_name == 'pull_request' }} | ||
steps: | ||
- name: Init | ||
uses: actions/checkout@v2 | ||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
- name: Dependencies | ||
uses: bahmutov/npm-install@v1 | ||
- name: Retrieve information from package.json | ||
uses: myrotvorets/[email protected] | ||
id: ver | ||
- name: Get short SHA | ||
id: slug | ||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" | ||
- name: Publish to npm | ||
run: | | ||
npm run version:pr | ||
npm publish --tag canary | ||
env: | ||
CHECKLY_API_KEY: ${{ secrets.CHECKLY_API_KEY }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
PR_NUMBER: ${{ github.event.number }} | ||
# Slack FAILURE alert | ||
- name: Slack Failure Notification | ||
if: ${{ failure() }} | ||
uses: rtCamp/action-slack-notify@v2 | ||
env: | ||
SLACK_USERNAME: Checkly Github Bot | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
SLACK_CHANNEL: mac | ||
SLACK_ICON: https://github.com/checkly.png?size=48 | ||
SLACK_COLOR: ${{ job.status }} | ||
SLACK_TITLE: ':red_circle: Create PR Release Failed' | ||
SLACK_MESSAGE: '`${{ steps.ver.outputs.packageName }}@${{ steps.ver.outputs.packageVersion }}-pr.${{ github.event.number }}.${{ steps.slug.outputs.sha8 }}` by ${{ github.actor }}' | ||
SLACK_FOOTER: '' | ||
# Slack SUCCESS alert | ||
- name: Slack Success Notification | ||
if: ${{ success() }} | ||
uses: rtCamp/action-slack-notify@v2 | ||
env: | ||
SLACK_USERNAME: Checkly Github Bot | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
SLACK_CHANNEL: mac | ||
SLACK_ICON: https://github.com/checkly.png?size=48 | ||
SLACK_COLOR: ${{ job.status }} | ||
SLACK_TITLE: ':kebab_parrot: Created PR Release Succeeded' | ||
SLACK_MESSAGE: '`${{ steps.ver.outputs.packageName }}@${{ steps.ver.outputs.packageVersion }}-pr.${{ github.event.number }}.${{ steps.slug.outputs.sha8 }}` by ${{ github.actor }}' | ||
SLACK_FOOTER: '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ | |
node_modules | ||
.vscode | ||
.checkly | ||
.DS_Store | ||
.DS_Store | ||
oclif.manifest.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#!/usr/bin/env node | ||
|
||
require('../src').run() | ||
.then(require('@oclif/command/flush')) | ||
.catch(require('@oclif/errors/handle')) | ||
require('../src') | ||
.run() | ||
.then(require('@oclif/command/flush')) | ||
.catch(require('@oclif/errors/handle')) |
Oops, something went wrong.