In GitHub workflows, if it's necessary to check labels, 'labeled' event is enough, 'opened' event is not needed.
For GitHub actions, in order to checkout the current repository, 'contents: write' permission is required.
When using the GitHub API, the environmental variable 'GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}' should be used.
In the GitHub API, when listing pull requests, pagination can be achieved using per_page and page parameters.
To filter the current context, the GitHub API can be used to list the state of all contexts.
To create a commit status, the GitHub API can be used to specify the state, context, and description.
In the GitHub repository settings, 'Require status checks to pass before merging' should be checked under 'Protect matching branches' in the Branch protection rule.
To add the current GitHub action to the required status checks, it should be added in 'Status checks that are required'.