I'm building an automation rule in my Jira project. This rule will automatically create a pull request in GitHub every time any Jira issue's status transitions from X to Y.
This rule has a "Send web request" action for this.
Url is a GitHub REST API endpoint url, which requires an auth token. Currently I'm testing this with my own personal account's access token, and it is working fine. But before this goes live in my workplace, I have to replace that token with a GitHub app's token.
We already do have a GitHub app built and installed in our GitHub org. But as you might know, any GitHub app's installation token expires in one hour max. So, I can't just generate a token now and save that in the rule above. The web-request in the rule will stop working after an hour when that token expires.
I also searched whether there's any Jira REST API endpoint which I can use to edit automation rules. But apparently Jira doesn't have REST API endpoints for editing automation rules.
So, my question is - is there any way to automatically update the auth token every hour? (I do have the GitHub app's app id, installation id, client id, client secret, private key etc.)