Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Ensuring that PRs are linked and estimated #9

Merged
merged 21 commits into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .github/workflows/pr_toolkit.yaml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/pr_toolkit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# For more info see: https://github.com/apify/pull-request-toolkit-action/
name: Apify PR toolkit

on:
pull_request:
branches:
- main
types: ['opened', 'reopened', 'synchronize', 'labeled', 'unlabeled', 'edited', 'ready_for_review'] # The first 3 are default.

concurrency: # This is to make sure that it's executed only for the most recent changes of PR.
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
apify-pr-toolkit:
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
steps:
- name: clone local repository
uses: actions/checkout@v3

- name: run pull-request-toolkit action
uses: ./
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
org-token: ${{ secrets.PULL_REQUEST_TOOLKIT_ACTION_GITHUB_TOKEN }}
zenhub-token: ${{ secrets.PULL_REQUEST_TOOLKIT_ACTION_ZENHUB_TOKEN }}
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,23 @@ This action automates a couple of processes connected with the management of Git
- Assigns PR to its creator.
- Fills missing milestone with a current milestone from Zenhub.
- Assigns a team label (`t-[teamName]`) to the pull request.
- Makes sure that:
- PR is either linked with epic or issue or labeled as `adhoc`
- PR itself or linked issue is estimated

## Wishlist / TODOs

- Make sure that the pull request has either issue assigned (using the Zenhub issue-PR connection) or has an estimate and labels set.
- Github action for publishing of a new version.
- Github action for lint and tests execution.
- Use Docker image with runtime typescript compilation instead of committing a dist directory.

# Action input

| Name | Description | Example | Required |
| -------------| -------------------------------------------------- | ---------------| -------- |
| `repo-token` | Repository Github token | `github-token` | yes |
| `org-token` | Github token with read only access to organization | `github-token` | yes |
| Name | Description | Example | Required |
| ---------------| -------------------------------------------------- | ---------------| -------- |
| `repo-token` | Repository Github token | `github-token` | yes |
| `org-token` | Github token with read only access to organization | `github-token` | yes |
| `zenhub-token` | Github token with read only access to organization | `zenhub-token` | yes |

# Example usage

Expand Down Expand Up @@ -48,6 +51,7 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
org-token: ${{ secrets.PULL_REQUEST_TOOLKIT_ACTION_GITHUB_TOKEN }}
zenhub-token: ${{ secrets.PULL_REQUEST_TOOLKIT_ACTION_ZENHUB_TOKEN }}
```

# Contribution
Expand All @@ -56,4 +60,4 @@ jobs:
2. Run `npm i`
3. Run `npm run all`
4. Commit all changes including `./disc` folder with built code.
5. Publish a new version of action using new release (It needs to be done manually)
5. Publish a new version of an action using the new release (It needs to be done manually)
Loading