Skip to content

Commit

Permalink
Another try at getting the action to work locally
Browse files Browse the repository at this point in the history
  • Loading branch information
shaynie committed Aug 8, 2023
1 parent b02f2ec commit c60a92e
Show file tree
Hide file tree
Showing 22 changed files with 25,521 additions and 5,329 deletions.
1 change: 0 additions & 1 deletion .github/workflows/dist/index.js.map

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/issues_sync.yaml
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./
- uses: ./issues_sync_action
env:
GITHUB_TOKEN: ${{ secrets.ISSUE_SYNC_TOKEN }}
with:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/issues_sync_action/LICENSE
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Maximilian Schirm

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
38 changes: 38 additions & 0 deletions .github/workflows/issues_sync_action/README.md
@@ -0,0 +1,38 @@
# issue-sync-action
Used to sync issues and comments from one repository to another, for example for use in internal roadmap publication.
**Please note: you need to set a GITHUB_TOKEN environmental variable that is authorized to read from the source repository as well as write new issues to the target repository. It is recommended to use the integrated GitHub Actions secrets vault for managing this secret.**

This supports different options:
```yml
only_sync_on_label:
description: 'If set, will only sync on issues with a label of this text'
required: false
repo_source:
description: 'Org/Repo slug for the source repository. Will default to action launch repo if not set.'
required: false
repo_target:
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"
```

Here is a usage example:
```yml

on:
issues:
issue_comment:

env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_FOR_BOTH_REPOS }}

- name: Run the typescript action
uses: Maximisch/issue-sync-action
with:
repo_target: "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
```
23 changes: 23 additions & 0 deletions .github/workflows/issues_sync_action/action.yml
@@ -0,0 +1,23 @@
name: 'Issue sync action'
description: 'Sync issues from one repository to another.'
branding:
icon: repeat
color: red
author: Maximisch
inputs:
only_sync_on_label:
description: 'If set, will only sync on issues with a label of this text'
required: false
repo_source:
description: 'Org/Repo slug for the source repository. Will default to action launch repo if not set.'
required: false
repo_target:
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"
runs:
using: 'node16'
main: 'dist/index.js'

0 comments on commit c60a92e

Please sign in to comment.