Skip to content

Commit

Permalink
feat: add readme info (#51)
Browse files Browse the repository at this point in the history
* feat: add readme info

* fix: linting and spelling

* fix: spelling errors and bot if statement

* chore: add link and tidy text

* fix: markdown linting error
  • Loading branch information
gordsport authored Jun 8, 2022
1 parent 99152ee commit ae6c248
Show file tree
Hide file tree
Showing 13 changed files with 102 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/project_board_automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ name: 'Project board automation'
pull_request_review_comment:
types: [created]

# Configure the project specific varaibles
# Configure the project specific variables
env:
ORGANIZATION: theteamworks
PROJECT_NUMBER: 3
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
- name: 'Check if PR raised by bot'
id: bot-pr
if: ${{ github.actor == 'dependabot[bot]' }}
if: contains('refs/heads/dependabot/', github.ref)
uses: actions/github-script@v6.1.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
Expand Down
56 changes: 40 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,55 @@

# project-board-automation
# GitHub Project Board Automation

An action that will automate the movement of the cards on a GitHub projects(beta) board.
An action that will automate the movement of the issues or pull requests on a GitHub projects(beta) board.

Done as GraphQL queries to be faster than building a GitHub Action.
Before thinking of using this check out the following info and understand the assumptions made and the context it was designed for.

> ℹ️ Info: This is some informational text.
- The [Rationale](./docs/Rationale.md) for doing this
- The [Process](./docs/Rationale.md) the team should be following
- The [Detailed Workflow](./docs/Workflow.md) diagram of the action
- The [GitHub Settings](GitHubSettings.md) that are required
- The [Project Board](https://github.com/orgs/theteamworks/projects/3) will have columns as per this example (column names can be changed).

Blocks need text between them. So remember.
This has been done using GitHub Action `run` and GraphQL queries to be faster than building a full GitHub Action. This is because this action will run often and this action runs in 5-10 seconds.

> ⚠️ Warning: This is a warning notification.
## Setting up the action

```python
This has been designed for a non-developer person to copy a file, configure a few settings and have the board automated. Obviously the team needs to understand and buy into the process, albeit a lightweight one.

if __name__ == '__main__':
main()
### Copy the yaml file

```
Copy the GitHub Action [yaml file](https://github.com/theteamworks/project-board-automation/blob/main/.github/workflows/project_board_automation.yml) from this repository to get the latest version. Tagged versions with release notes and known issues will be created periodically. Copy this file into your repository in the same location `.github/workflows/`.

### Configure the action

The action requires a few organisation and project settings to be configured:

## Set up the action
```yaml

# Configure the project specific variables
env:
ORGANIZATION: theteamworks
PROJECT_NUMBER: 3
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.BOARD_AUTOMATION }}
EXCLUDE_LABEL: 'no-issue'
IN_PROGRESS_COLUMN_NAME: '"IN_PROGRESS"'
REVIEW_REQUIRED_COLUMN_NAME: '"REVIEW_REQUIRED"'
IN_REVIEW_COLUMN_NAME: '"IN_REVIEW"'
APPROVED_COLUMN_NAME: '"APPROVED"'
MERGED_COLUMN_NAME: '"MERGED"'
DONE_COLUMN_NAME: '"DONE"'
ITERATION_FIELD_NAME: Iteration # See project settings (default is `Iteration`)

```

To configure the GitHub Action...
#### Exclusion label

## Set up the (beta) project board
In order for the action to know that the pull request does not require the mandate of a planned issue (as per the [no issue required](./docs/Process.md###pull-requests-with-no-issue-required) process) an exclusion label needs to be defined.

To configure the GitHub board setting in a columns...
This label must be configured in the yaml file and also be present in each of the repositories that the work on the project board may come from.

## Set up branch protection
## Dependabot

To configure the GitHub branch protection... Testing.
> ℹ️ Info: This action has not been fully working with dependabot pull requests and is the subject of further testing. Happy path has been tested.
15 changes: 15 additions & 0 deletions docs/GitHubSettings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# GitHub Settings

## Branch protection rules

These were the key branch protection rules enabled for this automation to work as intended. Its advisable to look at all the other settings as some are highly recommended.

<img src="./image/require-pull_request_approvals.png"/>

<img src="./image/require-pull_request_approvals.png"/>

## Token permissions

These were the token permissions enabled for this automation to work as intended. It's advisable to review these to ensure all are indeed required as this could impact security.

<img src="./image/token_permissions.png"/>
28 changes: 21 additions & 7 deletions docs/Process.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,36 @@

In order to use this the team will need to follow this process. The intention is that this is as process-light as it can be for the development team when developing complex software products.

## Guiding principals
## Guiding principles

No one wants to waste time updating the board, everyone knows there is value in an accurate view on work being done.

### Planning with Issues

### Tasks (Pull requests) with no issues
Its assumed that with this board automation the team is working with some planning process. Be it a Kanban style replenishment, or a Scrum type sprint planning; the team has the notion of a `todo` column and picks work items from this list to work on.

### Pull requests with no issue required

There are always exceptions to planned items, items may be so small that the overhead of creating issues and linking pull requests is both a waste of time and money.

In the event of a `crasher` type bug where work may be done immediately, or a minor refactor or fix, it's well understood that a no-issue pull request may be the best option.

In this case raise a pull request and add the configured [exclusion label](./README.md#configure-the-action) and continue the work and the PR will be added to the board and move as per the issue would.

### Use the review process in GitHub

### Pick a card from `TODO` and add your name(s) to it
This workflow has been set up around a flow that requires a pull request to merge into your `main` / `develop` branch. It also works with `CODEOWNERS` and any number of reviews-required before being approved to merge. The GitHub repository settings can be seen [here](./GitHubSettings)

### Pick a card from `todo` and add your name(s) to it

Follow:

1. Pick a card from `TODO`
1. Pick a card from `todo`
1. Add your name(s) to it (pairing is cool)
1. Work on your pull request (draft, reviews, changes, merge)
1. Board is updated automatically
1. Move to `Done` after we deploy (don't let this column get too big).
- if you forget linking a pull request or adding the exclusion label will add the item to the board
1. Work on your pull request as you would (draft -> reviews -> changes -> merge)
1. Voila, the board is updated automatically from `in-progress` to `merged`
1. Keep an eye on column lengths (WIP limits) to avoid starting more than you finish
1. Manually move the items `Done` after they have been deployed (don't let this column get too big - Aargh; big batch releases!).

Bingo!
6 changes: 4 additions & 2 deletions docs/Rationale.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Rationale

The reason I have is because:
The reason for this is because:

1. In most cases developers/testers do not want to be bogged down with remembering to update the project board
2. It is important for the status of work items to be transparent for other team members, stakeholders, managers, sponsors etc.. to see whats happening
2. It is important for the status of work items to be transparent for other team members, stakeholders, managers, sponsors etc.. to see what's happening
3. In order to manage flow (keep WIP in check so throughput doesn't plummet) we need to see everything that has been started.

It's also designed for a non-developer (me) to be able to add a yaml file to a repository, change a few configurations and automate their team's board.
5 changes: 5 additions & 0 deletions docs/Workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Workflow

This diagram shows the detailed flow diagram:

<img src="./image/board_automation.drawio.svg"/>
1 change: 1 addition & 0 deletions docs/image/board_automation.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<mxfile host="app.diagrams.net" modified="2022-06-07T12:04:05.394Z" agent="5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36" etag="f8JLGJocPIcCBSBqtrcy" version="18.1.1" type="device"><diagram id="ZqQHE2ktCwA6-DW3dVe1" name="Page-1">7V1bc6M2FP41fkwGxNWPm8u2mcnuZLKddvPUIUa26WLkAk7s/vpKAhmQwOAYENh58RhZ3HTO+fSdi+SJdrva/hY66+U35EJ/AhR3O9HuJgBYyhR/koZd0qCrIGlYhJ6bNKlZww/vP5g2KmnrxnNhVOgYI+TH3rrYOENBAGdxoc0JQ/Re7DZHfvGua2cBhYYfM8cXW//y3HiZtNrAytp/h95iye6smukLrxzWOX2TaOm46D3XpN1PtNsQoTj5ttreQp+MHRuX5LyvFb/uHyyEQdzkhG/r4OGfP+Hr/Pvj7sWd/r3++dv9laqlDxfv2BtDFw9AeojCeIkWKHD8+6z1JkSbwIXksgo+yvo8IrTGjSpu/AfG8S6VprOJEW5axis//RVuvfgnOf3aSI9ecr/cbdMr04Nd7uAJht4KxjBkbUEc7nIXIocv+d+yS9GjXf6Iv1gyEOTtKwc4bYrQJpzBQ6OaKqoTLmB8oJ+5VwNsPhDhpwl3+LwQ+k7svRWfw0kVebHvl8kaf0nFfYzok+u+Of4mvdMP/MAxMZIQrcgdgwkwnRUW6U3wGq3pEJk+fp+b1xB/W5BvD1GEz+ZVKIpD9GtvL6AofGwHa9JvtV0QxLie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b1ny8iFfZNp5yJ+FTrSE4afc25V7l3CPD0NEHKDMDSYOzTfkkvjB/f8=</diagram></mxfile>
Binary file added docs/image/board_automation.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/image/board_automation.drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/image/require-pull_request_approvals.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/image/require_conversation_resolved.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/image/token_permissions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion wordlist.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
Aargh
Changelog
env
GitHub
github
GraphQL
WIP
html
Kanban
organisation
theteamworks
url
WIP
yaml

0 comments on commit ae6c248

Please sign in to comment.