Skip to content

Commit 34a9dcf

Browse files
author
Alex Page
authored
v0.7.0 (#64)
1 parent 58d6d3b commit 34a9dcf

14 files changed

+7721
-6707
lines changed
File renamed without changes.

.github/CONTRIBUTING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Contributing
2+
3+
## Local development
4+
5+
To set up the action for local development and testing:
6+
7+
1. Create a fork of the github-project-automation-plus
8+
2. Create a new repository with a project
9+
3. Add a workflow file that changes the `uses` to your forked repository: `uses: my-fork/github-project-automation-plus@main`
10+
3. Make changes to your action and deploy them to GitHub
11+
12+
## Release a new version
13+
14+
1. Run `yarn build`
15+
2. Push the changes to the `main` branch
16+
3. Create a [new release](https://github.com/alex-page/github-project-automation-plus/releases/new)

.github/workflows/test-on-push.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ jobs:
66
test:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@master
10-
- run: |
11-
npm i
12-
npm run test
9+
- uses: actions/checkout@main
10+
- run: npm i
11+
- run: npm run test

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 Alex Page
3+
Copyright (c) 2021 Alex Page
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 15 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
6363
Change these options in the workflow `.yml` file to meet your GitHub project needs.
6464

65-
| Setting | Description | Values |
65+
| Inputs | Description | Values |
6666
| --- | --- | --- |
6767
| `on` | When the automation is ran | `issues` `pull_request` `issue_comment` `pull_request_target` `pull_request_review` |
6868
| `types` | The types of activity that will trigger a workflow run. | `opened`, `assigned`, `edited`: [See GitHub docs](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request) for more |
@@ -71,39 +71,26 @@ Change these options in the workflow `.yml` file to meet your GitHub project nee
7171
| `repo-token` | The personal access token | `${{ secrets.GITHUB_TOKEN }}` |
7272
| `action` | This determines the type of the action to be performed on the card, Default: `update` | `update`, `delete`, `archive` |
7373

74-
## Personal access token (secrets.GITHUB_TOKEN)
74+
## Personal access token
7575

76-
Depending on your project set up you may be able to use [`GITHUB_TOKEN`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) which requires no set up. This is only possible when the project and repository are owned by your account.
76+
Most of the time [`GITHUB_TOKEN`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) will work as your `repo-token`. This requires no set up. If you have a public project board and public repository this is the option for you.
7777

78-
For forked and private repositories this error occurs:
78+
If you are using a private repository or are using an organisation project you will need a personal access token to send events from your issues and pull requests.
7979

80-
```shell
81-
GraphqlError: Resource not accessible by integration
82-
```
83-
84-
**Secrets are not currently available to forks.** This error happens on forked repositories because [`GITHUB_TOKEN` only has read permissions](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#permissions-for-the-github_token).
80+
1. Create a personal access token
81+
1. [Private repository and private project board](https://github.com/settings/tokens/new?scopes=repo&description=GHPROJECT_TOKEN)
82+
1. [Organisation project board and repository](https://github.com/settings/tokens/new?scopes=repo,write:org&description=GHPROJECT_TOKEN)
8583

86-
On private repositories you may need to enable policy settings to allow running workflows from forks.
87-
Please refer to GitHub's documentation to learn about enabling these settings at [enterprise](https://docs.github.com/en/free-pro-team@latest/github/setting-up-and-managing-your-enterprise-account/enforcing-github-actions-policies-in-your-enterprise-account#enabling-workflows-for-private-repository-forks), [organization](https://docs.github.com/en/free-pro-team@latest/github/setting-up-and-managing-organizations-and-teams/disabling-or-limiting-github-actions-for-your-organization?algolia-query=private+repositor#enabling-workflows-for-private-repository-forks), or [repository](https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/disabling-or-limiting-github-actions-for-a-repository#enabling-workflows-for-private-repository-forks) level.
88-
89-
Alternatively, you can perform following steps:
90-
1. Create a [personal access token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line). See the below guide on how to [configure the permissions](#permissions-for-personal-access-tokens).
91-
2. [Create a secret](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets) containing the personal access token, call it `GH_TOKEN`
92-
3. Change the `repo-token` in the workflow `.yml` to reference your new token name:
84+
1. [Add a secret](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets) `GHPROJECT_TOKEN` with the personal access token.
85+
1. Update the `repo-token` in the workflow `.yml` to reference your new token name:
9386
```yaml
94-
repo-token: ${{ secrets.GH_TOKEN }}
87+
repo-token: ${{ secrets.GHPROJECT_TOKEN }}
9588
```
9689

97-
### Permissions for personal access tokens
98-
99-
| Repo and project board | Permission |
100-
| --- | --- |
101-
| Public repository and project board | [`GITHUB_TOKEN`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) |
102-
| Private repository and project board | `Full control of private repositories` |
103-
| Organisation public or private project board and repository | `Read and write org and team membership, read and write org projects` |
104-
10590
## Troubleshooting
10691

92+
**GraphqlError: Resource not accessible by integration** and **Secrets are not currently available to forks.** This error happens on forked repositories because [`GITHUB_TOKEN` only has read permissions](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#permissions-for-the-github_token).
93+
10794
**SAML enforcement**
10895

10996
With certain organisations there may be SAML enforcement. This means you will need to `Enable SSO` when you create the personal access token.
@@ -115,19 +102,14 @@ GraphqlError: Resource protected by organization SAML enforcement. You must gran
115102
116103
Make sure your permissions for your personal access token are correctly configured. Follow the above [guide on permissions](#permissions-for-personal-access-tokens).
117104
105+
**Private repositories**
118106
119-
## Local development
120-
121-
To set up the action for local development and testing:
122-
123-
1. Create a fork of the github-project-automation-plus
124-
2. Create a new repository with a project
125-
3. Add a workflow file that changes the `uses` to your forked repository: `uses: my-fork/github-project-automation-plus@main`
126-
3. Make changes to your action and deploy them to GitHub
107+
You may need to enable policy settings to allow running workflows from forks. Please refer to GitHub's documentation to learn about enabling these settings at [enterprise](https://docs.github.com/en/free-pro-team@latest/github/setting-up-and-managing-your-enterprise-account/enforcing-github-actions-policies-in-your-enterprise-account#enabling-workflows-for-private-repository-forks), [organization](https://docs.github.com/en/free-pro-team@latest/github/setting-up-and-managing-organizations-and-teams/disabling-or-limiting-github-actions-for-your-organization?algolia-query=private+repositor#enabling-workflows-for-private-repository-forks), or [repository](https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/disabling-or-limiting-github-actions-for-a-repository#enabling-workflows-for-private-repository-forks) level.
127108
128109
129110
## Release History
130111
112+
- v0.7.0 - Update documentation and dependencies
131113
- v0.6.0 - Add support for `pull_request_target` and `pull_request_review`
132114
- v0.5.1 - Fix get event data from issue_coment
133115
- v0.5.0 - Add option to `delete` card

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ inputs:
1818
required: false
1919
default: "update"
2020
runs:
21-
using: 'node12'
21+
using: 'node14'
2222
main: 'dist/index.js'
2323
branding:
2424
icon: 'cpu'

dist/index.js

Lines changed: 13 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)