Skip to content

Commit f7282cf

Browse files
authored
feat: migrate to GitHub (#1)
1 parent 6871fa0 commit f7282cf

File tree

263 files changed

+59052
-47
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

263 files changed

+59052
-47
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
indent_size = 2
8+
indent_style = space
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
dist/
3+
examples/

.eslintrc

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"root": true,
3+
"plugins": [
4+
"eslint-plugin-tsdoc"
5+
],
6+
"parserOptions": {
7+
"project": ["tsconfig.json"]
8+
},
9+
"extends": ["@scaleway/react/typescript"],
10+
"rules": {
11+
"tsdoc/syntax": "warn",
12+
"@typescript-eslint/naming-convention": [
13+
"error",
14+
{
15+
"selector": "enumMember",
16+
"format": ["PascalCase"]
17+
}
18+
],
19+
"import/prefer-default-export": "off",
20+
"import/no-default-export": "error",
21+
"no-await-in-loop": "off",
22+
"@typescript-eslint/no-namespace": "off"
23+
}
24+
}

.github/renovate.json

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"extends": [
3+
":combinePatchMinorReleases",
4+
":separateMultipleMajorReleases",
5+
"group:monorepos",
6+
"group:recommended",
7+
"helpers:disableTypesNodeMajor"
8+
],
9+
"assignees": ["team:devtools"],
10+
"assigneesSampleSize": 1,
11+
"reviewers": ["team:devtools", "team:console"],
12+
"reviewersSampleSize": 2,
13+
"updateNotScheduled": true,
14+
"lockFileMaintenance": { "enabled": false },
15+
"enabledManagers": ["github-actions", "npm"],
16+
"prCreation": "not-pending",
17+
"prHourlyLimit": 5,
18+
"prConcurrentLimit": 10,
19+
"automerge": false,
20+
"rangeStrategy": "bump",
21+
"rebaseWhen": "auto",
22+
"dependencyDashboard": true,
23+
"packageRules": [
24+
{
25+
"automerge": false,
26+
"matchPackagePatterns": ["^@scaleway/"],
27+
"stabilityDays": 0,
28+
"matchUpdateTypes": ["major", "minor", "patch"]
29+
},
30+
{
31+
"labels": ["UPDATE-MAJOR"],
32+
"stabilityDays": 14,
33+
"matchUpdateTypes": ["major"]
34+
},
35+
{
36+
"labels": ["UPDATE-MINOR"],
37+
"stabilityDays": 5,
38+
"matchUpdateTypes": ["minor"]
39+
},
40+
{
41+
"labels": ["UPDATE-PATCH"],
42+
"stabilityDays": 1,
43+
"matchUpdateTypes": ["patch"]
44+
},
45+
{
46+
"matchPackagePatterns": [
47+
"^@babel/",
48+
"^@commitlint/",
49+
"^babel-",
50+
"cz-conventional-changelog",
51+
"eslint",
52+
"husky",
53+
"jest",
54+
"lint-staged"
55+
],
56+
"automerge": true,
57+
"automergeType": "branch",
58+
"semanticCommitScope": "minor-deps",
59+
"stabilityDays": 3,
60+
"matchUpdateTypes": ["minor"]
61+
},
62+
{
63+
"matchPackagePatterns": [
64+
"^@babel/",
65+
"^@commitlint/",
66+
"^@semantic-release/",
67+
"^@types/",
68+
"^babel-",
69+
"^eslint",
70+
"cz-conventional-changelog",
71+
"husky",
72+
"jest",
73+
"lint-staged"
74+
],
75+
"automerge": true,
76+
"automergeType": "branch",
77+
"semanticCommitScope": "patch-deps",
78+
"stabilityDays": 1,
79+
"matchUpdateTypes": ["patch"]
80+
}
81+
]
82+
}

.github/workflows/check_pull_request_title.yml renamed to .github/workflows/check_pull_request.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check Pull Request Title
1+
name: Check Pull Request
22
on:
33
pull_request:
44
types: ['opened', 'edited', 'reopened', 'synchronize']

.github/workflows/run_tests.yml

+1-32
Original file line numberDiff line numberDiff line change
@@ -49,35 +49,4 @@ jobs:
4949
- run: pnpm run build
5050
- run: pnpm run test:coverage
5151
- uses: codecov/[email protected]
52-
deploy:
53-
runs-on: ubuntu-20.04
54-
needs: [test]
55-
if: github.ref == 'refs/heads/main'
56-
steps:
57-
- uses: actions/[email protected]
58-
with:
59-
fetch-depth: "0"
60-
persist-credentials: false
61-
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
62-
- name: Git Identity
63-
run: |
64-
git config --global user.name 'Scaleway Bot'
65-
git config --global user.email '[email protected]'
66-
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY
67-
env:
68-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
69-
- uses: pnpm/[email protected]
70-
- name: Use Node.js
71-
uses: actions/[email protected]
72-
with:
73-
node-version: 17
74-
check-latest: true
75-
- run: pnpm install
76-
- run: pnpm run build
77-
- run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
78-
env:
79-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
80-
- run: pnpm lerna publish -y --create-release github --ignore-scripts --no-verify-access
81-
env:
82-
HUSKY: 0
83-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
52+

.gitignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# dependencies
2+
node_modules/
3+
yarn.lock
4+
5+
# misc
6+
.DS_Store
7+
8+
# lint
9+
.eslintcache
10+
11+
# test & build
12+
.reports
13+
docs
14+
public
15+
dist
16+
coverage
17+
18+
# Protobuf definition
19+
protobuf
20+
.bufcache

.husky/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/commit-msg

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
[ -n "$CI" ] && exit 0
4+
5+
. "$(dirname "$0")/_/husky.sh"
6+
7+
pnpm commitlint --edit $1

.husky/pre-commit

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
[ -n "$CI" ] && exit 0
4+
5+
. "$(dirname "$0")/_/husky.sh"
6+
7+
pnpm lint-staged

.husky/pre-push

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
[ -n "$CI" ] && exit 0
4+
5+
. "$(dirname "$0")/_/husky.sh"
6+
7+
pnpm lint-staged

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/
2+
dist/
3+
4+
package.json

.prettierrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "all",
4+
"semi": false,
5+
"arrowParens": "avoid"
6+
}

CODE_OF_CONDUCT.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

CONTRIBUTING.md

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Contribute to `scaleway-sdk-js`
2+
3+
`scaleway-sdk-js` is Apache 2.0 licensed and accepts contributions via GitHub.
4+
This document will cover how to contribute to the project and report issues.
5+
6+
## Topics
7+
8+
- [Reporting Security Issues](#reporting-security-issues)
9+
- [Reporting Issues](#reporting-issues)
10+
- [Suggesting feature](#suggesting-feature)
11+
- [Contributing Code](#contributing-code)
12+
- [Community Guidelines](#community-guidelines)
13+
14+
## Reporting security issues
15+
16+
At Scaleway we take security seriously.
17+
If you have any issue regarding security, please notify us by sending an email to [[email protected]](mailto:[email protected]).
18+
19+
Please _DO NOT_ create a GitHub issue.
20+
21+
We will follow up with you promptly with more information and a plan for remediation.
22+
We currently do not offer a paid security bounty program, but we would love to send some Scaleway swag your way along with our deepest gratitude for your assistance in making Scaleway a more secure Cloud ecosystem.
23+
24+
## Reporting issues
25+
26+
A great way to contribute to the project is to send a detailed report when you encounter a bug.
27+
We always appreciate a well-written, thorough bug report, and will thank you for it!
28+
Before opening a new issue, we appreciate you reviewing open issues to see if there are any similar requests.
29+
If there is a match, thumbs up the issue with a 👍 and leave a comment if you have additional information.
30+
31+
When reporting an issue, include the following:
32+
33+
- The version of `scaleway-sdk-js` you are using (e.g. v1.0.0-beta1, v2.0.0, master, ...)
34+
- The environment and its version (e.g. NodeJS v16.10)
35+
36+
## Suggesting a feature
37+
38+
When requesting a feature, some of the questions we want to answer are:
39+
40+
- What value does this feature bring to end users?
41+
- How urgent is the need (nice to have feature or need to have)?
42+
- Does this align with the goals of `scaleway-sdk-js`?
43+
44+
## Contributing code
45+
46+
Part of this repo is automatically generated from our [protocol buffer](https://en.wikipedia.org/wiki/Protocol_Buffers) monorepo. This enables us to keep Scaleway toolings up to date with the latest version of our APIs ([developer website](http://developers.scaleway.com), CLI, SDKs, etc).
47+
48+
Generated files and folders are located in [scaleway-sdk-js/packages/clients/api](./packages/clients/api). They always start with the following line:
49+
50+
```ts
51+
// This file was automatically generated. DO NOT EDIT.
52+
```
53+
54+
### Submit code
55+
56+
To submit code:
57+
58+
- Create a fork of the project
59+
- Create a topic branch from where you want to base your work (usually master)
60+
- Add tests to cover contributed code
61+
- Push your commit(s) to your topic branch on your fork
62+
- Open a pull request against `scaleway-sdk-js` master branch that follows [PR guidelines](#pull-request-guidelines)
63+
64+
The maintainers of `scaleway-sdk-js` use a "Let's Get This Merged" (LGTM) message in the pull request to note that the commits are ready to merge.
65+
After one or more maintainer states LGTM, we will merge.
66+
If you have questions or comments on your code, feel free to correct these in your branch through new commits.
67+
68+
### Pull Request Guidelines
69+
70+
The goal of the following guidelines is to have Pull Requests (PRs) that are fairly easy to review and comprehend, and code that is easy to maintain in the future.
71+
72+
- **Pull Request title should be clear** on what is being fixed or added to the code base.
73+
If you are addressing an open issue, please start the title with "fix(api): #XXX" or "feat: #XXX"
74+
- **Keep it readable for human reviewers** and prefer a subset of functionality (code) with tests and documentation over delivering them separately
75+
- **Don't forget commenting code** to help reviewers understand the modification
76+
- **Notify Work In Progress PRs** by prefixing the title with `Draft:`
77+
- **Please, keep us updated.**
78+
We will try our best to merge your PR, but please notice that PRs may be closed after 30 days of inactivity.
79+
80+
Your pull request should be rebased against the current master branch. Please do not merge
81+
the current master branch in with your topic branch, nor use the Update Branch button provided
82+
by GitHub on the pull request page.
83+
84+
Keep in mind only the **Pull Request Title** will be used as commit message as we stash all commits on merge.
85+
86+
## Community guidelines
87+
88+
See [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
89+
90+
Thank you for reading through all of this, if you have any question feel free to [reach us](README.md#reach-us)!

0 commit comments

Comments
 (0)