Skip to content

Commit af350cb

Browse files
authored
Playing with a typescript, typing, cleaning, ... (#2)
* Playing with a typescript, typing, cleaning, ... * Testing * Testing * Testing * Trying out org level token * Trying out org level token * Trying out org level token * Test * Test * Test * Test * Test * Test * Test * Test * Test * Test * Test * Test * Test * Test * Test * Test * Test * Test * Test * Test * Test * Test * Test * PR fixes
1 parent b5cac86 commit af350cb

File tree

12 files changed

+371
-237
lines changed

12 files changed

+371
-237
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
end_of_line = lf
10+
# editorconfig-tools is unable to ignore longs strings or urls
11+
max_line_length = null
12+
13+
[{*.yaml, *.yml}]
14+
indent_size = 2

.github/workflows/pr_toolkit.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ jobs:
1212
- name: clone local repository
1313
uses: actions/checkout@v2
1414

15-
- name: run PR toolkit console team
15+
- name: run pull-request-toolkit action
1616
uses: ./
1717
with:
1818
repo-token: ${{ secrets.GITHUB_TOKEN }}
19-
team-name: Platform
20-
team-members: drobnikj
19+
org-token: ${{ secrets.PULL_REQUEST_TOOLKIT_ACTION_GITHUB_TOKEN }}

README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
# Pull request toolkit
22

3-
This action makes PR better for Zenhub integration.
3+
This action automates a couple of processes connected with a management of Github pull requests.
44

55
# What it does
66

7-
- Assign PR to the creator of PR
8-
- Fill missing milestone with a current milestone for the repository
7+
- Assigns PR to the its creater
8+
- Fills missing milestone with a current milestone from Zenhub
9+
10+
## Wishlist / TODOs
11+
12+
- Make sure that pull request has either issue assigned (using the Zenhub issue-PR connection) or has estimate and labels set.
13+
- Github action for a publishing of a new version.
14+
- Github action for lint and tests execution.
15+
- Use Docker image with runtime typescript compilation instead of commiting a dist directory.
916

1017
# Action input
1118

12-
| Name | Description | Example | Required |
13-
| ------------------ | -------------------------------------------------------------------------------- | ----------------------------------------------------------- | -------- |
14-
| `repo-token` | Repository Github token | `github-token` | yes |
15-
| `team-members` | List of Github usernames for members using toolkit (by default everybody included) | `username1,username2` | no |
16-
| `team-name` | If name is provide, the milestone will be filter by regexp base on team name. | `platform` | no |
19+
| Name | Description | Example | Required |
20+
| -------------| -------------------------------------------------- | ---------------| -------- |
21+
| `repo-token` | Repository Github token | `github-token` | yes |
22+
| `org-token` | Github token with read only access to organization | `github-token` | yes |
1723

1824
# Example usage
1925

@@ -36,18 +42,14 @@ jobs:
3642
ref: refs/tags/v1.0.1
3743
path: ./.github/actions/pull-request-toolkit-action
3844

39-
- name: run PR toolkit
45+
- name: run pull-request-toolkit action
4046
uses: ./.github/actions/pull-request-toolkit-action
4147
with:
4248
repo-token: ${{ secrets.GITHUB_TOKEN }}
43-
team-members: mtrunkat,gippy,drobnikj,fnesveda,mhamas,valekjo,Strajk,nguyeda1,dragonraid,jbartadev,m-murasovs
49+
org-token: ${{ secrets.PULL_REQUEST_TOOLKIT_ACTION_GITHUB_TOKEN }}
4450
```
45-
# TBD
46-
47-
- Tests
48-
- Github action for publishing new version
4951
50-
## Contribution
52+
# Contribution
5153
5254
1. Update code in `./src`
5355
2. Run `npm i`

__tests__/main.test.ts

Lines changed: 0 additions & 61 deletions
This file was deleted.

action.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
name: 'Apify PR toolkit'
2-
description: 'This action helps to Apify PR be better.'
2+
description: 'This action automates a couple of processes connected with a management of Github pull requests.'
33
author: 'Apify'
44
inputs:
55
repo-token:
66
required: true
77
description: 'Repository Github token'
8-
team-members:
9-
required: false
10-
description: 'List of Github usernames'
11-
team-name:
12-
required: false
13-
description: 'Name of team'
8+
org-token:
9+
required: true
10+
description: 'Github token with read only access to organization'
1411
runs:
1512
using: 'node12'
1613
main: 'dist/index.js'

dist/index.js

Lines changed: 126 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)