Skip to content

GitHub Action to generate migration stats by comparing the number of the repos in Github with GitLab or Bitbucket

License

Notifications You must be signed in to change notification settings

mouismail/go-compare-repos

Repository files navigation

Migration Stats

GitHub go.mod Go version of a Go module GitHub license GitHub Workflow Status GitHub Workflow Status GitHub tag (latest by date)

Description

This repository contains a GitHub Action that compares repositories in GitHub with repositories in GitLab or Bitbucket.

Inputs

Environment Variables

  • GH_ORG_NAME - The name of the GitHub organization
  • GL_PROJECT_ID - The ID of the GitLab project
  • GHEC_ACCESS_TOKEN - The access token for the GitHub Enterprise Cloud instance
  • GITLAB_ACCESS_TOKEN - The access token for the GitLab instance
  • GH_STATS_REPO_NAME - The repo where the stats file will be created
  • GH_STATS_ORG_NAME - The organization where the stats file will be created

Development

Requirements

Build

make build

Test

make test

Release

make release

Run locally

make run

Usage

Local

export GH_ORG_NAME=demo-org
export GL_PROJECT_ID=123456
export GHEC_ACCESS_TOKEN=gh_access_token
export GITLAB_ACCESS_TOKEN=gl_access_token
go run main.go

Example workflow

name: Go

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: mouismail/go-compare-repos@v1
        with:
          go-version: '1.19'
          go-command: 'go build'

About

GitHub Action to generate migration stats by comparing the number of the repos in Github with GitLab or Bitbucket

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages