Skip to content

Commit

Permalink
prepare release 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Srg committed Dec 11, 2019
1 parent 8b46935 commit 022a1bf
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 19 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
name: Auto Assign Project Local

on: [pull_request, issues]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
assign_one_project:
runs-on: ubuntu-latest
name: Assign to One Project
steps:
- name: Run assignment to one project
uses: srggrs/assign-one-project-github-action@1.0.4
uses: srggrs/assign-one-project-github-action@1.1.0
if: github.event.action == 'opened'
with:
project: 'https://github.com/srggrs/assign-one-project-github-action/projects/2'
37 changes: 30 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,50 @@ This action has been modified from the original action from [masutaka](https://g

**Required** The url of the project to be assigned to.

### `GITHUB_TOKEN`

**Required** The enviromental variable for query github API.

## Example usage

Example of action:
Examples of action:

### Repository project

```yaml
name: Auto Assign Project

on: [pull_request, issues]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
assign_one_project:
runs-on: ubuntu-latest
name: Assign to One Project
steps:
- name: Run assignment to one project
uses: srggrs/assign-one-project-github-action@1.0.4
if: github.event.action == 'opened'
uses: srggrs/assign-one-project-github-action@1.1.0
if: github.event.action == 'opened' # not required but speed up the action
with:
project: 'https://github.com/srggrs/assign-one-project-github-action/projects/2'
```
### Organisation or User project
Generate a token from the Organisation settings or User Settings and add it as a secret in the repository secrets as `MY_GITHUB_TOKEN`

```yaml
name: Auto Assign Project
on: [pull_request, issues]
env:
MY_GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
jobs:
assign_one_project:
runs-on: ubuntu-latest
name: Assign to One Project
steps:
- name: Run assignment to one project
uses: srggrs/[email protected]
if: github.event.action == 'opened' # not required but speed up the action
with:
project: 'https://github.com/srggrs/assign-one-project-github-action/projects/2'
```
10 changes: 3 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
# action.yml
name: 'Assign to One Project'
description: 'Assign new Issue or Pull Request to default project dashboard column'
author: srggrs
inputs:
project: # id of input
description: 'Assigned Project'
required: true
github_token:
description: 'Repo token'
required: true
default: ${{ secrets.GITHUB_TOKEN }}


runs:
using: 'docker'
image: 'docker://srggrs/assign-one-project-github-action:1.0.4'
image: 'docker://srggrs/assign-one-project-github-action:1.1.0'
args:
- ${{ inputs.project }}
- ${{ inputs.github_token }}

branding:
icon: 'box'
Expand Down
4 changes: 0 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#!/bin/sh -l

echo "***********************************"
env
echo "***********************************"

PROJECT_URL="$INPUT_PROJECT"
if [ -z "$PROJECT_URL" ]; then
echo "PROJECT_URL is not defined." >&2
Expand Down

0 comments on commit 022a1bf

Please sign in to comment.