diff --git a/content/actions/guides/adding-labels-to-issues.md b/content/actions/guides/adding-labels-to-issues.md new file mode 100644 index 0000000000..618af66b80 --- /dev/null +++ b/content/actions/guides/adding-labels-to-issues.md @@ -0,0 +1,68 @@ +--- +title: Adding labels to issues +intro: You can use {% data variables.product.prodname_actions %} to automatically label issues. +product: '{% data reusables.gated-features.actions %}' +versions: + free-pro-team: '*' + enterprise-server: '>=2.22' + github-ae: '*' +type: 'tutorial' +topics: + - 'Workflows' + - 'Project management' +--- + +{% data reusables.actions.enterprise-beta %} +{% data reusables.actions.enterprise-github-hosted-runners %} +{% data reusables.actions.ae-beta %} +{% data reusables.actions.ae-self-hosted-runners-notice %} + +### Introduction + +This tutorial demonstrates how to use the [`andymckay/labeler` action](https://github.com/marketplace/actions/simple-issue-labeler) in a workflow to label newly opened or reopened issues. For example, you can add the `triage` label every time an issue is opened or reopened. Then, you can see all issues that need to be triaged by filtering for issues with the `triage` label. + +In the tutorial, you will first make a workflow file that uses the [`andymckay/labeler` action](https://github.com/marketplace/actions/simple-issue-labeler). Then, you will customize the workflow to suit your needs. + +### Creating the workflow + +1. {% data reusables.actions.choose-repo %} +2. {% data reusables.actions.make-workflow-file %} +3. Copy the following YAML contents into your workflow file. + + {% raw %} + ```yaml{:copy} + name: Label issues + on: + issues: + types: + - reopened + - opened + jobs: + label_issues: + runs-on: ubuntu-latest + steps: + - name: Label issues + uses: andymckay/labeler@1.0.2 + with: + add-labels: "triage" + ``` + {% endraw %} +4. Customize the parameters in your workflow file: + - Change the value for `add-labels` to the list of labels that you want to add to the issue. Separate multiple labels with commas. For example, `"help wanted, good first issue"`. For more information about labels, see "[Managing labels](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)." +5. {% data reusables.actions.commit-workflow %} + +### Testing the workflow + +Every time an issue in your repository is opened or reopened, this workflow will add the labels that you specified to the issue. + +Test out your workflow by creating an issue in your repository. + +1. Create an issue in your repository. For more information, see "[Creating an issue](/github/managing-your-work-on-github/creating-an-issue)." +2. To see the workflow run that was triggered by creating the issue, view the history of your workflow runs. For more information, see "[Viewing workflow run history](/actions/managing-workflow-runs/viewing-workflow-run-history)." +3. When the workflow completes, the issue that you created should have the specified labels added. + +### Next steps + +- To learn more about additional things you can do with the `andymckay/labeler` action, like removing labels or skipping this action if the issue is assigned or has a specific label, see the [`andymckay/labeler` action documentation](https://github.com/marketplace/actions/simple-issue-labeler). +- To learn more about different events that can trigger your workflow, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#issues)." The `andymckay/labeler` action only works on `issues`, `pull_request`, or `project_card` events. +- [Search GitHub](https://github.com/search?q=%22uses:+andymckay/labeler%22&type=code) for examples of workflows using this action. diff --git a/content/actions/guides/closing-inactive-issues.md b/content/actions/guides/closing-inactive-issues.md new file mode 100644 index 0000000000..461ef0aca2 --- /dev/null +++ b/content/actions/guides/closing-inactive-issues.md @@ -0,0 +1,77 @@ +--- +title: Closing inactive issues +intro: You can use {% data variables.product.prodname_actions %} to comment on or close issues that have been inactive for a certain period of time. +product: '{% data reusables.gated-features.actions %}' +versions: + free-pro-team: '*' + enterprise-server: '>=2.22' + github-ae: '*' +type: 'tutorial' +topics: + - 'Workflows' + - 'Project management' +--- + +{% data reusables.actions.enterprise-beta %} +{% data reusables.actions.enterprise-github-hosted-runners %} +{% data reusables.actions.ae-beta %} +{% data reusables.actions.ae-self-hosted-runners-notice %} + +### Introduction + +This tutorial demonstrates how to use the [`actions/stale` action](https://github.com/marketplace/actions/close-stale-issues) to comment on and close issues that have been inactive for a certain period of time. For example, you can comment if an issue has been inactive for 30 days to prompt participants to take action. Then, if no additional activity occurs after 14 days, you can close the issue. + +In the tutorial, you will first make a workflow file that uses the [`actions/stale` action](https://github.com/marketplace/actions/close-stale-issues). Then, you will customize the workflow to suit your needs. + +### Creating the workflow + +1. {% data reusables.actions.choose-repo %} +2. {% data reusables.actions.make-workflow-file %} +3. Copy the following YAML contents into your workflow file. + + {% raw %} + ```yaml{:copy} + name: Close inactive issues + on: + schedule: + - cron: "30 1 * * *" + + jobs: + close-issues: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v3 + with: + days-before-issue-stale: 30 + days-before-issue-close: 14 + stale-issue-label: "stale" + stale-issue-message: "This issue is stale because it has been open for 30 days with no activity." + close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale." + days-before-pr-stale: -1 + days-before-pr-close: -1 + repo-token: ${{ secrets.GITHUB_TOKEN }} + ``` + {% endraw %} +4. 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 day at 1:30 UTC. For more information about scheduled workflows, see "[Scheduled events](/actions/reference/events-that-trigger-workflows#scheduled-events)." + - Change the value for `days-before-issue-stale` to the number of days without activity before the `actions/stale` action labels an issue. If you never want this action to label issues, set this value to `-1`. + - Change the value for `days-before-issue-close` to the number of days without activity before the `actions/stale` action closes an issue. If you never want this action to close issues, set this value to `-1`. + - Change the value for `stale-issue-label` to the label that you want to apply to issues that have been inactive for the amount of time specified by `days-before-issue-stale`. + - Change the value for `stale-issue-message` to the comment that you want to add to issues that are labeled by the `actions/stale` action. + - Change the value for `close-issue-message` to the comment that you want to add to issues that are closed by the `actions/stale` action. +5. {% data reusables.actions.commit-workflow %} + +### Expected results + +Based on the `schedule` parameter (for example, every day at 1:30 UTC), your workflow will find issues that have been inactive for the specified period of time and will add the specified comment and label. Additionally, your workflow will close any previously labeled issues if no additional activity has occurred for the specified period of time. + +{% data reusables.actions.schedule-delay %} + +You can view the history of your workflow runs to see this workflow run periodically. For more information, see "[Viewing workflow run history](/actions/managing-workflow-runs/viewing-workflow-run-history)." + +This workflow will only label and/or close 30 issues at a time in order to avoid rate limit abuse. You can configure this with the `operations-per-run` setting. For more information, see the [`actions/stale` action documentation](https://github.com/marketplace/actions/close-stale-issues). + +### Next steps + +- To learn more about additional things you can do with the `actions/stale` action, like closing inactive pull requests, ignoring issues with certain labels or milestones, or only checking issues with certain labels, see the [`actions/stale` action documentation](https://github.com/marketplace/actions/close-stale-issues). +- [Search GitHub](https://github.com/search?q=%22uses%3A+actions%2Fstale%22&type=code) for examples of workflows using this action. diff --git a/content/actions/guides/commenting-on-an-issue-when-a-label-is-added.md b/content/actions/guides/commenting-on-an-issue-when-a-label-is-added.md new file mode 100644 index 0000000000..50f5ad45a4 --- /dev/null +++ b/content/actions/guides/commenting-on-an-issue-when-a-label-is-added.md @@ -0,0 +1,70 @@ +--- +title: Commenting on an issue when a label is added +intro: You can use {% data variables.product.prodname_actions %} to automatically comment on issues when a specific label is applied. +product: '{% data reusables.gated-features.actions %}' +versions: + free-pro-team: '*' + enterprise-server: '>=2.22' + github-ae: '*' +type: 'tutorial' +topics: + - 'Workflows' + - 'Project management' +--- + +{% data reusables.actions.enterprise-beta %} +{% data reusables.actions.enterprise-github-hosted-runners %} +{% data reusables.actions.ae-beta %} +{% data reusables.actions.ae-self-hosted-runners-notice %} + +### Introduction + +This tutorial demonstrates how to use the [`peter-evans/create-or-update-comment` action](https://github.com/marketplace/actions/create-or-update-comment) to comment on an issue when a specific label is applied. For example, when the `help-wanted` label is added to an issue, you can add a comment to encourage contributors to work on the issue. + +In the tutorial, you will first make a workflow file that uses the [`peter-evans/create-or-update-comment` action](https://github.com/marketplace/actions/create-or-update-comment). Then, you will customize the workflow to suit your needs. + +### Creating the workflow + +1. {% data reusables.actions.choose-repo %} +2. {% data reusables.actions.make-workflow-file %} +3. Copy the following YAML contents into your workflow file. + + {% raw %} + ```yaml{:copy} + name: Add comment + on: + issues: + types: + - labeled + jobs: + add-comment: + if: github.event.label.name == 'help-wanted' + runs-on: ubuntu-latest + steps: + - name: Add comment + uses: peter-evans/create-or-update-comment@v1 + with: + issue-number: ${{ github.event.issue.number }} + body: | + This issue is available for anyone to work on. **Make sure to reference this issue in your pull request.** :sparkles: Thank you for your contribution! :sparkles: + ``` + {% endraw %} +4. Customize the parameters in your workflow file: + - Replace `help-wanted` in `if: github.event.label.name == 'help-wanted'` with the label that you want to act on. If you want to act on more than one label, separate the conditions with `||`. For example, `if: github.event.label.name == 'bug' || github.event.label.name == 'fix me'` will comment whenever the `bug` or `fix me` labels are added to an issue. + - Change the value for `body` to the comment that you want to add. GitHub flavored markdown is supported. For more information about markdown, see "[Basic writing and formatting syntax](/github/writing-on-github/basic-writing-and-formatting-syntax)." +5. {% data reusables.actions.commit-workflow %} + +### Testing the workflow + +Every time an issue in your repository is labeled, this workflow will run. If the label that was added is one of the labels that you specified in your workflow file, the `peter-evans/create-or-update-comment` action will add the comment that you specified to the issue. + +Test your workflow by applying your specified label to an issue. + +1. Open an issue in your repository. For more information, see "[Creating an issue](/github/managing-your-work-on-github/creating-an-issue)." +2. Label the issue with the specified label in your workflow file. For more information, see "[Managing labels](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)." +3. To see the workflow run triggered by labeling the issue, view the history of your workflow runs. For more information, see "[Viewing workflow run history](/actions/managing-workflow-runs/viewing-workflow-run-history)." +4. When the workflow completes, the issue that you labeled should have a comment added. + +### Next steps + +- To learn more about additional things you can do with the `peter-evans/create-or-update-comment` action, like adding reactions, visit the [`peter-evans/create-or-update-comment` action documentation](https://github.com/marketplace/actions/create-or-update-comment). diff --git a/content/actions/guides/index.md b/content/actions/guides/index.md index 38acc21679..85043ac3f7 100644 --- a/content/actions/guides/index.md +++ b/content/actions/guides/index.md @@ -62,6 +62,13 @@ includeGuides: - /actions/learn-github-actions/migrating-from-gitlab-cicd-to-github-actions - /actions/learn-github-actions/migrating-from-jenkins-to-github-actions - /actions/learn-github-actions/migrating-from-travis-ci-to-github-actions + - /actions/guides/using-github-actions-for-project-management + - /actions/guides/closing-inactive-issues + - /actions/guides/scheduling-issue-creation + - /actions/guides/adding-labels-to-issues + - /actions/guides/commenting-on-an-issue-when-a-label-is-added + - /actions/guides/moving-assigned-issues-on-project-boards + - /actions/guides/removing-a-label-when-a-card-is-added-to-a-project-board-column --- @@ -87,3 +94,11 @@ includeGuides: + + + + + + + + diff --git a/content/actions/guides/moving-assigned-issues-on-project-boards.md b/content/actions/guides/moving-assigned-issues-on-project-boards.md new file mode 100644 index 0000000000..650cbea90d --- /dev/null +++ b/content/actions/guides/moving-assigned-issues-on-project-boards.md @@ -0,0 +1,75 @@ +--- +title: Moving assigned issues on project boards +intro: You can use {% data variables.product.prodname_actions %} to automatically move an issue to a specific column on a project board when the issue is assigned. +product: '{% data reusables.gated-features.actions %}' +versions: + free-pro-team: '*' + enterprise-server: '>=2.22' + github-ae: '*' +type: 'tutorial' +topics: + - 'Workflows' + - 'Project management' +--- + +{% data reusables.actions.enterprise-beta %} +{% data reusables.actions.enterprise-github-hosted-runners %} +{% data reusables.actions.ae-beta %} +{% data reusables.actions.ae-self-hosted-runners-notice %} + +### Introduction + +This tutorial demonstrates how to use the [`alex-page/github-project-automation-plus` action](https://github.com/marketplace/actions/github-project-automation) to automatically move an issue to a specific column on a project board when the issue is assigned. For example, when an issue is assigned, you can move it into the `In Progress` column your project board. + +In the tutorial, you will first make a workflow file that uses the [`alex-page/github-project-automation-plus` action](https://github.com/marketplace/actions/github-project-automation). Then, you will customize the workflow to suit your needs. + +### Creating the workflow + +1. {% data reusables.actions.choose-repo %} +2. In your repository, choose a project board. You can use an existing project, or you can create a new project. For more information about creating a project, see "[Creating a project board](/github/managing-your-work-on-github/creating-a-project-board)." +3. {% data reusables.actions.make-workflow-file %} +4. Copy the following YAML contents into your workflow file. + + {% raw %} + ```yaml{:copy} + name: Move assigned card + on: + issues: + types: + - assigned + jobs: + move-assigned-card: + runs-on: ubuntu-latest + steps: + - uses: alex-page/github-project-automation-plus@v0.3.0 + with: + project: Docs Work + column: In Progress + repo-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + ``` + {% endraw %} +5. Customize the parameters in your workflow file: + - Change the value for `project` to the name of your project board. If you have multiple project boards with the same name, the `alex-page/github-project-automation-plus` action will act on all projects with the specified name. + - Change the value for `column` to the name of the column where you want issues to move when they are assigned. + - Change the value for `repo-token`: + 1. Create a personal access token with the `repo` scope. For more information, see "[Creating a personal access token](/github/authenticating-to-github/creating-a-personal-access-token)." + 1. Store this personal access token as a secret in your repository. For more information about storing secrets, see "[Encrypted secrets](/actions/reference/encrypted-secrets)." + 1. In your workflow file, replace `PERSONAL_ACCESS_TOKEN` with the name of your secret. +6. {% data reusables.actions.commit-workflow %} + +### Testing the workflow + +Whenever an issue in your repository is assigned, the issue will be moved to the specified project board column. If the issue is not already on the project board, it will be added to the project board. + +If your repository is user-owned, the `alex-page/github-project-automation-plus` action will act on all projects in your repository or user account that have the specified project name and column. Likewise, if your repository is organization-owned, the action will act on all projects in your repository or organization that have the specified project name and column. + +Test your workflow by assigning an issue in your repository. + +1. Open an issue in your repository. For more information, see "[Creating an issue](/github/managing-your-work-on-github/creating-an-issue)." +2. Assign the issue. For more information, see "[Assigning issues and pull requests to other GitHub users](/github/managing-your-work-on-github/assigning-issues-and-pull-requests-to-other-github-users)." +3. To see the workflow run that assigning the issue triggered, view the history of your workflow runs. For more information, see "[Viewing workflow run history](/actions/managing-workflow-runs/viewing-workflow-run-history)." +4. When the workflow completes, the issue that you assigned should be added to the specified project board column. + +### Next steps + +- To learn more about additional things you can do with the `alex-page/github-project-automation-plus` action, like deleting or archiving project cards, visit the [`alex-page/github-project-automation-plus` action documentation](https://github.com/marketplace/actions/github-project-automation). diff --git a/content/actions/guides/removing-a-label-when-a-card-is-added-to-a-project-board-column.md b/content/actions/guides/removing-a-label-when-a-card-is-added-to-a-project-board-column.md new file mode 100644 index 0000000000..7ab58f6308 --- /dev/null +++ b/content/actions/guides/removing-a-label-when-a-card-is-added-to-a-project-board-column.md @@ -0,0 +1,75 @@ +--- +title: Removing a label when a card is added to a project board column +intro: You can use {% data variables.product.prodname_actions %} to automatically remove a label when an issue or pull request is added to a specific column on a project board. +product: '{% data reusables.gated-features.actions %}' +versions: + free-pro-team: '*' + enterprise-server: '>=2.22' + github-ae: '*' +type: 'tutorial' +topics: + - 'Workflows' + - 'Project management' +--- + +{% data reusables.actions.enterprise-beta %} +{% data reusables.actions.enterprise-github-hosted-runners %} +{% data reusables.actions.ae-beta %} +{% data reusables.actions.ae-self-hosted-runners-notice %} + +### Introduction + +This tutorial demonstrates how to use the [`andymckay/labeler` action](https://github.com/marketplace/actions/simple-issue-labeler) along with a conditional to remove a label from issues and pull requests that are added to a specific column on a project board. For example, you can remove the `needs review` label when project cards are moved into the `Done` column. + +In the tutorial, you will first make a workflow file that uses the [`andymckay/labeler` action](https://github.com/marketplace/actions/simple-issue-labeler). Then, you will customize the workflow to suit your needs. + +### Creating the workflow + +1. {% data reusables.actions.choose-repo %} +2. Choose a project that belongs to the repository. This workflow cannot be used with projects that belong to users or organizations. You can use an existing project, or you can create a new project. For more information about creating a project, see "[Creating a project board](/github/managing-your-work-on-github/creating-a-project-board)." +3. {% data reusables.actions.make-workflow-file %} +4. Copy the following YAML contents into your workflow file. + + {% raw %} + ```yaml{:copy} + name: Remove labels + on: + project_card: + types: + - moved + jobs: + remove_labels: + if: github.event.project_card.column_id == '12345678' + runs-on: ubuntu-latest + steps: + - name: remove labels + uses: andymckay/labeler@master + with: + remove-labels: "needs review" + ``` + {% endraw %} +5. Customize the parameters in your workflow file: + - In `github.event.project_card.column_id == '12345678'`, replace `12345678` with the ID of the column where you want to un-label issues and pull requests that are moved there. + + To find the column ID, navigate to your project board. Next to the title of the column, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} then click **Copy column link**. The column ID is the number at the end of the copied link. For example, `24687531` is the column ID for `https://github.com/octocat/octo-repo/projects/1#column-24687531`. + + If you want to act on more than one column, separate the conditions with `||`. For example, `if github.event.project_card.column_id == '12345678' || github.event.project_card.column_id == '87654321'` will act whenever a project card is added to column `12345678` or column `87654321`. The columns may be on different project boards. + - Change the value for `remove-labels` to the list of labels that you want to remove from issues or pull requests that are moved to the specified column(s). Separate multiple labels with commas. For example, `"help wanted, good first issue"`. For more information on labels, see "[Managing labels](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)." +6. {% data reusables.actions.commit-workflow %} + +### Testing the workflow + +Every time a project card on a project in your repository moves, this workflow will run. If the card is an issue or a pull request and is moved into the column that you specified, then the workflow will remove the specified labels from the issue or a pull request. Cards that are notes will not be affected. + +Test your workflow out by moving an issue on your project into the target column. + +1. Open an issue in your repository. For more information, see "[Creating an issue](/github/managing-your-work-on-github/creating-an-issue)." +2. Label the issue with the labels that you want the workflow to remove. For more information, see "[Managing labels](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)." +3. Add the issue to the project column that you specified in your workflow file. For more information, see "[Adding issues and pull requests to a project board](/github/managing-your-work-on-github/adding-issues-and-pull-requests-to-a-project-board)." +4. To see the workflow run that was triggered by adding the issue to the project, view the history of your workflow runs. For more information, see "[Viewing workflow run history](/actions/managing-workflow-runs/viewing-workflow-run-history)." +5. When the workflow completes, the issue that you added to the project column should have the specified labels removed. + +### Next steps + +- To learn more about additional things you can do with the `andymckay/labeler` action, like adding labels or skipping this action if the issue is assigned or has a specific label, visit the [`andymckay/labeler` action documentation](https://github.com/marketplace/actions/simple-issue-labeler). +- [Search GitHub](https://github.com/search?q=%22uses:+andymckay/labeler%22&type=code) for examples of workflows using this action. diff --git a/content/actions/guides/scheduling-issue-creation.md b/content/actions/guides/scheduling-issue-creation.md new file mode 100644 index 0000000000..d61c7f7ea6 --- /dev/null +++ b/content/actions/guides/scheduling-issue-creation.md @@ -0,0 +1,89 @@ +--- +title: Scheduling issue creation +intro: You can use {% data variables.product.prodname_actions %} to create an issue on a regular basis for things like daily meetings or quarterly reviews. +product: '{% data reusables.gated-features.actions %}' +versions: + free-pro-team: '*' + enterprise-server: '>=2.22' + github-ae: '*' +type: 'tutorial' +topics: + - 'Workflows' + - 'Project management' +--- + +{% data reusables.actions.enterprise-beta %} +{% data reusables.actions.enterprise-github-hosted-runners %} +{% data reusables.actions.ae-beta %} +{% data reusables.actions.ae-self-hosted-runners-notice %} + +### Introduction + +This tutorial demonstrates how to use the [`imjohnbo/issue-bot` action](https://github.com/marketplace/actions/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](https://github.com/marketplace/actions/issue-bot-action). Then, you will customize the workflow to suit your needs. + +### Creating the workflow + +1. {% data reusables.actions.choose-repo %} +2. {% data reusables.actions.make-workflow-file %} +3. Copy the following YAML contents into your workflow file. + + {% raw %} + ```yaml{:copy} + name: Weekly Team Sync + on: + schedule: + - cron: 0 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 }} + ``` + {% endraw %} +4. 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:00 UTC. For more information about scheduled workflows, see "[Scheduled events](/actions/reference/events-that-trigger-workflows#scheduled-events)." + - Change the value for `assignees` to the list of {% data variables.product.prodname_dotcom %} 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` to `true`. For more information about pinned issues, see "[Pinning an issue to your repository](/articles/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` to `true`. The workflow will close the most recent issue that has the labels defined in the `labels` field. To avoid closing the wrong issue, use a unique label or combination of labels. +5. {% data reusables.actions.commit-workflow %} + +### Expected results + +Based on the `schedule` parameter (for example, every Monday at 7:00 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. + +{% data reusables.actions.schedule-delay %} + +You can view the history of your workflow runs to see this workflow run periodically. For more information, see "[Viewing workflow run history](/actions/managing-workflow-runs/viewing-workflow-run-history)." + +### Next steps + +- To learn more about additional things you can do with the `imjohnbo/issue-bot` action, like rotating assignees or using an issue template, see the [`imjohnbo/issue-bot` action documentation](https://github.com/marketplace/actions/issue-bot-action). +- [Search GitHub](https://github.com/search?q=%22uses%3A+imjohnbo%2Fissue-bot%22&type=code) for examples of workflows using this action. diff --git a/content/actions/guides/using-github-actions-for-project-management.md b/content/actions/guides/using-github-actions-for-project-management.md new file mode 100644 index 0000000000..d023cb4e2c --- /dev/null +++ b/content/actions/guides/using-github-actions-for-project-management.md @@ -0,0 +1,40 @@ +--- +title: Using GitHub Actions for project management +intro: You can use {% data variables.product.prodname_actions %} to automate many of your project management tasks. +product: '{% data reusables.gated-features.actions %}' +versions: + free-pro-team: '*' + enterprise-server: '>=2.22' + github-ae: '*' +type: 'overview' +topics: + - 'Project management' +--- + +You can use {% data variables.product.prodname_actions %} to automate your project management tasks by creating workflows. Each workflow contains a series of tasks that are performed automatically every time the workflow runs. For example, you can create a workflow that runs every time an issue is created to add a label, leave a comment, and move the issue onto a project board. + +### When do workflows run? + +You can configure your workflows to run on a schedule or be triggered when an event occurs. For example, you can set your workflow to run when someone creates an issue in a repository. + +Many workflow triggers are useful for automating project management. + +- An issue is opened, assigned, or labeled. +- A comment is added to an issue. +- A project card is created or moved. +- A scheduled time. + +For a full list of events that can trigger workflows, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows)." + +### What can workflows do? + +Workflows can do many things, such as commenting on an issue, adding or removing labels, moving cards on project boards, and opening issues. + +You can learn about using {% data variables.product.prodname_actions %} for project management by following these tutorials, which include example workflows that you can adapt to meet your needs. + +- "[Adding labels to issues](/actions/guides/adding-labels-to-issues)" +- "[Removing a label when a card is added to a project board column](/actions/guides/removing-a-label-when-a-card-is-added-to-a-project-board-column)" +- "[Moving assigned issues on project boards](/actions/guides/moving-assigned-issues-on-project-boards)" +- "[Commenting on an issue when a label is added](/actions/guides/commenting-on-an-issue-when-a-label-is-added)" +- "[Closing inactive issues](/actions/guides/closing-inactive-issues)" +- "[Scheduling issue creation](/actions/guides/scheduling-issue-creation)" diff --git a/content/actions/reference/events-that-trigger-workflows.md b/content/actions/reference/events-that-trigger-workflows.md index 9f3e2327e2..0755a7a807 100644 --- a/content/actions/reference/events-that-trigger-workflows.md +++ b/content/actions/reference/events-that-trigger-workflows.md @@ -43,11 +43,7 @@ The following steps occur to trigger a workflow run: The `schedule` event allows you to trigger a workflow at a scheduled time. -{% note %} - -Note: Due to load, the `schedule` event may be delayed - -{% endnote %} +{% data reusables.actions.schedule-delay %} #### `schedule` diff --git a/data/reusables/actions/choose-repo.md b/data/reusables/actions/choose-repo.md new file mode 100644 index 0000000000..362868f66b --- /dev/null +++ b/data/reusables/actions/choose-repo.md @@ -0,0 +1 @@ +Choose a repository where you want to apply this project management workflow. You can use an existing repository that you have write access to, or you can create a new repository. For more information about creating a repository, see "[Creating a new repository](/articles/creating-a-new-repository)." \ No newline at end of file diff --git a/data/reusables/actions/commit-workflow.md b/data/reusables/actions/commit-workflow.md new file mode 100644 index 0000000000..fe2ce9b187 --- /dev/null +++ b/data/reusables/actions/commit-workflow.md @@ -0,0 +1 @@ +Commit your workflow file to the default branch of your repository. For more information, see "[Creating new files](/github/managing-files-in-a-repository/creating-new-files)." \ No newline at end of file diff --git a/data/reusables/actions/make-workflow-file.md b/data/reusables/actions/make-workflow-file.md new file mode 100644 index 0000000000..82be838ded --- /dev/null +++ b/data/reusables/actions/make-workflow-file.md @@ -0,0 +1 @@ +In your repository, create a file called `.github/workflows/YOUR_WORKFLOW.yml`, replacing `YOUR_WORKFLOW` with a name of your choice. This is a workflow file. For more information about creating new files on GitHub, see "[Creating new files](/github/managing-files-in-a-repository/creating-new-files)." \ No newline at end of file diff --git a/data/reusables/actions/schedule-delay.md b/data/reusables/actions/schedule-delay.md new file mode 100644 index 0000000000..ecbd927178 --- /dev/null +++ b/data/reusables/actions/schedule-delay.md @@ -0,0 +1,5 @@ +{% note %} + +Note: The `schedule` event can be delayed during periods of high loads of {% data variables.product.prodname_actions %} workflow runs. + +{% endnote %}