Skip to content
Snippets Groups Projects
Unverified Commit 9500e224 authored by Oliver Smith's avatar Oliver Smith
Browse files

gitlab.com -> gitlab.postmarketos.org (MR 51)

parent c238e862
No related branches found
No related tags found
1 merge request!51gitlab.com -> gitlab.postmarketos.org
Pipeline #208065 passed
......@@ -17,7 +17,7 @@ After installing mrhlpr (see below) and [configuring a gpg key](https://git-scm.
4. Optionally squash all commits (`git rebase -i master`).
5. Check if everything is fine (`mrhlpr status`).
6. Choose one of:
1. Finish things automatically following the instructions (`mrhlpr finish`). You will need to have the environment variable `GITLAB_TOKEN` set in your environment containing a [Personal Access Token](https://gitlab.com/-/user_settings/personal_access_tokens) with the "api" scope.
1. Finish things automatically following the instructions (`mrhlpr finish`). You will need to have the environment variable `GITLAB_TOKEN` set in your environment containing a [Personal Access Token](https://gitlab.postmarketos.org/-/user_settings/personal_access_tokens) with the "api" scope.
2. Manually push and merge:
1. If everything looks good force push (`git push --force`).
2. In the GitLab web UI: wait for CI, then merge.
......@@ -32,10 +32,10 @@ Start with `mrhlpr checkout` and the MR-ID. The built-in checklist will tell the
```shell-session
$ cd ~/code/pmbootstrap/aports
$ mrhlpr checkout 81
Download https://gitlab.com/api/v4/projects/postmarketOS%2Fpmaports/merge_requests/81
Download https://gitlab.com/api/v4/projects/8065375
Download https://gitlab.postmarketos.org/api/v4/projects/postmarketOS%2Fpmaports/merge_requests/81
Download https://gitlab.postmarketos.org/api/v4/projects/8065375
Checkout feature/abuild-sign-noinclude from postmarketOS/feature/abuild-sign-noinclude
https://gitlab.com/postmarketOS/pmaports/merge_requests/81
https://gitlab.postmarketos.org/postmarketOS/pmaports/merge_requests/81
"main/abuild-sign-noinclude: new aport" (!81)
10 commits from postmarketOS/feature/abuild-sign-noinclude
......@@ -55,7 +55,7 @@ Checklist:
```shell-session
$ git rebase -i master
$ mrhlpr status
https://gitlab.com/postmarketOS/pmaports/merge_requests/81
https://gitlab.postmarketos.org/postmarketOS/pmaports/merge_requests/81
"main/abuild-sign-noinclude: new aport" (!81)
1 commit from postmarketOS/feature/abuild-sign-noinclude
......@@ -75,7 +75,7 @@ Checklist:
```shell-session
$ mrhlpr fixmsg
Appending ' (!81)' to all commits...
https://gitlab.com/postmarketOS/pmaports/merge_requests/81
https://gitlab.postmarketos.org/postmarketOS/pmaports/merge_requests/81
"main/abuild-sign-noinclude: new aport" (!81)
1 commit from postmarketOS/feature/abuild-sign-noinclude
......@@ -122,7 +122,7 @@ Optionally you can add a `.mrhlpr.json` file to your respository, this contains
### Portability
This script is not postmarketOS specific, it should work with any GitLab repository. Right now, only gitlab.com is detected - but detecting any GitLab servers could be added in `mrhlpr/gitlab.py:parse_git_origin()` if desired.
This script is not postmarketOS specific, it should work with any GitLab repository. Right now, only gitlab.postmarketos.org is detected - but detecting any GitLab servers could be added in `mrhlpr/gitlab.py:parse_git_origin()` if desired.
### Troubleshooting
......
......@@ -34,7 +34,7 @@ def run(
def get_remote_url(remote: str = "origin") -> Optional[str]:
""":returns: the remote URL as string, e.g.
"https://gitlab.com/postmarketOS/pmaports.git" """
"https://gitlab.postmarketos.org/postmarketOS/pmaports.git" """
ret = run(["remote", "get-url", remote], check=False)
return ret
......
......@@ -120,12 +120,12 @@ def parse_git_origin() -> GitLabOrigin:
mrtest/origin.py.
:returns: a GitLabOrigin object like the following:
api: "https://gitlab.com/api/v4"
api: "https://gitlab.postmarketos.org/api/v4"
api_project_id: "postmarketOS%2Fmrhlpr"
full: "git@gitlab.com:postmarketOS/mrhlpr.git"
full: "git@gitlab.postmarketos.org:postmarketOS/mrhlpr.git"
project: "postmarketOS"
project_id: "postmarketOS/mrhlpr"
host: "gitlab.com"
host: "gitlab.postmarketos.org"
username: None
"""
# Try to get the URL
......@@ -137,7 +137,7 @@ def parse_git_origin() -> GitLabOrigin:
# Find the host
domains = [
"gitlab.alpinelinux.org",
"gitlab.com",
"gitlab.postmarketos.org",
"gitlab.freedesktop.org",
"gitlab.gnome.org",
"invent.kde.org",
......
......@@ -292,7 +292,7 @@ def checkout(
+ remote_local
+ "' manually and check the output, most"
" likely you ran into this problem:"
" https://gitlab.com/postmarketOS/mrhlpr/issues/1"
" https://gitlab.postmarketos.org/postmarketOS/mrhlpr/issues/1"
)
sys.exit(1)
......@@ -529,7 +529,7 @@ def finish(
exit(1)
push(mr_id, no_cache)
gl = gitlab_api.Gitlab(url="https://gitlab.com", private_token=gitlab_token)
gl = gitlab_api.Gitlab(url="https://gitlab.postmarketos.org", private_token=gitlab_token)
try:
gl.auth()
except gitlab_api.exceptions.GitlabAuthenticationError as authentication_exception:
......@@ -561,7 +561,7 @@ def finish(
mr.notes.create({"body": comment})
# Proper stupid but it works. Originally I had this set to a maximum of 15 seconds
# of sleepy time, but for gitlab.com this wasn't always sufficient to catch up.
# of sleepy time, but for gitlab.postmarketos.org this wasn't always sufficient to catch up.
print("Setting to auto-merge (may take up to 25 seconds)...")
for _ in range(5):
try:
......
......@@ -10,7 +10,7 @@ from typing import Optional
def load() -> dict[str, dict[str, dict[str, int]]]:
""":returns: dict of the loaded lookup table, looks like:
{"gitlab.com":
{"gitlab.postmarketos.org":
{"postmarketOS/pmaports":
{"sailfish": 66,
"grate-driver": 67}}}"""
......
......@@ -66,7 +66,7 @@ def verify(runner):
it. Exit if the user does not trust it.
:param runner: as returned from the gitlab jobs api:
{"id": 12270837,
"description": "4-blue.shared.runners-manager.gitlab.com/default",
"description": "4-blue.shared.runners-manager.gitlab.postmarketos.org/default",
"ip_address": "34.74.35.215",
"active": true,
"paused": false,
......
......@@ -6,12 +6,12 @@ needed for mrhlpr.gitlab.parse_git_origin()."""
from mrhlpr.gitlab import GitLabOrigin
pmaports = GitLabOrigin(
api="https://gitlab.com/api/v4",
api="https://gitlab.postmarketos.org/api/v4",
api_project_id="postmarketOS%2Fpmaports",
full="git@gitlab.com:postmarketOS/pmaports.git",
full="git@gitlab.postmarketos.org:postmarketOS/pmaports.git",
project="postmarketOS",
project_id="postmarketOS/pmaports",
host="gitlab.com",
host="gitlab.postmarketos.org",
username=None,
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment