Skip to content

Commit

Permalink
Update owner from sqren to sorenlouv
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenlouv committed Feb 1, 2024
1 parent 50ffdf2 commit e9d7297
Show file tree
Hide file tree
Showing 44 changed files with 151 additions and 146 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/docker-build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build sqren/backport:dev for testing purposes
- name: Build sorenlouv/backport:dev for testing purposes
uses: docker/build-push-action@v2
with:
context: ./docker
load: true
tags: sqren/backport:dev
tags: sorenlouv/backport:dev
- name: Test image before push
run: docker run --rm -v $(pwd):/app:ro -v ~/.backport:/root/.backport sqren/backport:dev -v
run: docker run --rm -v $(pwd):/app:ro -v ~/.backport:/root/.backport sorenlouv/backport:dev -v
- name: Push to Docker Hub
if: github.event.inputs.push_to_docker_hub == 'true'
uses: docker/build-push-action@v2
with:
context: ./docker
platforms: linux/amd64,linux/arm64
push: true
tags: sqren/backport:latest
tags: sorenlouv/backport:latest
7 changes: 5 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
},
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"files.associations": {
"*.yaml": "home-assistant"
}
}
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
For changes please refer to: https://github.com/sqren/backport/releases
For changes please refer to: https://github.com/sorenlouv/backport/releases
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## 🎉 New: The Backport Tool as a Github Action 🎉

A [Github Action](https://github.com/sqren/backport-github-action) around The Backport Tool now exists. It makes it a breeze to get automatic backports when pull requests are merged.
A [Github Action](https://github.com/sorenlouv/backport-github-action) around The Backport Tool now exists. It makes it a breeze to get automatic backports when pull requests are merged.

# Backport CLI tool

Expand Down Expand Up @@ -116,4 +116,4 @@ This tools is for anybody who is working on a codebase where they have to mainta

## Contributing

See [CONTRIBUTING.md](https://github.com/sqren/backport/blob/master/CONTRIBUTING.md)
See [CONTRIBUTING.md](https://github.com/sorenlouv/backport/blob/master/CONTRIBUTING.md)
12 changes: 7 additions & 5 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
### Running backport via docker

**Create a bash alias**

```sh
alias backport='docker run -it --rm -v $(pwd):/app:ro -v ~/.backport:/root/.backport sqren/backport'
alias backport='docker run -it --rm -v $(pwd):/app:ro -v ~/.backport:/root/.backport sorenlouv/backport'
```

You can now run backport via Docker like:

```sh
backport --help
```
Expand All @@ -23,25 +25,25 @@ docker run -it --rm -v $(pwd):/app:ro -v ~/.backport:/root/.backport $(docker bu
### Build docker image

```
docker build -t sqren/backport .
docker build -t sorenlouv/backport .
```

### Test image locally before publishing:

```
docker run --rm -v $(pwd):/app:ro -v ~/.backport:/root/.backport sqren/backport -v
docker run --rm -v $(pwd):/app:ro -v ~/.backport:/root/.backport sorenlouv/backport -v
```

### Publish to Docker hub

#### A. Via Github action

Go to the [Docker push action](https://github.com/sqren/backport/actions/workflows/docker-build-and-push.yml) and deploy by clicking "Run workflow".
Go to the [Docker push action](https://github.com/sorenlouv/backport/actions/workflows/docker-build-and-push.yml) and deploy by clicking "Run workflow".

#### B. Locally

```
docker push sqren/backport
docker push sorenlouv/backport
```

**Note: this will not produce multi-platform images**
Expand Down
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# API

`backport` can be imported as a Node module and interacted with programatically. This can be useful when creating automation around the Backport tool. See for example the [Backport Github Action](https://github.com/sqren/backport-github-action)
`backport` can be imported as a Node module and interacted with programatically. This can be useful when creating automation around the Backport tool. See for example the [Backport Github Action](https://github.com/sorenlouv/backport-github-action)

### `backportRun(options, processArgs, exitCodeOnFailure)`

Expand Down
18 changes: 9 additions & 9 deletions docs/config-file-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Add assignees to the target pull request

```json
{
"assignees": ["sqren"]
"assignees": ["sorenlouv"]
}
```

Expand All @@ -124,7 +124,7 @@ By default only commits from the authenticated user are displayed. To see commit

```json
{
"author": "sqren"
"author": "sorenlouv"
}
```

Expand Down Expand Up @@ -340,9 +340,9 @@ Template values:

- `{{sourceBranch}}`: Branch the commit is coming from (usually `main`)
- `{{targetBranch}}`: Branch the backport PR will be targeting
- `{{sourcePullRequest}}`: Original pull request object (see [interface](https://github.com/sqren/backport/blob/9e42503a7d0e06e60c575ed2c3b7dc3e5df0dd5c/src/lib/sourceCommit/parseSourceCommit.ts#L23-L31))
- `{{sourcePullRequest}}`: Original pull request object (see [interface](https://github.com/sorenlouv/backport/blob/9e42503a7d0e06e60c575ed2c3b7dc3e5df0dd5c/src/lib/sourceCommit/parseSourceCommit.ts#L23-L31))
- `{{commitMessages}}`: Message of backported commit. For multiple commits the messages will be separated by pipes (`|`).
- `{{commits}}`: A list of commits ([interface](https://github.com/sqren/backport/blob/9e42503a7d0e06e60c575ed2c3b7dc3e5df0dd5c/src/lib/sourceCommit/parseSourceCommit.ts#L15-L36))
- `{{commits}}`: A list of commits ([interface](https://github.com/sorenlouv/backport/blob/9e42503a7d0e06e60c575ed2c3b7dc3e5df0dd5c/src/lib/sourceCommit/parseSourceCommit.ts#L15-L36))

Default: `"[{{targetBranch}}] {{commitMessages}}"`

Expand All @@ -360,7 +360,7 @@ Default: `"[{{targetBranch}}] {{commitMessages}}"`
}
```

See [source code](https://github.com/sqren/backport/blob/7c998dd05bda06e9979409cc4e63273bad711d11/src/lib/github/v3/createPullRequest.test.ts#L340-L522) for more examples
See [source code](https://github.com/sorenlouv/backport/blob/7c998dd05bda06e9979409cc4e63273bad711d11/src/lib/github/v3/createPullRequest.test.ts#L340-L522) for more examples

#### `prDescription`

Expand All @@ -371,7 +371,7 @@ The description uses the [handlebars templating engine](https://handlebarsjs.com
- `{{targetBranch}}`: Branch the backport PR will be targeting
- `{{commitMessages}}`: Message of backported commit. For multiple commits the messages will be separated by new lines (`|`).
- `{{defaultPrDescription}}`: The default PR description. Using this makes it easy to append and prepend text to the existing description
- `{{commits}}`: A list of commit objects (see [commit interface](https://github.com/sqren/backport/blob/9e42503a7d0e06e60c575ed2c3b7dc3e5df0dd5c/src/lib/sourceCommit/parseSourceCommit.ts#L15-L36))
- `{{commits}}`: A list of commit objects (see [commit interface](https://github.com/sorenlouv/backport/blob/9e42503a7d0e06e60c575ed2c3b7dc3e5df0dd5c/src/lib/sourceCommit/parseSourceCommit.ts#L15-L36))

**Example: List commits**

Expand All @@ -389,7 +389,7 @@ For people who often want to append the same text, they can create a bash alias:
alias backport-skip-ci='backport --pr-description "{defaultPrDescription} [skip-ci]"'
```

See [source code](https://github.com/sqren/backport/blob/7c998dd05bda06e9979409cc4e63273bad711d11/src/lib/github/v3/createPullRequest.test.ts#L340-L522) for more examples
See [source code](https://github.com/sorenlouv/backport/blob/7c998dd05bda06e9979409cc4e63273bad711d11/src/lib/github/v3/createPullRequest.test.ts#L340-L522) for more examples

#### `prFilter`

Expand Down Expand Up @@ -525,7 +525,7 @@ Branch name to use for the backport PR
Template values:

- `{{targetBranch}}`: Branch the backport PR will be targeting
- `{{sourcePullRequest}}`: Original pull request object (see [interface](https://github.com/sqren/backport/blob/9e42503a7d0e06e60c575ed2c3b7dc3e5df0dd5c/src/lib/sourceCommit/parseSourceCommit.ts#L23-L31))
- `{{sourcePullRequest}}`: Original pull request object (see [interface](https://github.com/sorenlouv/backport/blob/9e42503a7d0e06e60c575ed2c3b7dc3e5df0dd5c/src/lib/sourceCommit/parseSourceCommit.ts#L23-L31))
- `{{refValues}}`: Name representing the original commit/PR, `commit-<hash>` or `pr-<pr number>` respectively.

Default: `backport/{{targetBranch}}/{{refValues}}`
Expand All @@ -538,4 +538,4 @@ Default: `backport/{{targetBranch}}/{{refValues}}`
}
```

See [source code](https://github.com/sqren/backport/blob/main/src/lib/cherrypickAndCreateTargetPullRequest/getBackportBranchName.ts#L14).
See [source code](https://github.com/sorenlouv/backport/blob/main/src/lib/cherrypickAndCreateTargetPullRequest/getBackportBranchName.ts#L14).
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@
"yarn.lock"
],
"author": "Søren Louv-Jansen",
"homepage": "https://github.com/sqren/backport/blob/master/README.md",
"homepage": "https://github.com/sorenlouv/backport/blob/master/README.md",
"bugs": {
"url": "https://github.com/sqren/backport/issues"
"url": "https://github.com/sorenlouv/backport/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/sqren/backport.git"
"url": "git+https://github.com/sorenlouv/backport.git"
},
"greenkeeper": {
"ignore": [
Expand Down
2 changes: 1 addition & 1 deletion src/backportRun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ function outputError({
consoleLog(chalk.bold('⚠️ Ouch! An unhandled error occured 😿'));
consoleLog(e.stack ? e.stack : e.message);
consoleLog(
'Please open an issue in https://github.com/sqren/backport/issues or contact me directly on https://twitter.com/sorenlouv',
'Please open an issue in https://github.com/sorenlouv/backport/issues or contact me directly on https://twitter.com/sorenlouv',
);

const infoLogPath = getLogfilePath({ logFilePath, logLevel: 'info' });
Expand Down
2 changes: 1 addition & 1 deletion src/entrypoint.module.private.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ describe('entrypoint.module', () => {
accessToken: accessToken,
repoName: 'kibana',
repoOwner: 'elastic',
author: 'sqren',
author: 'sorenlouv',
dateUntil: '2021-01-01T10:00:00Z',
maxNumber: 3,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ exports[`cherrypickAndCreateTargetPullRequest when commit has a pull request ref
"git",
[
"push",
"sqren",
"sorenlouv",
"backport/6.x/pr-1000_pr-2000:backport/6.x/pr-1000_pr-2000",
"--force",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('cherrypickAndCreateTargetPullRequest', () => {
const options = {
assignees: [] as string[],
authenticatedUsername: 'sqren_authenticated',
author: 'sqren',
author: 'sorenlouv',
autoMerge: true,
autoMergeMethod: 'squash',
fork: true,
Expand All @@ -65,7 +65,7 @@ describe('cherrypickAndCreateTargetPullRequest', () => {
githubApiBaseUrlV4: 'http://localhost/graphql',
interactive: false,
prTitle: '[{{targetBranch}}] {{commitMessages}}',
repoForkOwner: 'sqren',
repoForkOwner: 'sorenlouv',
repoName: 'kibana',
repoOwner: 'elastic',
reviewers: [] as string[],
Expand Down Expand Up @@ -164,8 +164,8 @@ describe('cherrypickAndCreateTargetPullRequest', () => {
<!--- Backport version: 1.2.3-mocked -->
### Questions ?
Please refer to the [Backport tool documentation](https://github.com/sqren/backport)",
"head": "sqren:backport/6.x/pr-1000_pr-2000",
Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport)",
"head": "sorenlouv:backport/6.x/pr-1000_pr-2000",
"title": "[6.x] My original commit message (#1000) | My other commit message (#2000)",
},
]
Expand Down Expand Up @@ -202,7 +202,7 @@ describe('cherrypickAndCreateTargetPullRequest', () => {
"Pulling latest changes",
"Cherry-picking: My original commit message (#1000)",
"Cherry-picking: My other commit message (#2000)",
"Pushing branch "sqren:backport/6.x/pr-1000_pr-2000"",
"Pushing branch "sorenlouv:backport/6.x/pr-1000_pr-2000"",
undefined,
"Creating pull request",
"Adding labels: backport",
Expand All @@ -220,7 +220,7 @@ describe('cherrypickAndCreateTargetPullRequest', () => {
const options = {
assignees: [] as string[],
authenticatedUsername: 'sqren_authenticated',
author: 'sqren',
author: 'sorenlouv',
fork: true,
prTitle: '[{{targetBranch}}] {{commitMessages}}',
repoForkOwner: 'the_fork_owner',
Expand Down Expand Up @@ -284,7 +284,7 @@ describe('cherrypickAndCreateTargetPullRequest', () => {
<!--- Backport version: 1.2.3-mocked -->
### Questions ?
Please refer to the [Backport tool documentation](https://github.com/sqren/backport)",
Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport)",
"head": "the_fork_owner:backport/6.x/commit-mySha",
"title": "[6.x] My original commit message",
},
Expand All @@ -305,11 +305,11 @@ describe('cherrypickAndCreateTargetPullRequest', () => {
const options = {
assignees: [] as string[],
authenticatedUsername: 'sqren_authenticated',
author: 'sqren',
author: 'sorenlouv',
fork: true,
githubApiBaseUrlV4: 'http://localhost/graphql',
prTitle: '[{{targetBranch}}] {{commitMessages}}',
repoForkOwner: 'sqren',
repoForkOwner: 'sorenlouv',
repoName: 'kibana',
repoOwner: 'elastic',
reviewers: [] as string[],
Expand Down Expand Up @@ -369,8 +369,8 @@ describe('cherrypickAndCreateTargetPullRequest', () => {
<!--- Backport version: 1.2.3-mocked -->
### Questions ?
Please refer to the [Backport tool documentation](https://github.com/sqren/backport)",
"head": "sqren:backport/6.x/commit-mySha",
Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport)",
"head": "sorenlouv:backport/6.x/commit-mySha",
"title": "[6.x] My original commit message",
},
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export async function cherrypickAndCreateTargetPullRequest({
repo: options.repoName,
title: getTitle({ options, commits, targetBranch }),
body: getPullRequestBody({ options, commits, targetBranch }),
head: `${repoForkOwner}:${backportBranch}`, // eg. sqren:backport/7.x/pr-75007
head: `${repoForkOwner}:${backportBranch}`, // eg. sorenlouv:backport/7.x/pr-75007
base: targetBranch, // eg. 7.x
};

Expand Down
10 changes: 5 additions & 5 deletions src/lib/git.private.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ describe('git.private', () => {
backportBranch: 'my-backport-branch',
});
await childProcess.exec(
`git remote add sqren https://x-access-token:${accessToken}@github.com/sqren/repo-with-conflicts.git`,
`git remote add sorenlouv https://x-access-token:${accessToken}@github.com/sorenlouv/repo-with-conflicts.git`,
{ cwd },
);
});
Expand All @@ -188,15 +188,15 @@ describe('git.private', () => {
await expect(async () => {
await pushBackportBranch({
options: {
repoOwner: 'sqren',
repoOwner: 'sorenlouv',
repoName: 'repo-with-conflicts',
dir: cwd,
} as ValidConfigOptions,
backportBranch: 'my-backport-branch',
});
}).rejects.toThrowErrorMatchingInlineSnapshot(`
"Error pushing to https://github.com/sqren/repo-with-conflicts. Repository does not exist. Either fork the repository (https://github.com/sqren/repo-with-conflicts) or disable fork mode via "--no-fork".
Read more about fork mode in the docs: https://github.com/sqren/backport/blob/main/docs/config-file-options.md#fork"
"Error pushing to https://github.com/sorenlouv/repo-with-conflicts. Repository does not exist. Either fork the repository (https://github.com/sorenlouv/repo-with-conflicts) or disable fork mode via "--no-fork".
Read more about fork mode in the docs: https://github.com/sorenlouv/backport/blob/main/docs/config-file-options.md#fork"
`);
});
});
Expand Down Expand Up @@ -554,7 +554,7 @@ describe('git.private', () => {
await gitInit(cwd);
await childProcess.spawnPromise(
'git',
['remote', 'add', 'sqren', '[email protected]:sqren/kibana.git'],
['remote', 'add', 'sorenlouv', '[email protected]:sorenlouv/kibana.git'],
cwd,
);
await childProcess.spawnPromise(
Expand Down
Loading

0 comments on commit e9d7297

Please sign in to comment.