Skip to content

Commit 4453740

Browse files
author
Christian Toney
committed
Update docs
1 parent 7d59cc3 commit 4453740

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# actions-get-project-id-from-number
2+
A GitHub action to get a project ID from its number.
3+
4+
## Inputs
5+
| Name | Description | Required? |
6+
| :- | :- | :- |
7+
| `github-project-number` | The number of the project that you want to find the ID of. | Yes |
8+
| `github-repository-name` | The name of the project's repository. If not provided, the workflow will default to its own repository. | No |
9+
| `github-repository-owner` | The owner of the project's repository. If not provided, the workflow will default to its own repository owner. | No |
10+
| `github-app-id` | The app ID of the GitHub app that you are authenticating with. | Only if `github-personal-access-token` is not provided |
11+
| `github-app-private-key` | A private key of the GitHub app that you are authenticating with. | Only if `github-personal-access-token` is not provided |
12+
| `github-app-installation-id` | The ID of the installation that you are authenticating with.<br /><br />You can get this from checking the URL after hitting "Configure" at `https://github.com/{USER or ORGANIZATION}/{REPOSITORY}/settings/installations`. | Only if `github-personal-access-token` is not provided |
13+
| `github-personal-access-token` | The personal access token that you are authenticating with. [GITHUB_TOKEN won't work because they currently cannot access projects.](https://docs.github.com/en/issues/planning-and-tracking-with-projects/automating-your-project/automating-projects-using-actions#github-actions-workflows) | Only if `github-app-id`, `github-app-private-key`, and `github-app-installation-id` are not provided |
14+
15+
## Outputs
16+
| Name | Description |
17+
| :- | :- |
18+
| `GITHUB_PROJECT_FIELD_ID` | The requested project field ID. |
19+
20+
## Permissions
21+
Your GitHub app installation or your personal access token must have at least the following permissions:
22+
* Read access to projects (Organization permissions > Projects)
23+
24+
## Example usage
25+
```yml
26+
- name: Convert project number to ID
27+
id: convert_project_number_to_id
28+
uses: Beastslash/actions-get-project-id-from-number@v1.0.0
29+
with:
30+
github-project-number: ${{ vars.ISSUES_SYNC_GITHUB_PROJECT_NUMBER }}
31+
github-app-id: ${{ vars.ISSUES_SYNC_GITHUB_APP_ID }}
32+
github-app-private-key: ${{ secrets.ISSUES_SYNC_GITHUB_APP_PRIVATE_KEY }}
33+
github-app-installation-id: ${{ vars.ISSUES_SYNC_GITHUB_APP_INSTALLATION_ID }}
34+
```

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: "Convert project number to ID"
1+
name: "Get project ID from number"
22
author: "Christian Toney"
3-
description: "Convert a project number to an ID. You can use a personal access token (PAT) or GitHub app."
3+
description: "Get a project ID from its number. You can use a personal access token (PAT) or GitHub app."
44
inputs:
55

66
# Project metadata

0 commit comments

Comments
 (0)