Open guibranco opened 1 month ago
Hello @guibranco, you have reached your request limit of 5, your cycle will refresh on 2024-09-21 10:07:38+00:00. Consider subscribing if you want more requests. If you have any questions or concerns, please contact us at info@gitauto.ai.
Description:
We need to add a new command to the bot that allows it to update or create repository action variables using the GitHub REST API. The command will take two required parameters: the variable name and the variable value. The bot should use the
GuiBranco\Pancake\Request
class to call the GitHub API and either update the existing variable or create it if it doesn't already exist.Functionality:
Command Inputs:
Action:
GuiBranco\Pancake\Request
class.PHP Example Code:
Explanation:
GitHubBot Class:
GitHubBot
class encapsulates the functionality to update or create GitHub repository action variables using the REST API.updateRepositoryVariable Function:
GuiBranco\Pancake\Request:
Request
class from theGuiBranco\Pancake
library is used to make HTTP requests to the GitHub API.GitHub API URLs:
GET /repos/{owner}/{repo}/actions/variables
PATCH /repos/{owner}/{repo}/actions/variables/{name}
POST /repos/{owner}/{repo}/actions/variables
Acceptance Criteria:
name
andvalue
.GuiBranco\Pancake\Request
class must be used for making API requests.