❗ The project is now deprecated as it uses deprecated ProjectNext API. Its' functionality was ported to a TS action.
The workflow available in this repository help maintaining the following fields on a GitHub project:
Status History
: a list of past statuses an item was assigneStatus Timestamp
: a timestamp from when the lastStatus
change was performedStatus Date
: a date when the lastStatus
change was performed
I advise GitHub project admins to set up the update workflow to run on schedule. Personally, I have it set up to run every hour but the frequency should be adjusted according to the granularity of the updates the admins care about.
You need to create a GitHub token with:
admin:org
permission for writing to the project
Unfortunately, it is not yet possible to automate creation of the project fields.
For Status History
, Status Timestamp
and Status Date
as NAME
:
- Navigate to your project.
- Click
➕ New Field
. - Name the field
NAME
. - Set the type to
📅 Date
forNAME
=Status Date
and to🔤 Text
otherwise. - Click
Save
.
You can either run the script from your console or set up and run a GitHub Actions workflow.
Both methods expect the following inputs:
OWNER
: the name of the user or the organisation where the project residesPROJECT_NAME
: the name of the project
- Install GitHub CLI.
- Authenticate with GitHub by running
gh auth login
(e.g. with theGITHUB_TOKEN
you created). - Clone this repository by running
gh repo clone pl-strflt/projects-status-history
. - Perform the update by running
./projects-status-history/.github/scripts/update.sh 'OWNER' 'PROJECT_NAME'
.
This is an example of an update workflow that you can create in a repository of your choosing:
name: Update Status History
on:
schedule:
- cron: '15 * * * *'
jobs:
update:
uses: pl-strflt/projects-status-history/.github/workflows/update_reusable.yml@main
with:
owner: OWNER
project_name: PROJECT_NAME
secrets:
token: GITHUB_TOKEN
To analyse the procedure in detail, I advise you to look at the code directly.