Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
pierluigi committed Apr 18, 2020
1 parent 31e943d commit 887133f
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 3 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Vidal Graupera

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.
39 changes: 36 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,44 @@
# Random 1 on 1 Question Generator

Questions taken from https://github.com/VGraupera/1on1-questions
This action posts a comment with a list of randomly selected 1-on-1 questions when a new issue matches a specific label.

Questions are taken from https://github.com/VGraupera/1on1-questions (for now, copied inside this repo).

## Instructions

// TODO
Define a workflow like this:

```
on:
issues:
types: [opened]
jobs:
questions:
runs-on: ubuntu-latest
name: Generate random questions
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Generate questions
id: questions
uses: pierluigi/random-1on1-questions-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# Optional: ovverride these defaults
# num-categories: "3" # how many question categories
# num-questions: "1" # how many questions per category
# label: "1on1" # which label triggers this workflow
```

It's possible to define the number of categories and the amount of question per each category (see workflow defined above).

## How it works

// TODO document
This action is designed to run each time a new issue is opened (unfortunately at the time of writing it's not possible to conditionally skip an entire job based on issues having a label defined dynamically).

If the issue contains the specified label (checked during execution, by default `inputs.label = "1on1"`) the action will generate a number of questions (divided by category) and post them as a comment to the issue.

## Example

This repo is already set up to contain an example workflow and issue template (both inside the `.github` folder) that can be reused. To see it in action, simply [open a `One to one` issue](https://github.com/pierluigi/random-1on1-questions-action/issues/new/choose)!

0 comments on commit 887133f

Please sign in to comment.