Skip to content

Commit

Permalink
Expand documentation to explain branch protection
Browse files Browse the repository at this point in the history
  • Loading branch information
gridhead committed Nov 19, 2023
1 parent 82add45 commit b5e42bf
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,19 +152,19 @@ Simple exporter tool that helps migrate repository files, data assets and issue

### Setup

1. Using an internet browser of your choice, open up [Pagure](https://pagure.io) and login to your account.
1. Using an internet browser of your choice, open up [**Pagure**](https://pagure.io) and login to your account.

![](https://raw.githubusercontent.com/gridhead/pagure-exporter/main/data/01.png)

2. Click on your profile display picture and then, head over to the [Account Settings](https://pagure.io/settings) page.
2. Click on your profile display picture and then, head over to the [**Account Settings**](https://pagure.io/settings) page.

![](https://raw.githubusercontent.com/gridhead/pagure-exporter/main/data/02.png)

3. Under the [API Keys](https://pagure.io/settings#nav-api-tab) section, click on the [Create new API key](https://pagure.io/settings/token/new) button in the top right corner.
3. Under the [**API Keys**](https://pagure.io/settings#nav-api-tab) section, click on the [**Create new API key**](https://pagure.io/settings/token/new) button in the top right corner.

![](https://raw.githubusercontent.com/gridhead/pagure-exporter/main/data/03.png)

4. As this is the source namespace, check all the ACLs that are required to read the asset information associated with a repository, set a safe expiration date for the API token and write an appropriate description for its usage before clicking on the [Create](#) button.
4. As this is the source namespace, check all the ACLs that are required to read the asset information associated with a repository, set a safe expiration date for the API token and write an appropriate description for its usage before clicking on the [**Create**](#) button.

![](https://raw.githubusercontent.com/gridhead/pagure-exporter/main/data/04.png)

Expand All @@ -181,40 +181,48 @@ Simple exporter tool that helps migrate repository files, data assets and issue

![](https://raw.githubusercontent.com/gridhead/pagure-exporter/main/data/07.png)

8. In another internet browser tab or window, open up [GitLab](https://gitlab.com/) and login to your account.
8. In another internet browser tab or window, open up [**GitLab**](https://gitlab.com/) and login to your account.

![](https://raw.githubusercontent.com/gridhead/pagure-exporter/main/data/08.png)

9. Click on the [New project/repository](https://gitlab.com/projects/new) option from the sidebar of the profile page and then, click on the [Create blank project](https://gitlab.com/projects/new#blank_project) option.
9. Click on the [**New project/repository**](https://gitlab.com/projects/new) option from the sidebar of the profile page and then, click on the [**Create blank project**](https://gitlab.com/projects/new#blank_project) option.

![](https://raw.githubusercontent.com/gridhead/pagure-exporter/main/data/09.png)

10. Create a new empty repository which will act as the destination for the asset transfer. It is recommended to have the same name as the source namespace to avoid confusion, but it is not strictly required.

![](https://raw.githubusercontent.com/gridhead/pagure-exporter/main/data/10.png)

11. Head over to the created repository and make note of the `Project ID`.
11. Head over to the created repository and make note of the **Project ID**.
For example in this case, it is `42823949` for the destination repository named `gridhead/pagure-exporter-test`.

![](https://raw.githubusercontent.com/gridhead/pagure-exporter/main/data/11.png)

12. Expand the sidebar to head over to the [Access Tokens](https://gitlab.com/gridhead/pagure-exporter-test/-/settings/access_tokens) section from the `Settings` section.
12. Expand the sidebar to head over to the [**Repository**](#) section from the [**Settings**](#) section.

![](https://raw.githubusercontent.com/gridhead/pagure-exporter/main/data/17.png)

13. In the [**Protected Branches**](#) section, turn off all existing *branch protection rules* and *allow force pushing* to all branches temporarily to allow for the repository assets to be moved in here.

![](https://raw.githubusercontent.com/gridhead/pagure-exporter/main/data/18.png)

14. Expand the sidebar to head over to the [**Access Tokens**](#) section from the [**Settings**](#) section.

![](https://raw.githubusercontent.com/gridhead/pagure-exporter/main/data/12.png)

13. In the [Project Access Token](https://gitlab.com/gridhead/pagure-exporter-test/-/settings/access_tokens) page, click on the [Add new token](#) button to begin creating a new access token.
15. In the [**Project Access Token**](#) page, click on the [**Add new token**](#) button to begin creating a new access token.

![](https://raw.githubusercontent.com/gridhead/pagure-exporter/main/data/13.png)

14. As this is the destination namespace, check all the scopes that are required to write the asset information associated with a repository, pick an appropriate role, set a safe expiration date and write an appropriate description for its usage before clicking on the [Create project access token](#) button.
16. As this is the destination namespace, check all the scopes that are required to write the asset information associated with a repository, pick an appropriate role, set a safe expiration date and write an appropriate description for its usage before clicking on the [**Create project access token**](#) button.

![](https://raw.githubusercontent.com/gridhead/pagure-exporter/main/data/14.png)

15. Make note of the API token generated and ensure that they are not shared with others or used for a different purpose.
17. Make note of the API token generated and ensure that they are not shared with others or used for a different purpose.

![](https://raw.githubusercontent.com/gridhead/pagure-exporter/main/data/15.png)

16. Ensure that you have the following information handy before proceeding to the next steps.
18. Ensure that you have the following information handy before proceeding to the next steps.

1. Username of an account that has at least the READ permissions in the source namespace on Pagure (Say `srceuser`)
2. Access token belonging to the aforementioned account with appropriate ACLs checked required for at least the READ permissions in the source namespace (Say `srcecode`)
Expand Down
Binary file added data/17.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b5e42bf

Please sign in to comment.