GithubHelp home page GithubHelp logo

benbalter / bulk-issue-creator Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 1.0 2.44 MB

Bulk opens batches of issues (or posts comments) across GitHub repositories based on a template and CSV of values. Think of it like "mail merge" for GitHub issues.

License: MIT License

Shell 0.39% JavaScript 10.56% TypeScript 88.70% Mustache 0.07% Liquid 0.28%

bulk-issue-creator's Introduction

Welcome to the official GitHub profile of @benbalter

Elsewhere on the internet

Twitter  LinkedIn

Popular blog posts

About Ben

Ben Balter is the Director of Engineering Operations and Culture at GitHub, the world’s largest software development platform. Previously, as Chief of Staff for Security, he managed the office of the Chief Security Officer, improving overall business effectiveness of the Security organization through portfolio management, strategy, planning, culture, and values. As a Staff Technical Program manager for Enterprise and Compliance, Ben managed GitHub’s on-premises and SaaS enterprise offerings, and as the Senior Product Manager overseeing the platform’s Trust and Safety efforts, Ben shipped more than 500 features in support of community management, privacy, compliance, content moderation, product security, platform health, and open source workflows to ensure the GitHub community and platform remained safe, secure, and welcoming for all software developers. Before joining GitHub’s Product team, Ben served as GitHub’s Government Evangelist, leading the efforts to encourage more than 2,000 government organizations across 75 countries to adopt open source philosophies for code, data, and policy development.

Under construction

You are visitor number:

Hit counter

Best viewed with:
Microsoft Internet Explorer

bulk-issue-creator's People

Contributors

benbalter avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

benshandd

bulk-issue-creator's Issues

Logging indicates only one issue was created where multiple were

Describe the bug

When looking at the output log from my most recent workflow run, it indicates only one issue was created. I confirmed in my other target repos from my data.csv, and those issues were indeed created.

Steps to reproduce the behavior

  1. Look at the workflow output from this job run. This indicates only one issue in /torched-marshmallows was created.
  2. In my data.csv file, /issues-graph was another target repo, along with several others.
  3. Observe this issue was indeed created, but it does not show in the log from that workflow run.

Expected behavior

The output logging should note all repos that issues were created or updated in.

Github Workflow Action fails to set true state.

Setup

  • Setup IAW instructions, with a data.csv and template.md.mustache located at ./config and personal access token generated on the repo I'm trying to send issues to, and the secret variable set to the token on the repo I'm running the workflow from.

Logs

  • Note: this is from the version where I just directly applied the variables in the workflow, but the standard one that I needed to check the box to make the write: true still showed the same initial info.
Run benbalter/bulk-issue-creator@main
  with:
    write: true
    comment: false
    template_path: ./config/template.md.mustache
    csv_path: ./config/data.csv
    github_token: ***
/usr/bin/docker run --name ed866e1d89770[2](https://github.com/jrsteensen/OH-Bulk-Issue-Generation/actions/runs/5006734800/jobs/8972396530#step:4:2)11494e06bf7b9daae2ab91eb_761e[3](https://github.com/jrsteensen/OH-Bulk-Issue-Generation/actions/runs/5006734800/jobs/8972396530#step:4:3)[4](https://github.com/jrsteensen/OH-Bulk-Issue-Generation/actions/runs/5006734800/jobs/8972396530#step:4:4) --label ed866e --workdir /github/workspace --rm -e "INPUT_WRITE" -e "INPUT_COMMENT" -e "INPUT_TEMPLATE_PATH" -e "INPUT_CSV_PATH" -e "INPUT_GITHUB_TOKEN" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/OH-Bulk-Issue-Generation/OH-Bulk-Issue-Generation":"/github/workspace" ed866e:1d89770211494e06bf7b9daae2ab91eb  "true" "false" "./config/template.md.mustache" "./config/data.csv" "***"
fatal: not a git repository (or any of the parent directories): .git
To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
I, [2023-0[5](https://github.com/jrsteensen/OH-Bulk-Issue-Generation/actions/runs/5006734800/jobs/8972396530#step:4:5)-17T18:35:59.0[6](https://github.com/jrsteensen/OH-Bulk-Issue-Generation/actions/runs/5006734800/jobs/8972396530#step:4:6)6060 #8]  INFO -- : Running with the following options:
---
template_path: 
csv_path: 
write: false
comment: false

I, [2023-05-1[7](https://github.com/jrsteensen/OH-Bulk-Issue-Generation/actions/runs/5006734800/jobs/8972396530#step:4:7)T1[8](https://github.com/jrsteensen/OH-Bulk-Issue-Generation/actions/runs/5006734800/jobs/8972396530#step:4:9):35:5[9](https://github.com/jrsteensen/OH-Bulk-Issue-Generation/actions/runs/5006734800/jobs/8972396530#step:4:10).066[14](https://github.com/jrsteensen/OH-Bulk-Issue-Generation/actions/runs/5006734800/jobs/8972396530#step:4:15)7 #8]  INFO -- : Running in READ ONLY mode. Pass `WRITE=true` environmental variable to create issues.
I, [2023-05-17T18:35:59.066[16](https://github.com/jrsteensen/OH-Bulk-Issue-Generation/actions/runs/5006734800/jobs/8972396530#step:4:17)0 #8]  INFO -- : The following issues would be created:


I, [2023-05-[17](https://github.com/jrsteensen/OH-Bulk-Issue-Generation/actions/runs/5006734800/jobs/8972396530#step:4:18)T[18](https://github.com/jrsteensen/OH-Bulk-Issue-Generation/actions/runs/5006734800/jobs/8972396530#step:4:19):35:59.187495 #8]  INFO -- : ---
repository: jrsteensen/OpenHornet
...

Fatal error

Describe the bug

I am getting the following error on the bulk create issues step, am I doing something wrong?

Run benbalter/bulk-issue-creator@main
/usr/bin/docker run --name c044242be5fa4e1de4e5fa51[6](https://github.com/username/repo-name/actions/runs/4539606879/jobs/7999631349#step:4:7)bc0d2e[7](https://github.com/username/repo-name/actions/runs/4539606879/jobs/7999631349#step:4:8)d1bd9_1e[8](https://github.com/username/repo-name/actions/runs/4539606879/jobs/7999631349#step:4:9)807 --label 6c0442 --workdir /github/workspace --rm -e "GITHUB_TOKEN" -e "INPUT_WRITE" -e "INPUT_COMMENT" -e "INPUT_TEMPLATE_PATH" -e "INPUT_CSV_PATH" -e "INPUT_GITHUB_TOKEN" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/repo-name/repo-name":"/github/workspace" 6c0442:42be5fa4e1de4e5fa516bc0d2e7d1bd[9](https://github.com/username/repo-name/actions/runs/4539606879/jobs/7999631349#step:4:10)  "false" "" "" "" ""
fatal: not a git repository (or any of the parent directories): .git
To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
/usr/src/app/lib/bulk_issue_creator.rb:[10](https://github.com/username/repo-name/actions/runs/4539606879/jobs/7999631349#step:4:11)4:in `ensure_path_exists': Expected /github/workspace/config/template.md.mustache to exist (BulkIssueCreator::MissingFileError)
	from /usr/src/app/lib/bulk_issue_creator.rb:64:in `run'
	from /usr/src/app/bin/bulk-issue-creator:21:in `create'
	from /usr/local/bundle/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
	from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:[12](https://github.com/username/repo-name/actions/runs/4539606879/jobs/7999631349#step:4:13)7:in `invoke_command'
	from /usr/local/bundle/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
	from /usr/local/bundle/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
	from /usr/src/app/bin/bulk-issue-creator:51:in `<main>'
I, [[20](https://github.com/username/repo-name/actions/runs/4539606879/jobs/7999631349#step:4:21)23-03-28T05:28:59.40[22](https://github.com/username/repo-name/actions/runs/4539606879/jobs/7999631349#step:4:23)02 #8]  INFO -- : Running with the following options:
---
template_path: 
csv_path: 
write: false
comment: false

`

Steps to reproduce the behavior

Follow the instructions (just doing1 repository, so no API key)

`@username` format in `assignees` column causes action to fail

Describe the bug

When the assignees column is in the form of @username, the issue generation action fails and the issue is not created. (When the column contains username, the action succeeds, the issue is created, and the username is assigned to the issue - as expected.)

Steps to reproduce the behavior

  1. Create a data.csv with a column entitled assignees and a row that populates that column with a valid username in the format of @username.
  2. Run the Bulk Issue Creator action

Expected behavior

The expectation is that the issue would be created and assigned as it is when the @ is not included in the username.

Screenshots

https://github.com/github/bulk-email-compliance/actions/runs/7802978340/job/21281673666

Additional context

In our case, we wanted to both include the username (as a mention) in the created as well as the assignee, so we used the @username format. While it would be possible to add the @ in the template rather than in the data, it just wasn't something we were expecting. If changing the behavior is not an acceptable approach, it would be good to update the documentation to describe the expected format for the assignees field.

Issue generation job exits without completing after failure

Describe the bug

If a repository in data.csv exists but does not allow for issue creation (issues turned off, repository is archived) the job will fail at that point. Any issues in repositories before that are created, but the job exits and does not create any further issues.

I noticed that in the test run, scenarios where repositories simply do not exist seem to proceed with a warning just fine.

Steps to reproduce the behavior

  1. Use a data.csv file with a repository that exists but is not able to create an issue
  2. Note in the logs the failure, and that no subsequent issues are created

Expected behavior

The job should fail entirely or repositories should be noted in the logs, but the job should continue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.