はじめに
This tutorial demonstrates how to use the imjohnbo/issue-bot
action to create an issue on a regular basis. For example, you can create an issue each week to use as the agenda for a team meeting.
In the tutorial, you will first make a workflow file that uses the imjohnbo/issue-bot
action. Then, you will customize the workflow to suit your needs.
ワークフローの作成
-
このプロジェクト管理ワークフローを適用したいリポジトリを選択してください。 書き込みアクセス権を持つ既存のリポジトリを利用することも、新しいリポジトリを作成することもできます。 リポジトリの作成に関する詳細は「新しいリポジトリの作成」を参照してください。
-
リポジトリに、
.github/workflows/YOUR_WORKFLOW.yml
というファイルをYOUR_WORKFLOW
の部分を選択した名前で置き換えて作成してください。 これがワークフローファイルです。 GitHub上での新しいファイルの作成に関する詳しい情報については「新しいファイルの作成」を参照してください。 -
Copy the following YAML contents into your workflow file.
YAML name: Weekly Team Sync on: schedule: - cron: 20 07 * * 1 jobs: create_issue: name: Create team sync issue runs-on: ubuntu-latest steps: - name: Create team sync issue uses: imjohnbo/issue-bot@v3.0 with: assignees: "monalisa, doctocat, hubot" labels: "weekly sync, docs-team" title: "Team sync" body: | ### Agenda - [ ] Start the recording - [ ] Check-ins - [ ] Discussion points - [ ] Post the recording ### Discussion Points Add things to discuss below - [Work this week](https://github.com/orgs/github/projects/3) pinned: false close-previous: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
Customize the parameters in your workflow file:
- Change the value for
on.schedule
to dictate when you want this workflow to run. In the example above, the workflow will run every Monday at 7:20 UTC. For more information about scheduled workflows, see "Scheduled events." - Change the value for
assignees
to the list of GitHub usernames that you want to assign to the issue. - Change the value for
labels
to the list of labels that you want to apply to the issue. - Change the value for
title
to the title that you want the issue to have. - Change the value for
body
to the text that you want in the issue body. The|
character allows you to use a multi-line value for this parameter. - If you want to pin this issue in your repository, set
pinned
totrue
. For more information about pinned issues, see "Pinning an issue to your repository." - If you want to close the previous issue generated by this workflow each time a new issue is created, set
close-previous
totrue
. The workflow will close the most recent issue that has the labels defined in thelabels
field. To avoid closing the wrong issue, use a unique label or combination of labels.
- Change the value for
-
ワークフローファイルを、リポジトリのデフォルトブランチにコミットしてください。 詳細は「新しいファイルを作成する」を参照してください。
Expected results
Based on the schedule
parameter (for example, every Monday at 7:20 UTC), your workflow will create a new issue with the assignees, labels, title, and body that you specified. If you set pinned
to true
, the workflow will pin the issue to your repository. If you set close-previous
to true, the workflow will close the most recent issue with matching labels.
ノート: schedule
イベントは、GitHub Actionsのワークフローの実行による高負荷の間、遅延させられることがあります。 高負荷の時間帯には、毎時の開始時点が含まれます。 遅延の可能性を減らすために、Ⅰ時間の中の別の時間帯に実行されるようワークフローをスケジューリングしてください。
You can view the history of your workflow runs to see this workflow run periodically. 詳しい情報については、「ワークフロー実行の履歴を表示する」を参照してください。
次のステップ
- To learn more about additional things you can do with the
imjohnbo/issue-bot
action, like rotating assignees or using an issue template, see theimjohnbo/issue-bot
action documentation. - Search GitHub for examples of workflows using this action.