Skip to content

Commit 963a3b9

Browse files
committed
Initial commit
0 parents  commit 963a3b9

File tree

18 files changed

+14714
-0
lines changed

18 files changed

+14714
-0
lines changed

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
# Enable version updates for npm
4+
- package-ecosystem: "npm"
5+
# Look for `package.json` and `lock` files in the `root` directory
6+
directory: "/"
7+
# Check the npm registry for updates every day (weekdays)
8+
schedule:
9+
interval: "daily"

.github/labeler.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
source:
2+
- lib/**/*
3+
action:
4+
- action.yml
5+
tests:
6+
- tests/**/*
7+
automation:
8+
- .github/workflows/*
9+
docs:
10+
- '*.md'

.github/workflows/labeler.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
##
2+
# Label incoming pull requests according to configuration in .github/labeler.yml
3+
##
4+
name: Pull Request Labeler
5+
on:
6+
- pull_request_target
7+
8+
jobs:
9+
triage:
10+
runs-on: ubuntu-latest
11+
steps:
12+
# See documentation: https://github.com/actions/labeler
13+
- uses: actions/labeler@v3
14+
with:
15+
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
##
2+
# Publish new action tag(s) for downstream consumption
3+
##
4+
name: Publish
5+
6+
# Manual or automatic release
7+
on:
8+
release:
9+
types: [published, edited]
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
steps:
15+
# Release with semantic tag like v1.0.3
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
with:
19+
ref: ${{ github.event.release.tag_name }}
20+
21+
- name: Setup Node
22+
uses: actions/setup-node@v2
23+
24+
# Compile dist/index.js and bundle with action.yml
25+
# Force push major and minor tags, e.g. v1, v1.0
26+
# See documentation: https://github.com/JasonEtco/build-and-tag-action
27+
- uses: JasonEtco/build-and-tag-action@v2
28+
env:
29+
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/stale.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
##
2+
# Close stale issues and pull requests after a configurable time period
3+
##
4+
name: 'Close stale issues and PRs'
5+
on:
6+
schedule:
7+
- cron: '30 1 * * *'
8+
9+
jobs:
10+
stale:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/stale@v3
14+
with:
15+
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
16+
days-before-stale: 30
17+
days-before-close: 5

.github/workflows/test.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
##
2+
# Run unit test and the action itself
3+
##
4+
name: Unit Test
5+
on:
6+
pull_request:
7+
push:
8+
branches:
9+
- main
10+
- feature/**
11+
12+
jobs:
13+
# unit tests
14+
unit:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
- run: npm ci
19+
- run: npm test
20+
21+
# test action works running from the graph
22+
test:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v2
26+
- run: npm ci
27+
- uses: ./
28+
with:
29+
milliseconds: 1000

.gitignore

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Compiled project files
5+
dist/
6+
7+
# Editors
8+
.vscode/
9+
.idea/
10+
*.iml
11+
12+
# Logs
13+
logs
14+
*.log
15+
npm-debug.log*
16+
yarn-debug.log*
17+
yarn-error.log*
18+
19+
# Runtime data
20+
pids
21+
*.pid
22+
*.seed
23+
*.pid.lock
24+
25+
# Directory for instrumented libs generated by jscoverage/JSCover
26+
lib-cov
27+
28+
# Coverage directory used by tools like istanbul
29+
coverage
30+
31+
# nyc test coverage
32+
.nyc_output
33+
34+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
35+
.grunt
36+
37+
# Bower dependency directory (https://bower.io/)
38+
bower_components
39+
40+
# node-waf configuration
41+
.lock-wscript
42+
43+
# Compiled binary addons (https://nodejs.org/api/addons.html)
44+
build/Release
45+
46+
# Other Dependency directories
47+
jspm_packages/
48+
49+
# TypeScript v1 declaration files
50+
typings/
51+
52+
# Optional npm cache directory
53+
.npm
54+
55+
# Optional eslint cache
56+
.eslintcache
57+
58+
# Optional REPL history
59+
.node_repl_history
60+
61+
# Output of 'npm pack'
62+
*.tgz
63+
64+
# Yarn Integrity file
65+
.yarn-integrity
66+
67+
# dotenv environment variables file
68+
.env
69+
70+
# next.js build output
71+
.next

CODE_OF_CONDUCT.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
> Note: this is an example code of conduct that you or your organization might review, edit, and adopt.
2+
>
3+
> Read more here about codes of conduct here:
4+
> - https://docs.github.com/en/github/building-a-strong-community/adding-a-code-of-conduct-to-your-project
5+
> - https://www.contributor-covenant.org/
6+
7+
8+
# Contributor Covenant Code of Conduct
9+
10+
## Our Pledge
11+
12+
We as members, contributors, and leaders pledge to make participation in our
13+
community a harassment-free experience for everyone, regardless of age, body
14+
size, visible or invisible disability, ethnicity, sex characteristics, gender
15+
identity and expression, level of experience, education, socio-economic status,
16+
nationality, personal appearance, race, caste, color, religion, or sexual identity
17+
and orientation.
18+
19+
We pledge to act and interact in ways that contribute to an open, welcoming,
20+
diverse, inclusive, and healthy community.
21+
22+
## Our Standards
23+
24+
Examples of behavior that contributes to a positive environment for our
25+
community include:
26+
27+
* Demonstrating empathy and kindness toward other people
28+
* Being respectful of differing opinions, viewpoints, and experiences
29+
* Giving and gracefully accepting constructive feedback
30+
* Accepting responsibility and apologizing to those affected by our mistakes,
31+
and learning from the experience
32+
* Focusing on what is best not just for us as individuals, but for the
33+
overall community
34+
35+
Examples of unacceptable behavior include:
36+
37+
* The use of sexualized language or imagery, and sexual attention or
38+
advances of any kind
39+
* Trolling, insulting or derogatory comments, and personal or political attacks
40+
* Public or private harassment
41+
* Publishing others' private information, such as a physical or email
42+
address, without their explicit permission
43+
* Other conduct which could reasonably be considered inappropriate in a
44+
professional setting
45+
46+
## Enforcement Responsibilities
47+
48+
Community leaders are responsible for clarifying and enforcing our standards of
49+
acceptable behavior and will take appropriate and fair corrective action in
50+
response to any behavior that they deem inappropriate, threatening, offensive,
51+
or harmful.
52+
53+
Community leaders have the right and responsibility to remove, edit, or reject
54+
comments, commits, code, wiki edits, issues, and other contributions that are
55+
not aligned to this Code of Conduct, and will communicate reasons for moderation
56+
decisions when appropriate.
57+
58+
## Scope
59+
60+
This Code of Conduct applies within all community spaces, and also applies when
61+
an individual is officially representing the community in public spaces.
62+
Examples of representing our community include using an official e-mail address,
63+
posting via an official social media account, or acting as an appointed
64+
representative at an online or offline event.
65+
66+
## Enforcement
67+
68+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
69+
reported to the community leaders responsible for enforcement at
70+
opensource+github-developer/javascript-[email protected].
71+
All complaints will be reviewed and investigated promptly and fairly.
72+
73+
All community leaders are obligated to respect the privacy and security of the
74+
reporter of any incident.
75+
76+
## Enforcement Guidelines
77+
78+
Community leaders will follow these Community Impact Guidelines in determining
79+
the consequences for any action they deem in violation of this Code of Conduct:
80+
81+
### 1. Correction
82+
83+
**Community Impact**: Use of inappropriate language or other behavior deemed
84+
unprofessional or unwelcome in the community.
85+
86+
**Consequence**: A private, written warning from community leaders, providing
87+
clarity around the nature of the violation and an explanation of why the
88+
behavior was inappropriate. A public apology may be requested.
89+
90+
### 2. Warning
91+
92+
**Community Impact**: A violation through a single incident or series
93+
of actions.
94+
95+
**Consequence**: A warning with consequences for continued behavior. No
96+
interaction with the people involved, including unsolicited interaction with
97+
those enforcing the Code of Conduct, for a specified period of time. This
98+
includes avoiding interactions in community spaces as well as external channels
99+
like social media. Violating these terms may lead to a temporary or
100+
permanent ban.
101+
102+
### 3. Temporary Ban
103+
104+
**Community Impact**: A serious violation of community standards, including
105+
sustained inappropriate behavior.
106+
107+
**Consequence**: A temporary ban from any sort of interaction or public
108+
communication with the community for a specified period of time. No public or
109+
private interaction with the people involved, including unsolicited interaction
110+
with those enforcing the Code of Conduct, is allowed during this period.
111+
Violating these terms may lead to a permanent ban.
112+
113+
### 4. Permanent Ban
114+
115+
**Community Impact**: Demonstrating a pattern of violation of community
116+
standards, including sustained inappropriate behavior, harassment of an
117+
individual, or aggression toward or disparagement of classes of individuals.
118+
119+
**Consequence**: A permanent ban from any sort of public interaction within
120+
the community.
121+
122+
## Attribution
123+
124+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
125+
version 2.0, available at
126+
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0].
127+
128+
Community Impact Guidelines were inspired by
129+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
130+
131+
For answers to common questions about this code of conduct, see the FAQ at
132+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
133+
at [https://www.contributor-covenant.org/translations][translations].
134+
135+
[homepage]: https://www.contributor-covenant.org
136+
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html
137+
[Mozilla CoC]: https://github.com/mozilla/diversity
138+
[FAQ]: https://www.contributor-covenant.org/faq
139+
[translations]: https://www.contributor-covenant.org/translations

CONTRIBUTING.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
> Note: this is an example contributing guide that you or your organization might review, edit, and adopt.
2+
>
3+
> Read more about contribution guidelines here:
4+
> - https://docs.github.com/en/github/building-a-strong-community/setting-guidelines-for-repository-contributors
5+
6+
## Contributing
7+
8+
[fork]: https://github.com/github/github-developer/javascript-action/fork
9+
[pr]: https://github.com/github/github-developer/javascript-action/compare
10+
[style]: https://github.com/styleguide/ruby
11+
[code-of-conduct]: CODE_OF_CONDUCT.md
12+
13+
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
14+
15+
Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE.md).
16+
17+
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
18+
19+
## Submitting a pull request
20+
21+
0. [Fork][fork] and clone the repository
22+
0. Configure and install the dependencies: `npm i`
23+
0. Make sure the tests pass on your machine: `npm test`
24+
0. Create a new branch: `git checkout -b my-branch-name`
25+
0. Make your change, add tests, and make sure the tests still pass
26+
0. Push to your fork and [submit a pull request][pr]
27+
0. Pat your self on the back and wait for your pull request to be reviewed and merged.
28+
29+
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
30+
31+
- Follow the style guide style by running the linter `npm run lint`.
32+
- Write tests.
33+
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
34+
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
35+
36+
## Resources
37+
38+
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
39+
- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
40+
- [GitHub Help](https://help.github.com)

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 GitHub, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)