Skip to content

Commit

Permalink
Merge pull request #19 from Maximisch/support-ghes-sync
Browse files Browse the repository at this point in the history
Add support for syncing between different GHES instances
  • Loading branch information
Maximisch authored May 16, 2024
2 parents 0610070 + 9e81fe1 commit ad1618a
Show file tree
Hide file tree
Showing 9 changed files with 21,794 additions and 5,417 deletions.
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,28 @@ This supports different options:
only_sync_on_label:
description: 'If set, will only sync on issues with a label of this text'
required: false
repo_source:
source_repo:
description: 'Org/Repo slug for the source repository. Will default to action launch repo if not set.'
required: false
repo_target:
target_repo:
description: 'Org/repo slug for the target repository.'
required: true
only_sync_main_issue:
description: 'Will exclude the syncing of comments.'
required: false
default: "false"
source_pat:
description: 'Personal Access Token for the source repository. Will use workflow token if unspecified.'
required: false
target_pat:
description: 'Personal Access Token for the target repository. Will use source token if unspecified.'
required: false
source_url:
description: 'The GitHub URL for the source repository. Will use Github.com if unspecified.'
required: false
target_url:
description: 'The GitHub URL for the target repository. Will use source URL if unspecified.'
required: true
```
Here is a usage example:
Expand All @@ -32,7 +44,14 @@ env:
- name: Run the typescript action
uses: Maximisch/issue-sync-action
with:
repo_target: "MyOrg/public-roadmap" # The target repository
target_repo: "MyOrg/public-roadmap" # The target repository
only_sync_on_label: "publicise" # Only syncs issues with this label set
only_sync_main_issue: true # Excludes comments
source_pat: ${{ secrets.SOURCE_PAT }} # Personal Access Token for the source repository
target_pat: ${{ secrets.TARGET_PAT }} # Personal Access Token for the target repository
source_url: "octodemo.com/api/v3" # GitHub Enterprise Server URL for the source repository
target_url: "api.github.com" # GitHub Cloud API URL for the target repository
```
**NOTE:** In case of selecting a GHES instance as source/target, it is necessary to add `/api/v3` at the end of the URL. For `GitHub.com`, please add `api.github.com` as the destination.
18 changes: 15 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,28 @@ inputs:
only_sync_on_label:
description: 'If set, will only sync on issues with a label of this text'
required: false
repo_source:
source_repo:
description: 'Org/Repo slug for the source repository. Will default to action launch repo if not set.'
required: false
repo_target:
target_repo:
description: 'Org/repo slug for the target repository.'
required: true
only_sync_main_issue:
description: 'Will exclude the syncing of comments.'
required: false
default: "false"
source_pat:
description: 'Personal Access Token for the source repository.'
required: true
target_pat:
description: 'Personal Access Token for the target repository.'
required: true
source_url:
description: 'The GitHub Enterprise Server URL for the source repository.'
required: true
target_url:
description: 'The GitHub Enterprise Server URL for the target repository.'
required: true
runs:
using: 'node16'
main: 'dist/index.js'
main: 'dist/index.js'
Loading

0 comments on commit ad1618a

Please sign in to comment.