From e5cbfb277bc067159dd31917c0f76469859a5acb Mon Sep 17 00:00:00 2001 From: Clement Sam Date: Tue, 9 Aug 2022 18:07:10 +0000 Subject: [PATCH] Delete gitlab-issues-to-github.yml --- .github/workflows/gitlab-issues-to-github.yml | 49 ------------------- 1 file changed, 49 deletions(-) delete mode 100644 .github/workflows/gitlab-issues-to-github.yml diff --git a/.github/workflows/gitlab-issues-to-github.yml b/.github/workflows/gitlab-issues-to-github.yml deleted file mode 100644 index ae1e0c87..00000000 --- a/.github/workflows/gitlab-issues-to-github.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: "GitLab Sync" -on: - schedule: - # runs every 5 minutes - - cron: '*/5 * * * *' - -jobs: - issues: - runs-on: ubuntu-latest - if: github.repository == 'profclems/glab' # do not run on forks - env: - GITLAB_TOKEN: ${{ secrets.BOT_GITLAB_TOKEN }} - GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} - NO_PROMPT: 1 - - steps: - - name: Checkout Code - uses: actions/checkout@v2 - - - name: Add GitLab Remote - run: git remote add gitlab git@gitlab.com:profclems/glab.git - - - name: Install GLab - run: brew install --build-from-source glab - - - name: Get GitLab Issues - run: | - glab api /projects/:fullpath/issues -f labels=gh-new -f state=opened -X GET --paginate >> issues.json - - - name: Clone New Issues on GitHub - run: | - jq -c '.[]' issues.json | while read -r i; do - title=$(echo $i | jq -r '.title') - id=$(echo $i | jq -r '.iid') - description=$(echo $i | jq -r '.description') - weburl=$(echo $i | jq -r '.web_url') - updatedAt=$(echo $i | jq -r '.updated_at') - author=$(echo $i | jq -r '.author."username"') - authorURL=$(echo $i | jq -r '.author."web_url"') - body=$(< .github/gitlab_issue_tpl.md) - body=${body//"[author]"/"$author"} - body=${body//"[authorURL]"/"$authorURL"} - body=${body//"[updatedAt]"/"$updatedAt"} - body=${body//"[GitLabIssueURL]"/"$weburl"} - body=${body//"[description]"/"$description"} - issueMsg=$(gh issue create -t "$title" -b "$body") - glab issue note ${id} -m "This issue has been moved to GitHub. Follow this issue on GitHub at ${issueMsg}" - glab issue update ${id} --unlabel "gh-new" -l "gh-cloned" - done