refs https://github.com/TryGhost/Toolbox/issues/381
- when using `pull_request`, the workflow doesn't have permissions to
write to the PR in question
- there is another trigger - `pull_request_target` - but this comes with
a heap of security warnings
- our use of it should be OK because we're only checking out our own
Action and not code from the PR
- this commit also adds permissions to specify we only want write access
to issues and PRs
refs https://github.com/TryGhost/Toolbox/issues/381
- we want to start collecting events from pull requests so we can label
and reply upon certain events
- this adds the `closed` and `labeled` events to the workflow triggers
fixes https://github.com/TryGhost/Toolbox/issues/285
- without this, some of the workflows that are only useful for the core
team will run on forks
- this commit adds checks to ensure we're running on a repo maintained
by the TryGhost organization for a handful of workflows
refs 2a19e6151c
- we want to ensure that the `needs triage` label is removed when an
issue is closed
- the event was handled in the labelling Action but it needs the event
adding here to trigger execution
refs https://github.com/TryGhost/Toolbox/issues/81
- the existing `label-actions` tooling was deprecated and shut down but
after reviewing, it wasn't expressive enough for our workflow use cases
- we wanted a tool we could drop into our repos and it works without
extra configuration
- I've developed the `tryghost/label-actions` GitHub Action which will
supports all our labeling flows for triaging
- this commit switches the repo over to using that
- configured the scheduled tasks to run at midnight daily