Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefix for repos on backup destination #86

Open
Thulium-Drake opened this issue Jan 26, 2022 · 2 comments
Open

Prefix for repos on backup destination #86

Thulium-Drake opened this issue Jan 26, 2022 · 2 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@Thulium-Drake
Copy link

Thulium-Drake commented Jan 26, 2022

Hi!

Thanks for your awesome tool! I might have a bit of a silly request. I'd like to use Gickup to mirror my Ansible code from my personal Gitea to public Github repos. However, because of $reasons, I have stuck all my Ansible relates roles in a organisation named Ansible, where on Github (as I only have 1 account) I use the prefix ansible-. The rest of the repo names are the same (so Ansible/role-blah -> ansible-role-blah), but I'd like to know if the following 2 features are possible:

  • includeorgs (like excludeorgs, but opposite) on a Gitea source
  • Setting a prefix for repos on a Github destination

Thank you!

@cooperspencer cooperspencer added enhancement New feature or request question Further information is requested labels Jan 27, 2022
@cooperspencer
Copy link
Owner

Hi,
Glad that you like it 😄.
You can actually set the user parameter in your Gitea config to Ansible and then it would just mirror your repos from this organization.
I will implement the includeorgsand prefix options, those are easy to implement 😄

Sadly, Github doesn't support mirrors, therefore it isn't possible to mirror your gitea repos to github.

But I am currently working on another program, that runs actions as soon as it finds changes in a repository. With that you could monitor your ansible repos, pull them as soon a change occurs and automatically push the changes to github. I will upload it to github as soon as it is ready.

@cooperspencer
Copy link
Owner

cooperspencer commented Mar 4, 2022

@Thulium-Drake I uploaded the new program yesterday. You can find it at https://github.com/cooperspencer/charly
You can monitor your repos like this:

gitea:
  url: https://your.instance
  token: xyz
  repos:
    - repo: ansible_whatever
      user: youruser
      working-dir: /home/user/git/
      script: |+
        if [ -d "$REPO" ]; then
          cd $REPO
          git pull origin $BRANCH
          git push -u github $BRANCH
        else
          git clone $URL
          cd $REPO
          git remote add origin https://github.com/yourname/yourrepo
          git push -u github $BRANCH
        fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants